/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/pyfits/__init__.py:22: PyFITSDeprecationWarning: PyFITS is deprecated, please use astropy.io.fits
  PyFITSDeprecationWarning)  # noqa

Likelihood Analysis Tool
Support Contact: Daniel Kocevski (daniel.kocevski@nasa.gov)


Waiting 110 seconds before starting...
Proceeding.

Importing modules...
This is make3FGLxml version 01r0.
The default diffuse model files and names are for pass 8 and assume you have v10r00p05 of the Fermi Science Tools or higher.
This is make4FGLxml version 01r04.
The default diffuse model files and names are for pass 8 and 4FGL and assume you have v11r5p3 of the Fermi Science Tools or higher.

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

number of points = 7686
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J2339.6+0242_daily_bin347
RA = 354.904, Dec = 2.7102
tmin = 329270401, tmax = 329529601
emin = 100.0, emax = 100000.0
irfs = P8R3_SOURCE_V2
ROI = 12
zmax = 90

Fitting strategies:
Fix sources to their catalog values = True
Leave variable source normalizations free = True
Perform pre-fit where ALL sources are frozen to catalog values = False
Perform secondary fit with a free spectral index = True
Remove all catalog sources = False
Remove weak (TS < 2) catalog sources = False
Freeze Galactic component = False

Likelihood fit parameters:
Statistic: UNBINNED
Optimizer: MINUIT

Catalog: 4FGL

Repository Job = True

LAT data Source:
Data catalog

Updating database...

UPDATE lightcurve_data_v2 SET job_id='70153', job_status='RUN', time_executed='2021-09-30 02:32:54.388944', time_epoch_executed='1632994374.39' WHERE source_name='4FGL J2339.6+0242' and cadence='daily' and bin_id='347'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/70153

Creating custom pfile directory:
/scratch/kocevski/70153/pfiles/

Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStop>=329270401.0 && nMetStart<329529601.0' /Data/Flight/Reprocess/P305

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=329270401.0 && nMetStart<329529601.0' /Data/Flight/Level1/LPA

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/70153/ft1_4FGL_J2339.6+0242_daily_bin347.fits


Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT2 --filter 'nMetStop>=329270401.0 && nMetStart<329529601.0' /Data/Flight/Level1/LPA

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/70153/ft2_4FGL_J2339.6+0242_daily_bin347.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/70153/ft1_4FGL_J2339.6+0242_daily_bin347.fits outfile=/scratch/kocevski/70153/ft1_filteredMKT_4FGL_J2339.6+0242_daily_bin347.fits ra=354.904 dec=2.7102 rad=12.0 tmin=329270401.0 tmax=329529601.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Done.
real 3.61
user 3.39
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/70153/ft2_4FGL_J2339.6+0242_daily_bin347.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/70153/ft2_4FGL_J2339.6+0242_daily_bin347.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/scratch/kocevski/70153/ft1_filteredMKT_4FGL_J2339.6+0242_daily_bin347.fits evtable="EVENTS" outfile="/scratch/kocevski/70153/ft1_filtered_4FGL_J2339.6+0242_daily_bin347.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.45
user 0.30
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/70153/ft1_filtered_4FGL_J2339.6+0242_daily_bin347.fits" evtable="EVENTS" scfile=/scratch/kocevski/70153/ft2_4FGL_J2339.6+0242_daily_bin347.fits sctable="SC_DATA" outfile=/scratch/kocevski/70153/ltcube_329270401_329529601_4FGL_J2339.6+0242_daily_bin347.fits dcostheta=0.025 binsz=1.0 phibins=0 tmin=0.0 tmax=0.0 file_version="1" zmin=0.0 zmax=90.0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Working on file /scratch/kocevski/70153/ft2_4FGL_J2339.6+0242_daily_bin347.fits
.....................!
real 11.81
user 11.46
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/70153/ft1_filtered_4FGL_J2339.6+0242_daily_bin347.fits evtable="EVENTS" scfile=/scratch/kocevski/70153/ft2_4FGL_J2339.6+0242_daily_bin347.fits sctable="SC_DATA" expcube=/scratch/kocevski/70153/ltcube_329270401_329529601_4FGL_J2339.6+0242_daily_bin347.fits outfile=/scratch/kocevski/70153/expmap_329270401_329529601_4FGL_J2339.6+0242_daily_bin347.fits irfs="P8R3_SOURCE_V2" evtype="INDEF" srcrad=30.0 nlong=88 nlat=88 nenergies=10 submap=no nlongmin=0 nlongmax=0 nlatmin=0 nlatmax=0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

The exposure maps generated by this tool are meant
to be used for *unbinned* likelihood analysis only.
Do not use them for binned analyses.
Computing the ExposureMap using /scratch/kocevski/70153/ltcube_329270401_329529601_4FGL_J2339.6+0242_daily_bin347.fits
.....................!
real 190.29
user 185.42
sys 4.55

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Added 160 point sources and 0 extended sources

Setting source of interest to:
4FGL J2339.6+0242 @ 354.904 2.7102

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/70153/ft1_filtered_4FGL_J2339.6+0242_daily_bin347.fits scfile=/scratch/kocevski/70153/ft2_4FGL_J2339.6+0242_daily_bin347.fits outfile=/scratch/kocevski/70153/cmap_329270401_329529601_4FGL_J2339.6+0242_daily_bin347.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=354.904 yref=2.7102 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.52
user 0.37
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/70153/ft1_filtered_4FGL_J2339.6+0242_daily_bin347.fits scfile=/scratch/kocevski/70153/ft2_4FGL_J2339.6+0242_daily_bin347.fits outfile=/scratch/kocevski/70153/cmap_HighResolution_329270401_329529601_4FGL_J2339.6+0242_daily_bin347.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=354.904 yref=2.7102 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.54
user 0.39
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/70153/ft1_filtered_4FGL_J2339.6+0242_daily_bin347.fits evtable="EVENTS" scfile=/scratch/kocevski/70153/ft2_4FGL_J2339.6+0242_daily_bin347.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/70153/Model_4FGL_J2339.6+0242_daily_bin347.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

adding source EG_v02
adding source GAL_V02
Working on...
/scratch/kocevski/70153/ft1_filtered_4FGL_J2339.6+0242_daily_bin347.fits.....................!
real 57.53
user 56.30
sys 1.14

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/70153/ft1_filtered_4FGL_J2339.6+0242_daily_bin347.fits', '/scratch/kocevski/70153/ft2_4FGL_J2339.6+0242_daily_bin347.fits', expMap='/scratch/kocevski/70153/expmap_329270401_329529601_4FGL_J2339.6+0242_daily_bin347.fits', expCube='/scratch/kocevski/70153/ltcube_329270401_329529601_4FGL_J2339.6+0242_daily_bin347.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/70153/Model_4FGL_J2339.6+0242_daily_bin347.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2339.6+0242'

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  8.280e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
464        Index:  2.549e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
465        Scale:  7.790e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/70153/ft1_filtered_4FGL_J2339.6+0242_daily_bin347.fits
Spacecraft file(s): /scratch/kocevski/70153/ft2_4FGL_J2339.6+0242_daily_bin347.fits
Exposure map: /scratch/kocevski/70153/expmap_329270401_329529601_4FGL_J2339.6+0242_daily_bin347.fits
Exposure cube: /scratch/kocevski/70153/ltcube_329270401_329529601_4FGL_J2339.6+0242_daily_bin347.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/70153/Model_4FGL_J2339.6+0242_daily_bin347.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 5510.04014542

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 5509.91403205

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    5.5155       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    15.917       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .75314       1.0000         .10000E-03   10000.    
     5 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    5.9384       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10247E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    11.518       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .61369       1.0000         .10000E-03   10000.    
    14 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    4.8159       1.0000         .10000E-03   10000.    
    16 'Prefactor '    14.640       1.0000         .10000E-03   10000.    
    17 'norm      '    .10315E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    22.256       1.0000         .10000E-03   10000.    
    22 'norm      '    25.158       1.0000         .10000E-03   10000.    
    23 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    2.2246       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    28 'Prefactor '    2.6102       1.0000         .10000E-03   10000.    
    29 'Normalizat'    .91095       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .79988       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5260E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5509.914     FROM MIGRAD    STATUS=CONVERGED    765 CALLS     3404 TOTAL
                     EDM=   .61E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.5154        7.6207        .53183E-07   -.12663E-04
   2  Prefactor     .10000E-03    17.477       -.10948E-06** at limit **
   3  Prefactor     15.927        13.206       -.60521E-07   -.89144E-04
   4  Prefactor     .75304        3.7555        .15441E-05   -.22056E-04
   5  norm          .10000E-03    1.5116        .11791E-06** at limit **
   6  norm          5.9384        3.9432        .18820E-06    .23709E-04
   7  Prefactor     .10001E-03    5.1654        .14183E-05** at limit **
   8  norm          11.517        12.932       -.26813E-07   -.16483E-04
   9  Prefactor     .10000E-03    32.188        .57165E-06** at limit **
  10  Prefactor     .10000E-03    3.4285        .31150E-07** at limit **
  11  Prefactor     .10000E-03    4.6744       -.27460E-06** at limit **
  12  Prefactor     .10000E-03    4.6343        .33188E-06** at limit **
  13  norm          .61355        .92843        .10730E-05   -.42731E-03
  14  norm          .10000E-03    4.0079       -.14527E-06** at limit **
  15  Prefactor     4.8132        7.3093        .91148E-07    .91478E-04
  16  Prefactor     14.656        54.035        .47315E-05    .72676E-04
  17  norm          .10002E-03    5.6246       -.73947E-06** at limit **
  18  Prefactor     .10000E-03    7.4813       -.16724E-06** at limit **
  19  Prefactor     .10000E-03    109.75        .72480E-06** at limit **
  20  Prefactor     .10000E-03    13.237       -.28854E-07** at limit **
  21  Prefactor     22.250        20.771        .34003E-06    .98984E-04
  22  norm          25.156        19.424        .71952E-07    .15336E-04
  23  norm          .10000E-03    9.9074       -.15354E-05** at limit **
  24  Prefactor     .10000E-03    17.374        .19865E-07** at limit **
  25  Prefactor     .10000E-03    2.2133       -.10506E-06** at limit **
  26  Prefactor     2.1836        123.69       -.13793E-04   -.82220E-04
  27  Prefactor     .10000E-03    8.7425        .11792E-05** at limit **
  28  Prefactor     2.6113        26.085        .11087E-05   -.12524E-04
  29  Normalizat    .91105        .18744       -.40878E-06   -.53076E-05
  30  Prefactor     .79985        .12544       -.71601E-06    .36219E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.51538
  Prefactor  = 0.0001
  Prefactor  = 15.9269
  Prefactor  = 0.753043
  norm       = 0.0001
  norm       = 5.93841
  Prefactor  = 0.000100014
  norm       = 11.5167
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.613555
  norm       = 0.0001
  Prefactor  = 4.81316
  Prefactor  = 14.6559
  norm       = 0.000100016
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 22.2498
  norm       = 25.1561
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.18355
  Prefactor  = 0.0001
  Prefactor  = 2.61125
  Normalizat = 0.911053
  Prefactor  = 0.799855
 **********
 **   18 **HESSE 
 **********

 FCN=   5509.914     FROM HESSE     STATUS=OK           586 CALLS     3990 TOTAL
                     EDM=   .25E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.5154        7.6155        .17108E-03   -1.5238    
   2  Prefactor     .10000E-03    17.489        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     15.927        12.967        .10039E-03   -1.4910    
   4  Prefactor     .75304        3.6796        .28243E-03   -1.5534    
   5  norm          .10000E-03    2.3405        .17242E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          5.9384        3.9358        .11647E-03   -1.5221    
   7  Prefactor     .10001E-03    14.147        .31954E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          11.517        12.926        .11804E-03   -1.5029    
   9  Prefactor     .10000E-03    32.418        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    3.4309        .13423E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    4.6813        .15681E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    4.6587        .15606E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .61355        .97037        .23453E-03   -1.5551    
  14  norm          .10000E-03    4.0889        .14510E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     4.8132        7.2083        .18332E-03   -1.5269    
  16  Prefactor     14.656        54.993        .10468E-03   -1.4942    
  17  norm          .10002E-03    17.948        .32716E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    7.7080        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    109.78        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    13.697        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     22.250        20.640        .84904E-04   -1.4764    
  22  norm          25.156        19.419        .79865E-04   -1.4704    
  23  norm          .10000E-03    10.028        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    17.380        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    2.2553        .10777E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     2.1836        138.68        .27568E-03   -1.5412    
  27  Prefactor     .10000E-03    8.8637        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     2.6113        26.007        .25249E-03   -1.5385    
  29  Normalizat    .91105        .21644        .25813E-03   -.96073    
  30  Prefactor     .79985        .14560        .19243E-03   -.99734    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.51319e-09
Minuit parameter uncertainties:
  1  7.6168
  2  1.3828e-05
  3  12.9696
  4  3.32931
  5  2.83225e-07
  6  3.93592
  7  0.000875298
  8  12.9289
  9  8.66976e-05
  10  2.15437e-06
  11  1.9165e-05
  12  1.46629e-05
  13  0.970392
  14  1.91874e-05
  15  7.20959
  16  55.1838
  17  0.0010615
  18  1.88852e-05
  19  0.000159331
  20  2.37084e-05
  21  20.6461
  22  19.4235
  23  0.000138988
  24  1.74373e-06
  25  4.25368e-06
  26  34.8866
  27  0.000127584
  28  16.4904
  29  0.216646
  30  0.145667
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 5509.91403059

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  2.184e+00  3.489e+01  1.000e-04  1.000e+04 ( 1.000e-13)
464        Index:  2.549e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
465        Scale:  7.790e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
523    Prefactor:  7.999e-01  1.457e-01  0.000e+00  1.000e+01 ( 1.000e+00)
524        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
525        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
522   Normalization:  9.111e-01  2.166e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 354.904 2.710
Photon Flux Upper Limit: 1.05e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.17e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/70153/likelihoodResults_329270401_329529601_4FGL_J2339.6+0242_daily_bin347.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5509.84758109
delta logL = 0.0664495068668

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5509.84175846
delta logL = 0.0722721290495

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.6194       1.0000         .10000E-03   10000.    
     2 'Index     '    3.9060       1.0000          .0000       10.000    
     3 'Normalizat'    .89368       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .80672       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5260E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5509.842     FROM MIGRAD    STATUS=FAILED        96 CALLS      262 TOTAL
                     EDM=   .14E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.6180        580.86        .24443E-03   -.75161E-04
   2  Index         3.9119        7.9083        .12554E-01    .27927E-03
   3  Normalizat    .89363        .16415        .26039E-03    .11439E-04
   4  Prefactor     .80673        .11537        .19168E-03   -.12479E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5509.842     FROM SIMPLEX   STATUS=UNCHANGED     93 CALLS      355 TOTAL
                     EDM=   .12E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.6180        580.86        .49599E-03   -.75161E-04
   2  Index         3.9119        7.9083        .35725E-02    .27927E-03
   3  Normalizat    .89363        .16415        .17517E-03    .11439E-04
   4  Prefactor     .80673        .11537        .45640E-04   -.12479E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5509.842     FROM MIGRAD    STATUS=CONVERGED     30 CALLS      385 TOTAL
                     EDM=   .67E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.6180        29.082        .97773E-05   -.84649E-04
   2  Index         3.9119        3.8894        .25108E-02   -.72130E-05
   3  Normalizat    .89363        .21072        .10416E-04    .10697E-04
   4  Prefactor     .80673        .14597        .76672E-05   -.11862E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.61799
  Index      = 3.91192
  Normalizat = 0.893625
  Prefactor  = 0.806727
 **********
 **   18 **HESSE 
 **********

 FCN=   5509.842     FROM HESSE     STATUS=OK            23 CALLS      408 TOTAL
                     EDM=   .64E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.6180        19.053        .19555E-05   -1.5454    
   2  Index         3.9119        3.3127        .10043E-03   -.21937    
   3  Normalizat    .89363        .21021        .20832E-05   -.96684    
   4  Prefactor     .80673        .14563        .15334E-05   -.99481    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.39323e-11
Minuit parameter uncertainties:
  1  11.1084
  2  3.64133
  3  0.210404
  4  0.145702
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/70153': No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5509.84175119
delta logL = 0.0722794009516

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  1.618e+00  1.111e+01  1.000e-04  1.000e+04 ( 1.000e-13)
464        Index:  3.912e+00  3.641e+00  0.000e+00  1.000e+01 (-1.000e+00)
465        Scale:  7.790e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
523    Prefactor:  8.067e-01  1.457e-01  0.000e+00  1.000e+01 ( 1.000e+00)
524        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
525        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
522   Normalization:  8.936e-01  2.104e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 354.904 2.710

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/70153/cmap_HighResolution_329270401_329529601_4FGL_J2339.6+0242_daily_bin347.png

Cleaning up...

** Nuclear option initiated! **
rmdir /scratch/kocevski/70153

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.17e-03', job_status='DONE', photon_flux_upper_limit='1.05e-07', time_completed='2021-09-30 02:44:39.386533', job_id='70153', GAL2='0.81', fit_tolerance='1e-08', EG2='0.89', EG='0.91', time_epoch_completed='1632995079.39', return_code2='0', ts='0.00', comment='SUCCESS', return_code='0', GAL='0.80', dlogl='7.23e-02', ts2='0.16', photon_index_error='0.00', photon_index='2.55' WHERE bin_id='347' AND source_name='4FGL J2339.6+0242' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep 30 02:44:39 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0298>
Subject: Job 70153: <4FGL_J2339.6+0242_daily_bin347> in cluster <slac> Done

Job <4FGL_J2339.6+0242_daily_bin347> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Sep 30 02:30:54 2021
Job was executed on host(s) <bullet0298>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep 30 02:30:56 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep 30 02:30:56 2021
Terminated at Thu Sep 30 02:44:40 2021
Results reported at Thu Sep 30 02:44:40 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2339.6+0242_daily_bin347 354.904 2.7102 329270401 329529601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2339.6+0242 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   703.29 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             263.42 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   823 sec.
    Turnaround time :                            826 sec.

The output (if any) is above this job summary.

