/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 107 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 = 7431
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin743
RA = 160.15, Dec = 6.2848
tmin = 431913601, tmax = 432172801
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='65698', job_status='RUN', time_executed='2021-09-02 08:25:59.098119', time_epoch_executed='1630596359.1' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='743'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65698

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65698/ft1_4FGL_J1040.5+0617_daily_bin743.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65698/ft2_4FGL_J1040.5+0617_daily_bin743.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65698/ft1_4FGL_J1040.5+0617_daily_bin743.fits outfile=/scratch/kocevski/65698/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin743.fits ra=160.15 dec=6.2848 rad=12.0 tmin=431913601.0 tmax=432172801.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 5.40
user 5.03
sys 0.28

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65698/ft1_filtered_4FGL_J1040.5+0617_daily_bin743.fits" evtable="EVENTS" scfile=/scratch/kocevski/65698/ft2_4FGL_J1040.5+0617_daily_bin743.fits sctable="SC_DATA" outfile=/scratch/kocevski/65698/ltcube_431913601_432172801_4FGL_J1040.5+0617_daily_bin743.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/65698/ft2_4FGL_J1040.5+0617_daily_bin743.fits
.....................!
real 14.92
user 14.43
sys 0.39

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65698/ft1_filtered_4FGL_J1040.5+0617_daily_bin743.fits evtable="EVENTS" scfile=/scratch/kocevski/65698/ft2_4FGL_J1040.5+0617_daily_bin743.fits sctable="SC_DATA" expcube=/scratch/kocevski/65698/ltcube_431913601_432172801_4FGL_J1040.5+0617_daily_bin743.fits outfile=/scratch/kocevski/65698/expmap_431913601_432172801_4FGL_J1040.5+0617_daily_bin743.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/65698/ltcube_431913601_432172801_4FGL_J1040.5+0617_daily_bin743.fits
.....................!
real 192.58
user 186.18
sys 5.83

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/65698/ft1_filtered_4FGL_J1040.5+0617_daily_bin743.fits scfile=/scratch/kocevski/65698/ft2_4FGL_J1040.5+0617_daily_bin743.fits outfile=/scratch/kocevski/65698/cmap_431913601_432172801_4FGL_J1040.5+0617_daily_bin743.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/65698/ft1_filtered_4FGL_J1040.5+0617_daily_bin743.fits scfile=/scratch/kocevski/65698/ft2_4FGL_J1040.5+0617_daily_bin743.fits outfile=/scratch/kocevski/65698/cmap_HighResolution_431913601_432172801_4FGL_J1040.5+0617_daily_bin743.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.56
user 0.39
sys 0.15

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/65698/ft1_filtered_4FGL_J1040.5+0617_daily_bin743.fits', '/scratch/kocevski/65698/ft2_4FGL_J1040.5+0617_daily_bin743.fits', expMap='/scratch/kocevski/65698/expmap_431913601_432172801_4FGL_J1040.5+0617_daily_bin743.fits', expCube='/scratch/kocevski/65698/ltcube_431913601_432172801_4FGL_J1040.5+0617_daily_bin743.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/65698/Model_4FGL_J1040.5+0617_daily_bin743.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/65698/ft1_filtered_4FGL_J1040.5+0617_daily_bin743.fits
Spacecraft file(s): /scratch/kocevski/65698/ft2_4FGL_J1040.5+0617_daily_bin743.fits
Exposure map: /scratch/kocevski/65698/expmap_431913601_432172801_4FGL_J1040.5+0617_daily_bin743.fits
Exposure cube: /scratch/kocevski/65698/ltcube_431913601_432172801_4FGL_J1040.5+0617_daily_bin743.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/65698/Model_4FGL_J1040.5+0617_daily_bin743.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) = 6066.82061232

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    19.979       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    20.474       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10026E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    6.6769       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .14246E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10102E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.3047       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10141E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    3.4764       1.0000         .10000E-03   10000.    
    16 'Prefactor '    97.620       1.0000         .10000E-03   10000.    
    17 'norm      '    25.682       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0986       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2201       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=   6066.709     FROM MIGRAD    STATUS=CONVERGED    383 CALLS     1624 TOTAL
                     EDM=   .27E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     19.961        18.900       -.83065E-05   -.30894E-04
   2  Prefactor     .10000E-03    15.673       -.30212E-05** at limit **
   3  norm          20.471        18.698        .52470E-05   -.27622E-05
   4  Prefactor     .10000E-03    6.5631       -.36257E-06** at limit **
   5  Prefactor     .10000E-03    40.754        .12823E-04** at limit **
   6  Prefactor     .10000E-03    16.126        .35526E-05** at limit **
   7  Prefactor     .10000E-03    5.0932        .10871E-06** at limit **
   8  norm          6.6759        2.0815       -.18000E-06    .72135E-03
   9  Prefactor     .10007E-03    5.4144       -.17911E-05** at limit **
  10  Prefactor     .10000E-03    1.8267        .20986E-06** at limit **
  11  Prefactor     .10000E-03    2.6816       -.19462E-07** at limit **
  12  Prefactor     .10000E-03    4.7315       -.26519E-06** at limit **
  13  norm          1.3044        .70508        .29362E-07    .24189E-03
  14  Prefactor     .10000E-03    8.9287        .32437E-06** at limit **
  15  norm          3.4758        1.9401        .18506E-06   -.27052E-04
  16  Prefactor     97.597        38.822       -.17884E-04    .53665E-05
  17  norm          25.681        16.800       -.74799E-06    .86607E-05
  18  Normalizat    1.0992        .22805        .61531E-05    .25486E-04
  19  Prefactor     1.2195        .18962        .20271E-06    .34354E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 19.9606
  Prefactor  = 0.0001
  norm       = 20.471
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 6.67588
  Prefactor  = 0.000100071
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.30442
  Prefactor  = 0.0001
  norm       = 3.4758
  Prefactor  = 97.5969
  norm       = 25.6811
  Normalizat = 1.09922
  Prefactor  = 1.2195
 **********
 **   18 **HESSE 
 **********

 FCN=   6066.709     FROM HESSE     STATUS=OK           268 CALLS     1892 TOTAL
                     EDM=   .21E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     19.961        18.958        .89607E-04   -1.4814    
   2  Prefactor     .10000E-03    15.683        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          20.471        18.685        .44260E-03   -1.4803    
   4  Prefactor     .10000E-03    6.6059        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    40.831        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    16.128        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    5.0943        .17168E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          6.6759        2.0716        .59799E-04   -1.5191    
   9  Prefactor     .10007E-03    41.380        .34547E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    1.8518        .10273E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    2.6881        .12454E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    4.7538        .16540E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.3044        .69976        .45700E-04   -1.5480    
  14  Prefactor     .10000E-03    8.9780        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          3.4758        1.9367        .77031E-04   -1.5335    
  16  Prefactor     97.597        38.827        .20342E-03   -1.3729    
  17  norm          25.681        16.796        .79047E-04   -1.4694    
  18  Normalizat    1.0992        .27144        .30614E-03   -.89777    
  19  Prefactor     1.2195        .22731        .25295E-03   -.85733    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.10396e-09
Minuit parameter uncertainties:
  1  18.9638
  2  1.5102e-05
  3  18.6899
  4  4.55108e-06
  5  1.31755e-06
  6  8.57285e-07
  7  1.27033e-06
  8  2.0716
  9  0.00342398
  10  2.19539e-06
  11  7.78006e-06
  12  2.23955e-05
  13  0.699764
  14  3.1886e-05
  15  1.93672
  16  38.8373
  17  16.7989
  18  0.27179
  19  0.227493
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  2.195e-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:  1.220e+00  2.275e-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.099e+00  2.718e-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: 8.31e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.41e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/65698/likelihoodResults_431913601_432172801_4FGL_J1040.5+0617_daily_bin743.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) = 6066.71201381
delta logL = -0.00255661298979

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6066.70945727
delta logL = -7.46340447222e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10133E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3862       1.0000          .0000       10.000    
     3 'Normalizat'    1.0993       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2195       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.

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

 FCN=   6066.709     FROM MIGRAD    STATUS=FAILED        90 CALLS      245 TOTAL
                     EDM=   .74E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10002E-03    404.59        .10414E-02** at limit **
   2  Index         2.4058        5.1072        .50000       -.92391E-04
   3  Normalizat    1.0992        .14442        .30614E-03   -.31082E-04
   4  Prefactor     1.2195        .12536        .25295E-03    .21169E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6066.709     FROM SIMPLEX   STATUS=UNCHANGED    173 CALLS      418 TOTAL
                     EDM=   .12E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10002E-03    404.59        .23007E-03** at limit **
   2  Index         2.4058        5.1072        .11936E-04   -.92391E-04
   3  Normalizat    1.0992        .14442        .69855E-06   -.31082E-04
   4  Prefactor     1.2195        .12536        .58657E-06    .21169E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6066.477     FROM MIGRAD    STATUS=CONVERGED    261 CALLS      679 TOTAL
                     EDM=   .12E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .45995E-01    5.5118        .24820E-04    .12889E-02
   2  Index         4.8629        6.9067        .70894E-02   -.31808E-04
   3  Normalizat    1.0409        .24459        .24491E-05   -.18568E-05
   4  Prefactor     1.2514        .20625        .20236E-05    .55058E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0459951
  Index      = 4.86289
  Normalizat = 1.04093
  Prefactor  = 1.25141
 **********
 **   18 **HESSE 
 **********

 FCN=   6066.477     FROM HESSE     STATUS=OK            25 CALLS      704 TOTAL
                     EDM=   .13E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .45995E-01    .32309        .99281E-06   -1.5751    
   2  Index         4.8629        2.5360        .28357E-03   -.27425E-01
   3  Normalizat    1.0409        .26578        .48983E-06   -.91672    
   4  Prefactor     1.2514        .22414        .40471E-06   -.84764    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.33039e-10
Minuit parameter uncertainties:
  1  0.243545
  2  2.65977
  3  0.266123
  4  0.224313
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65698': 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) = 6066.47713792
delta logL = 0.232319278307

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.600e-02  2.435e-01  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  4.863e+00  2.660e+00  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:  1.251e+00  2.243e-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.041e+00  2.661e-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  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/65698/cmap_HighResolution_431913601_432172801_4FGL_J1040.5+0617_daily_bin743.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.41e-03', job_status='DONE', photon_flux_upper_limit='8.31e-08', time_completed='2021-09-02 08:35:57.729829', job_id='65698', GAL2='1.25', fit_tolerance='1e-08', EG2='1.04', EG='1.10', time_epoch_completed='1630596957.73', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.22', dlogl='2.32e-01', ts2='0.52', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='743' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:35:57 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0221>
Subject: Job 65698: <4FGL_J1040.5+0617_daily_bin743> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin743> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:21:21 2021
Job was executed on host(s) <bullet0221>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:24:03 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:24:03 2021
Terminated at Thu Sep  2 08:35:58 2021
Results reported at Thu Sep  2 08:35:58 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin743 160.15 6.2848 431913601 432172801 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 :                                   598.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             287.70 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   714 sec.
    Turnaround time :                            877 sec.

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

