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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin630
RA = 160.15, Dec = 6.2848
tmin = 402624001, tmax = 402883201
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='65543', job_status='RUN', time_executed='2021-09-02 08:25:46.868790', time_epoch_executed='1630596346.87' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='630'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65543

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

Retrieving the FT1 file...

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

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

Retrieving 51 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65543/ft1_4FGL_J1040.5+0617_daily_bin630.fits


Retrieving the FT1 file...

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

Retrieving 51 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65543/ft2_4FGL_J1040.5+0617_daily_bin630.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65543/ft1_4FGL_J1040.5+0617_daily_bin630.fits outfile=/scratch/kocevski/65543/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin630.fits ra=160.15 dec=6.2848 rad=12.0 tmin=402624001.0 tmax=402883201.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.81
user 3.40
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/65543/ft2_4FGL_J1040.5+0617_daily_bin630.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/65543/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin630.fits evtable="EVENTS" outfile="/scratch/kocevski/65543/ft1_filtered_4FGL_J1040.5+0617_daily_bin630.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.85
user 0.34
sys 0.13

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65543/ft1_filtered_4FGL_J1040.5+0617_daily_bin630.fits" evtable="EVENTS" scfile=/scratch/kocevski/65543/ft2_4FGL_J1040.5+0617_daily_bin630.fits sctable="SC_DATA" outfile=/scratch/kocevski/65543/ltcube_402624001_402883201_4FGL_J1040.5+0617_daily_bin630.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/65543/ft2_4FGL_J1040.5+0617_daily_bin630.fits
.....................!
real 13.96
user 13.47
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65543/ft1_filtered_4FGL_J1040.5+0617_daily_bin630.fits evtable="EVENTS" scfile=/scratch/kocevski/65543/ft2_4FGL_J1040.5+0617_daily_bin630.fits sctable="SC_DATA" expcube=/scratch/kocevski/65543/ltcube_402624001_402883201_4FGL_J1040.5+0617_daily_bin630.fits outfile=/scratch/kocevski/65543/expmap_402624001_402883201_4FGL_J1040.5+0617_daily_bin630.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/65543/ltcube_402624001_402883201_4FGL_J1040.5+0617_daily_bin630.fits
.....................!
real 193.61
user 186.29
sys 4.41

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/65543/ft1_filtered_4FGL_J1040.5+0617_daily_bin630.fits scfile=/scratch/kocevski/65543/ft2_4FGL_J1040.5+0617_daily_bin630.fits outfile=/scratch/kocevski/65543/cmap_402624001_402883201_4FGL_J1040.5+0617_daily_bin630.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/65543/ft1_filtered_4FGL_J1040.5+0617_daily_bin630.fits scfile=/scratch/kocevski/65543/ft2_4FGL_J1040.5+0617_daily_bin630.fits outfile=/scratch/kocevski/65543/cmap_HighResolution_402624001_402883201_4FGL_J1040.5+0617_daily_bin630.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.38
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .14707E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    10.154       1.0000         .10000E-03   10000.    
     3 'norm      '    16.549       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    90.178       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10086E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    5.5848       1.0000         .10000E-03   10000.    
     9 'Prefactor '    3.0645       1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.8663       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10729E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10038E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    8.8557       1.0000         .10000E-03   10000.    
    15 'norm      '    1.9315       1.0000         .10000E-03   10000.    
    16 'Prefactor '    3.9522       1.0000         .10000E-03   10000.    
    17 'norm      '    9.1872       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1155       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .96204       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=   5794.721     FROM MIGRAD    STATUS=CONVERGED    412 CALLS     1959 TOTAL
                     EDM=   .19E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    19.012        .29195E-05** at limit **
   2  Prefactor     10.012        59.614       -.11444E-03   -.43404E-05
   3  norm          16.520        19.685       -.30028E-04   -.70946E-04
   4  Prefactor     .10000E-03    4.1186        .50315E-06** at limit **
   5  Prefactor     90.218        70.720        .21187E-04   -.22651E-04
   6  Prefactor     .10000E-03    17.875       -.29685E-05** at limit **
   7  Prefactor     .10000E-03    5.1141        .15398E-06** at limit **
   8  norm          5.5865        2.0088        .58181E-06   -.22178E-04
   9  Prefactor     3.0640        8.1145        .66435E-05   -.18210E-03
  10  Prefactor     2.8667        2.3174       -.29320E-06   -.17279E-03
  11  Prefactor     .10000E-03    9.7870        .89374E-06** at limit **
  12  Prefactor     .10000E-03    2.1459       -.29867E-06** at limit **
  13  norm          .10000E-03    .31796        .61623E-07** at limit **
  14  Prefactor     8.8614        8.7675       -.33138E-05   -.31955E-03
  15  norm          1.9337        1.7879       -.15379E-05   -.19851E-02
  16  Prefactor     3.8558        50.226        .68542E-04   -.12132E-04
  17  norm          9.1884        13.088        .63011E-05   -.77783E-04
  18  Normalizat    1.1151        .20967       -.63801E-05    .13472E-03
  19  Prefactor     .96248        .16756        .53116E-05   -.55941E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100014
  Prefactor  = 10.0122
  norm       = 16.5202
  Prefactor  = 0.000100001
  Prefactor  = 90.2184
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 5.58654
  Prefactor  = 3.06399
  Prefactor  = 2.8667
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 8.86144
  norm       = 1.93373
  Prefactor  = 3.85578
  norm       = 9.18843
  Normalizat = 1.11508
  Prefactor  = 0.962481
 **********
 **   18 **HESSE 
 **********

 FCN=   5794.721     FROM HESSE     STATUS=OK           270 CALLS     2229 TOTAL
                     EDM=   .48E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10001E-03    19.309        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     10.012        59.674        .12574E-03   -1.5075    
   3  norm          16.520        19.674        .98455E-04   -1.4895    
   4  Prefactor     .10000E-03    4.1286        .15083E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     90.218        71.123        .42314E-04   -1.3805    
   6  Prefactor     .10000E-03    17.879        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    5.1160        .16812E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          5.5865        2.0044        .60765E-04   -1.5235    
   9  Prefactor     3.0640        8.0699        .23173E-03   -1.5358    
  10  Prefactor     2.8667        2.3208        .10088E-03   -1.5369    
  11  Prefactor     .10000E-03    10.099        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    2.1488        .10889E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .51945        .78072E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     8.8614        8.2694        .13469E-03   -1.5113    
  15  norm          1.9337        1.7802        .90085E-04   -1.5430    
  16  Prefactor     3.8558        49.873        .20291E-03   -1.5315    
  17  norm          9.1884        13.073        .13223E-03   -1.5102    
  18  Normalizat    1.1151        .24886        .26595E-03   -.89269    
  19  Prefactor     .96248        .19776        .24059E-03   -.93991    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.80543e-09
Minuit parameter uncertainties:
  1  0.0010375
  2  48.9594
  3  19.682
  4  9.43104e-05
  5  71.1904
  6  6.16214e-05
  7  1.5098e-05
  8  2.00443
  9  8.07279
  10  2.32085
  11  3.55104e-05
  12  1.79952e-05
  13  2.5526e-05
  14  8.27048
  15  1.78024
  16  27.7626
  17  13.0775
  18  0.24912
  19  0.197913
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.867e+00  2.321e+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

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  9.625e-01  1.979e-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.115e+00  2.491e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 9.38
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 3.46e-08 +/- 2.80e-08
Energy Flux (Fixed Index): 1.19e-05 +/- 9.60e-06

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): 0
logL (Free Index) = 5792.76204557
delta logL = 1.9593347586

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5792.69348333
delta logL = 2.02789699225

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.6141       1.0000         .10000E-03   10000.    
     2 'Index     '    1.1994       1.0000          .0000       10.000    
     3 'Normalizat'    1.1359       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .95747       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=   5792.693     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      217 TOTAL
                     EDM=   .85E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.6118        1.6574        .83326E-02   -.16313E-03
   2  Index         1.1991        .36527        .18602       -.69301E-04
   3  Normalizat    1.1359        .19388        .59653E-01    .59475E-04
   4  Prefactor     .95755        .16520        .45733E-01    .40492E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.61185
  Index      = 1.19914
  Normalizat = 1.13585
  Prefactor  = 0.957549
 **********
 **   18 **HESSE 
 **********

 FCN=   5792.693     FROM HESSE     STATUS=OK            33 CALLS      250 TOTAL
                     EDM=   .12E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.6118        2.7362        .88782E-04   -1.5454    
   2  Index         1.1991        .63737        .76683E-02   -.86358    
   3  Normalizat    1.1359        .22797        .26383E-03   -.88609    
   4  Prefactor     .95755        .19448        .24121E-03   -.94158    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.15979e-11
Minuit parameter uncertainties:
  1  2.73638
  2  0.641527
  3  0.228173
  4  0.19462
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65543': 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) = 5792.69348287
delta logL = 2.02789745809

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.612e+00  2.736e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.199e+00  6.415e-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.575e-01  1.946e-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.136e+00  2.282e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 13.42
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.20 +/- 0.64
Photon Flux (Free Index): 8.03e-09 +/- 1.15e-08
Energy Flux (Free Index): 6.73e-05 +/- 8.64e-05

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/65543/cmap_HighResolution_402624001_402883201_4FGL_J1040.5+0617_daily_bin630.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='3.46e-08', energy_flux2='6.73e-05', photon_flux_error='2.80e-08', dlogl='2.03e+00', energy_flux='1.19e-05', photon_flux2='8.03e-09', job_status='DONE', time_completed='2021-09-02 08:34:42.583962', photon_index_error2='0.64', photon_index2='1.20', ts='9.38', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', energy_flux_error2='8.64e-05', EG='1.12', time_epoch_completed='1630596882.58', return_code='0', job_id='65543', GAL2='0.96', EG2='1.14', return_code2='0', energy_flux_error='9.60e-06', photon_flux_error2='1.15e-08', ts2='13.42', photon_index='2.37' WHERE bin_id='630' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:34:42 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0254>
Subject: Job 65543: <4FGL_J1040.5+0617_daily_bin630> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin630 160.15 6.2848 402624001 402883201 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 :                                   524.11 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             314.39 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   685 sec.
    Turnaround time :                            815 sec.

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

