/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 103 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 = 7346
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin119
RA = 160.15, Dec = 6.2848
tmin = 270172801, tmax = 270432001
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='60765', job_status='RUN', time_executed='2021-09-02 08:08:13.495105', time_epoch_executed='1630595293.5' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='119'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/60765

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/60765/ft1_4FGL_J1040.5+0617_daily_bin119.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/60765/ft2_4FGL_J1040.5+0617_daily_bin119.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/60765/ft1_4FGL_J1040.5+0617_daily_bin119.fits outfile=/scratch/kocevski/60765/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin119.fits ra=160.15 dec=6.2848 rad=12.0 tmin=270172801.0 tmax=270432001.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 1.67
user 1.47
sys 0.17

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/60765/ft2_4FGL_J1040.5+0617_daily_bin119.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/60765/ft2_4FGL_J1040.5+0617_daily_bin119.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/60765/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin119.fits evtable="EVENTS" outfile="/scratch/kocevski/60765/ft1_filtered_4FGL_J1040.5+0617_daily_bin119.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.56
user 0.33
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/60765/ft1_filtered_4FGL_J1040.5+0617_daily_bin119.fits" evtable="EVENTS" scfile=/scratch/kocevski/60765/ft2_4FGL_J1040.5+0617_daily_bin119.fits sctable="SC_DATA" outfile=/scratch/kocevski/60765/ltcube_270172801_270432001_4FGL_J1040.5+0617_daily_bin119.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/60765/ft2_4FGL_J1040.5+0617_daily_bin119.fits
.....................!
real 17.68
user 17.23
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/60765/ft1_filtered_4FGL_J1040.5+0617_daily_bin119.fits evtable="EVENTS" scfile=/scratch/kocevski/60765/ft2_4FGL_J1040.5+0617_daily_bin119.fits sctable="SC_DATA" expcube=/scratch/kocevski/60765/ltcube_270172801_270432001_4FGL_J1040.5+0617_daily_bin119.fits outfile=/scratch/kocevski/60765/expmap_270172801_270432001_4FGL_J1040.5+0617_daily_bin119.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/60765/ltcube_270172801_270432001_4FGL_J1040.5+0617_daily_bin119.fits
.....................!
real 192.24
user 186.33
sys 5.26

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 169 point sources and 0 extended sources

Setting source of interest to:
4FGL J1040.5+0617 @ 160.15 6.2848

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/60765/ft1_filtered_4FGL_J1040.5+0617_daily_bin119.fits scfile=/scratch/kocevski/60765/ft2_4FGL_J1040.5+0617_daily_bin119.fits outfile=/scratch/kocevski/60765/cmap_270172801_270432001_4FGL_J1040.5+0617_daily_bin119.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=160.15 yref=6.2848 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.55
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/60765/ft1_filtered_4FGL_J1040.5+0617_daily_bin119.fits scfile=/scratch/kocevski/60765/ft2_4FGL_J1040.5+0617_daily_bin119.fits outfile=/scratch/kocevski/60765/cmap_HighResolution_270172801_270432001_4FGL_J1040.5+0617_daily_bin119.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=160.15 yref=6.2848 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.55
user 0.39
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/60765/ft1_filtered_4FGL_J1040.5+0617_daily_bin119.fits evtable="EVENTS" scfile=/scratch/kocevski/60765/ft2_4FGL_J1040.5+0617_daily_bin119.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/60765/Model_4FGL_J1040.5+0617_daily_bin119.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/60765/ft1_filtered_4FGL_J1040.5+0617_daily_bin119.fits.....................!
real 77.26
user 75.70
sys 1.18

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/60765/ft1_filtered_4FGL_J1040.5+0617_daily_bin119.fits', '/scratch/kocevski/60765/ft2_4FGL_J1040.5+0617_daily_bin119.fits', expMap='/scratch/kocevski/60765/expmap_270172801_270432001_4FGL_J1040.5+0617_daily_bin119.fits', expCube='/scratch/kocevski/60765/ltcube_270172801_270432001_4FGL_J1040.5+0617_daily_bin119.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/60765/Model_4FGL_J1040.5+0617_daily_bin119.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1040.5+0617'

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.877e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.368e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/60765/ft1_filtered_4FGL_J1040.5+0617_daily_bin119.fits
Spacecraft file(s): /scratch/kocevski/60765/ft2_4FGL_J1040.5+0617_daily_bin119.fits
Exposure map: /scratch/kocevski/60765/expmap_270172801_270432001_4FGL_J1040.5+0617_daily_bin119.fits
Exposure cube: /scratch/kocevski/60765/ltcube_270172801_270432001_4FGL_J1040.5+0617_daily_bin119.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/60765/Model_4FGL_J1040.5+0617_daily_bin119.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) = 8294.30298529

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.7417       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    9.5815       1.0000         .10000E-03   10000.    
     4 'Prefactor '    34.533       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .11502E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    49.025       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10360E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .25158E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    9.2483       1.0000         .10000E-03   10000.    
    13 'norm      '    1.5692       1.0000         .10000E-03   10000.    
    14 'Prefactor '    7.4161       1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    23.393       1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1081       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .93636       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5360E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   8294.181     FROM MIGRAD    STATUS=CONVERGED    389 CALLS     1658 TOTAL
                     EDM=   .47E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.7425        9.1675        .12618E-05   -.14272E-03
   2  Prefactor     .10000E-03    57.946       -.87063E-06** at limit **
   3  norm          9.5818        11.176       -.48109E-06   -.24767E-04
   4  Prefactor     34.529        12.572       -.28252E-05   -.82676E-05
   5  Prefactor     .10000E-03    46.552        .10646E-05** at limit **
   6  Prefactor     49.036        40.122        .10578E-04   -.12235E-04
   7  Prefactor     .10000E-03    4.8054       -.37025E-07** at limit **
   8  norm          .10000E-03    .33277        .41108E-08** at limit **
   9  Prefactor     .10000E-03    2.0630       -.31940E-08** at limit **
  10  Prefactor     .10000E-03    1.7387        .54892E-07** at limit **
  11  Prefactor     .10000E-03    2.2518       -.61492E-07** at limit **
  12  Prefactor     9.2489        7.6434       -.13108E-05   -.15815E-03
  13  norm          1.5688        .83070       -.12533E-06   -.15698E-03
  14  Prefactor     7.4214        12.443        .15378E-05   -.16092E-03
  15  norm          .10000E-03    .27892       -.47023E-09** at limit **
  16  Prefactor     23.394        15.373        .17182E-06   -.55041E-05
  17  norm          .10000E-03    4.4805        .38991E-08** at limit **
  18  Normalizat    1.1079        .16192        .75501E-07   -.55683E-05
  19  Prefactor     .93658        .13478        .79111E-07   -.88730E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.74246
  Prefactor  = 0.0001
  norm       = 9.58181
  Prefactor  = 34.5287
  Prefactor  = 0.0001
  Prefactor  = 49.036
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.24886
  norm       = 1.56876
  Prefactor  = 7.42139
  norm       = 0.0001
  Prefactor  = 23.394
  norm       = 0.0001
  Normalizat = 1.10789
  Prefactor  = 0.936576
 **********
 **   18 **HESSE 
 **********

 FCN=   8294.181     FROM HESSE     STATUS=OK           274 CALLS     1932 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.7425        9.0977        .18478E-03   -1.5272    
   2  Prefactor     .10000E-03    58.525        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          9.5818        11.155        .12946E-03   -1.5089    
   4  Prefactor     34.529        12.555        .68193E-04   -1.4532    
   5  Prefactor     .10000E-03    46.713        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     49.036        40.132        .28636E-03   -1.4306    
   7  Prefactor     .10000E-03    4.8084        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .48374        .10203E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    2.0785        .12771E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    1.8126        .23397E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    16.620        .26185E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     9.2489        7.6530        .13179E-03   -1.5100    
  13  norm          1.5688        .85823        .42695E-04   -1.5457    
  14  Prefactor     7.4214        12.919        .14728E-03   -1.5163    
  15  norm          .10000E-03    .28325        .46925E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     23.394        15.384        .82817E-04   -1.4740    
  17  norm          .10000E-03    4.5060        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.1079        .18896        .25663E-03   -.89499    
  19  Prefactor     .93658        .15848        .23782E-03   -.94874    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.08092e-10
Minuit parameter uncertainties:
  1  9.10038
  2  3.6607e-06
  3  11.1571
  4  12.5563
  5  5.17244e-05
  6  40.1543
  7  6.59302e-06
  8  2.02984e-07
  9  6.50339e-08
  10  8.18149e-06
  11  0.00011852
  12  7.65385
  13  0.85824
  14  12.9236
  15  4.02694e-08
  16  15.3862
  17  5.48015e-07
  18  0.189077
  19  0.158555
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  8.181e-06  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.368e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  9.366e-01  1.586e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
532   Normalization:  1.108e+00  1.891e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 5.78e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.46e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/60765/likelihoodResults_270172801_270432001_4FGL_J1040.5+0617_daily_bin119.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) = 8294.18335775
delta logL = -0.00262520407159

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 8294.18073337
delta logL = -8.21908543003e-07

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   8294.031     FROM MIGRAD    STATUS=CONVERGED    144 CALLS      305 TOTAL
                     EDM=   .61E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .69156E-01    1.2021        .90712E-02    .51869E-02
   2  Index         4.2908        2.1969        .23884        .78229E-04
   3  Normalizat    1.0813        .18936E-01    .58636E-01    .22689E-04
   4  Prefactor     .95014        .16370E-01    .45473E-01    .28032E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0691558
  Index      = 4.29079
  Normalizat = 1.08132
  Prefactor  = 0.950136
 **********
 **   18 **HESSE 
 **********

 FCN=   8294.031     FROM HESSE     STATUS=NOT POSDEF    35 CALLS      340 TOTAL
                     EDM=   .36E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .69156E-01    12.365        .42436E-03   -1.5655    
   2  Index         4.2908        5.1597        .89004E-02   -.14232    
   3  Normalizat    1.0813        .12054        .25932E-03   -.90354    
   4  Prefactor     .95014        .10246        .23630E-03   -.94411    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.60072e-07
Minuit parameter uncertainties:
  1  1.84851
  2  13.8193
  3  0.120571
  4  0.102478
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/60765': 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): 102
logL (Free Index) = 8294.03134705
delta logL = 0.149385499251

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  6.916e-02  1.849e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  4.291e+00  1.382e+01  0.000e+00  1.000e+01 (-1.000e+00)
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  9.501e-01  1.025e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
532   Normalization:  1.081e+00  1.206e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 160.150 6.285

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/60765/cmap_HighResolution_270172801_270432001_4FGL_J1040.5+0617_daily_bin119.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.46e-03', job_status='DONE', photon_flux_upper_limit='5.78e-08', time_completed='2021-09-02 08:19:09.727624', job_id='60765', GAL2='0.95', fit_tolerance='1e-08', EG2='1.08', EG='1.11', time_epoch_completed='1630595949.73', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.94', dlogl='1.49e-01', ts2='0.31', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='119' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:19:09 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0272>
Subject: Job 60765: <4FGL_J1040.5+0617_daily_bin119> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin119> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:06:13 2021
Job was executed on host(s) <bullet0272>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:06:22 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep  2 08:06:22 2021
Terminated at Thu Sep  2 08:19:10 2021
Results reported at Thu Sep  2 08:19:10 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin119 160.15 6.2848 270172801 270432001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1040.5+0617 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   655.16 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             307.23 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   768 sec.
    Turnaround time :                            777 sec.

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

