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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1574
RA = 160.15, Dec = 6.2848
tmin = 647308801, tmax = 647568001
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='70538', job_status='RUN', time_executed='2021-09-02 08:43:37.064331', time_epoch_executed='1630597417.06' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1574'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/70538

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/70538/ft1_4FGL_J1040.5+0617_daily_bin1574.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/70538/ft2_4FGL_J1040.5+0617_daily_bin1574.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/70538/ft1_4FGL_J1040.5+0617_daily_bin1574.fits outfile=/scratch/kocevski/70538/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1574.fits ra=160.15 dec=6.2848 rad=12.0 tmin=647308801.0 tmax=647568001.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.29
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/70538/ft1_filtered_4FGL_J1040.5+0617_daily_bin1574.fits" evtable="EVENTS" scfile=/scratch/kocevski/70538/ft2_4FGL_J1040.5+0617_daily_bin1574.fits sctable="SC_DATA" outfile=/scratch/kocevski/70538/ltcube_647308801_647568001_4FGL_J1040.5+0617_daily_bin1574.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/70538/ft2_4FGL_J1040.5+0617_daily_bin1574.fits
.....................!
real 16.32
user 15.79
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/70538/ft1_filtered_4FGL_J1040.5+0617_daily_bin1574.fits evtable="EVENTS" scfile=/scratch/kocevski/70538/ft2_4FGL_J1040.5+0617_daily_bin1574.fits sctable="SC_DATA" expcube=/scratch/kocevski/70538/ltcube_647308801_647568001_4FGL_J1040.5+0617_daily_bin1574.fits outfile=/scratch/kocevski/70538/expmap_647308801_647568001_4FGL_J1040.5+0617_daily_bin1574.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/70538/ltcube_647308801_647568001_4FGL_J1040.5+0617_daily_bin1574.fits
.....................!
real 195.19
user 188.35
sys 4.77

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/70538/ft1_filtered_4FGL_J1040.5+0617_daily_bin1574.fits scfile=/scratch/kocevski/70538/ft2_4FGL_J1040.5+0617_daily_bin1574.fits outfile=/scratch/kocevski/70538/cmap_647308801_647568001_4FGL_J1040.5+0617_daily_bin1574.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.56
user 0.40
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/70538/ft1_filtered_4FGL_J1040.5+0617_daily_bin1574.fits scfile=/scratch/kocevski/70538/ft2_4FGL_J1040.5+0617_daily_bin1574.fits outfile=/scratch/kocevski/70538/cmap_HighResolution_647308801_647568001_4FGL_J1040.5+0617_daily_bin1574.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.61
user 0.42
sys 0.18

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    63.499       1.0000         .10000E-03   10000.    
     3 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    119.67       1.0000         .10000E-03   10000.    
     6 'Prefactor '    25.190       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10157E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .34045       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    8.7798       1.0000         .10000E-03   10000.    
    11 'Prefactor '    2.4953       1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.8959       1.0000         .10000E-03   10000.    
    13 'norm      '    1.2224       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    10.851       1.0000         .10000E-03   10000.    
    17 'norm      '    .10016E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .79874       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.3070       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=   6035.110     FROM MIGRAD    STATUS=CONVERGED    385 CALLS     1897 TOTAL
                     EDM=   .19E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    5.0847       -.22323E-06** at limit **
   2  Prefactor     63.508        51.443       -.11563E-05   -.38019E-04
   3  norm          .10000E-03    4.8392        .19039E-06** at limit **
   4  Prefactor     .10000E-03    4.0896        .13287E-05** at limit **
   5  Prefactor     119.63        81.661        .41892E-05   -.10395E-03
   6  Prefactor     25.236        59.651       -.11042E-04   -.10303E-03
   7  Prefactor     .10006E-03    25.383        .97700E-05** at limit **
   8  norm          .34015        1.2015        .63043E-06   -.13177E-03
   9  Prefactor     .10000E-03    6.1599        .34561E-07** at limit **
  10  Prefactor     8.7802        3.7356       -.31218E-06   -.77930E-04
  11  Prefactor     2.4970        8.7088        .67240E-06   -.24976E-04
  12  Prefactor     1.8953        7.3682        .94600E-05   -.61939E-03
  13  norm          1.2224        .58397       -.47883E-07    .78677E-04
  14  Prefactor     .10000E-03    5.9765       -.15815E-06** at limit **
  15  norm          .10000E-03    .53225       -.30280E-07** at limit **
  16  Prefactor     10.852        15.219       -.18042E-06    .76263E-05
  17  norm          .10000E-03    8.5958       -.76418E-07** at limit **
  18  Normalizat    .79846        .20924       -.71758E-06   -.13192E-03
  19  Prefactor     1.3072        .17156       -.76553E-06   -.26450E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 63.5084
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 119.633
  Prefactor  = 25.2356
  Prefactor  = 0.00010006
  norm       = 0.340151
  Prefactor  = 0.0001
  Prefactor  = 8.78025
  Prefactor  = 2.49696
  Prefactor  = 1.89532
  norm       = 1.22244
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 10.8523
  norm       = 0.0001
  Normalizat = 0.798456
  Prefactor  = 1.30724
 **********
 **   18 **HESSE 
 **********

 FCN=   6035.110     FROM HESSE     STATUS=OK           264 CALLS     2161 TOTAL
                     EDM=   .22E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    5.0954        .17106E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     63.508        51.272        .50359E-04   -1.4112    
   3  norm          .10000E-03    4.8399        .16689E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    4.1310        .15405E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     119.63        81.471        .36786E-04   -1.3516    
   6  Prefactor     25.236        59.908        .79815E-04   -1.4703    
   7  Prefactor     .10006E-03    27.593        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .34015        1.5925        .14721E-02   -1.5591    
   9  Prefactor     .10000E-03    6.3878        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     8.7802        3.7401        .93164E-04   -1.5115    
  11  Prefactor     2.4970        8.7172        .25873E-03   -1.5392    
  12  Prefactor     1.8953        7.5219        .15106E-02   -1.5433    
  13  norm          1.2224        .58187        .39139E-04   -1.5487    
  14  Prefactor     .10000E-03    6.0145        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    .54734        .11053E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     10.852        15.223        .12163E-03   -1.5049    
  17  norm          .10000E-03    8.6386        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .79846        .24456        .31514E-03   -1.0013    
  19  Prefactor     1.3072        .20231        .22075E-03   -.83092    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.1696e-08
Minuit parameter uncertainties:
  1  5.16759e-06
  2  51.308
  3  9.33816e-07
  4  0.000136422
  5  81.5474
  6  60.0517
  7  0.00258221
  8  1.47182
  9  2.19897e-05
  10  3.74023
  11  8.72158
  12  7.52565
  13  0.581875
  14  7.39955e-06
  15  1.01861e-06
  16  15.2282
  17  6.02222e-06
  18  0.244896
  19  0.202435
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  8.780e+00  3.740e+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:  1.307e+00  2.024e-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:  7.985e-01  2.449e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 16.13
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.06e-07 +/- 4.52e-08
Energy Flux (Fixed Index): 3.63e-05 +/- 1.55e-05

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) = 6033.83892376
delta logL = 1.27096551294

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6033.78996263
delta logL = 1.31992663642

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.337       1.0000         .10000E-03   10000.    
     2 'Index     '    1.8223       1.0000          .0000       10.000    
     3 'Normalizat'    .83686       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2902       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=   6033.790     FROM MIGRAD    STATUS=CONVERGED     44 CALLS      210 TOTAL
                     EDM=   .76E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.337        4.9287        .31156E-02   -.58349E-03
   2  Index         1.8223        .31117        .13890       -.12647E-04
   3  Normalizat    .83686        .19413        .69754E-01    .14831E-04
   4  Prefactor     1.2902        .16931        .50234E-01    .73227E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.3369
  Index      = 1.82231
  Normalizat = 0.836859
  Prefactor  = 1.29025
 **********
 **   18 **HESSE 
 **********

 FCN=   6033.790     FROM HESSE     STATUS=OK            31 CALLS      241 TOTAL
                     EDM=   .12E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.337        4.7458        .10893E-03   -1.5065    
   2  Index         1.8223        .32134        .57109E-02   -.68871    
   3  Normalizat    .83686        .22742        .30864E-03   -.98716    
   4  Prefactor     1.2902        .19873        .22207E-03   -.83597    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.2151e-10
Minuit parameter uncertainties:
  1  4.74596
  2  0.321714
  3  0.227677
  4  0.198847
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/70538': 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) = 6033.78996263
delta logL = 1.31992663712

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.034e+01  4.746e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.822e+00  3.217e-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:  1.290e+00  1.988e-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:  8.369e-01  2.277e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 18.76
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.82 +/- 0.32
Photon Flux (Free Index): 6.38e-08 +/- 3.85e-08
Energy Flux (Free Index): 7.15e-05 +/- 5.06e-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/70538/cmap_HighResolution_647308801_647568001_4FGL_J1040.5+0617_daily_bin1574.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.06e-07', energy_flux2='7.15e-05', photon_flux_error='4.52e-08', dlogl='1.32e+00', energy_flux='3.63e-05', photon_flux2='6.38e-08', job_status='DONE', time_completed='2021-09-02 08:52:50.510415', photon_index_error2='0.32', photon_index2='1.82', ts='16.13', fit_tolerance='1e-08', GAL='1.31', photon_index_error='0.00', energy_flux_error2='5.06e-05', EG='0.80', time_epoch_completed='1630597970.51', return_code='0', job_id='70538', GAL2='1.29', EG2='0.84', return_code2='0', energy_flux_error='1.55e-05', photon_flux_error2='3.85e-08', ts2='18.76', photon_index='2.37' WHERE bin_id='1574' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:52:50 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0286>
Subject: Job 70538: <4FGL_J1040.5+0617_daily_bin1574> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1574> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:41:12 2021
Job was executed on host(s) <bullet0286>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:41:41 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:41:41 2021
Terminated at Thu Sep  2 08:52:51 2021
Results reported at Thu Sep  2 08:52:51 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1574 160.15 6.2848 647308801 647568001 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 :                                   529.61 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             278.13 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   670 sec.
    Turnaround time :                            699 sec.

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

