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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1150
RA = 160.15, Dec = 6.2848
tmin = 537408001, tmax = 537667201
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='68097', job_status='RUN', time_executed='2021-09-02 08:37:41.652229', time_epoch_executed='1630597061.65' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1150'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/68097

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/68097/ft1_4FGL_J1040.5+0617_daily_bin1150.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/68097/ft2_4FGL_J1040.5+0617_daily_bin1150.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/68097/ft1_4FGL_J1040.5+0617_daily_bin1150.fits outfile=/scratch/kocevski/68097/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1150.fits ra=160.15 dec=6.2848 rad=12.0 tmin=537408001.0 tmax=537667201.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 4.59
user 4.30
sys 0.22

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/68097/ft2_4FGL_J1040.5+0617_daily_bin1150.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/68097/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1150.fits evtable="EVENTS" outfile="/scratch/kocevski/68097/ft1_filtered_4FGL_J1040.5+0617_daily_bin1150.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.51
user 0.35
sys 0.15

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/68097/ft1_filtered_4FGL_J1040.5+0617_daily_bin1150.fits evtable="EVENTS" scfile=/scratch/kocevski/68097/ft2_4FGL_J1040.5+0617_daily_bin1150.fits sctable="SC_DATA" expcube=/scratch/kocevski/68097/ltcube_537408001_537667201_4FGL_J1040.5+0617_daily_bin1150.fits outfile=/scratch/kocevski/68097/expmap_537408001_537667201_4FGL_J1040.5+0617_daily_bin1150.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/68097/ltcube_537408001_537667201_4FGL_J1040.5+0617_daily_bin1150.fits
.....................!
real 193.32
user 186.89
sys 5.10

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/68097/ft1_filtered_4FGL_J1040.5+0617_daily_bin1150.fits scfile=/scratch/kocevski/68097/ft2_4FGL_J1040.5+0617_daily_bin1150.fits outfile=/scratch/kocevski/68097/cmap_537408001_537667201_4FGL_J1040.5+0617_daily_bin1150.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/68097/ft1_filtered_4FGL_J1040.5+0617_daily_bin1150.fits scfile=/scratch/kocevski/68097/ft2_4FGL_J1040.5+0617_daily_bin1150.fits outfile=/scratch/kocevski/68097/cmap_HighResolution_537408001_537667201_4FGL_J1040.5+0617_daily_bin1150.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.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    11.810       1.0000         .10000E-03   10000.    
     2 'Prefactor '    27.626       1.0000         .10000E-03   10000.    
     3 'norm      '    .10014E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    22.439       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10051E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.8560       1.0000         .10000E-03   10000.    
     9 'Prefactor '    6.8024       1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.4856       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10034E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .97815       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    1.1313       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    8.4016       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2242       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .80901       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=   6093.037     FROM MIGRAD    STATUS=CONVERGED    379 CALLS     1834 TOTAL
                     EDM=   .45E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     11.807        12.673        .23606E-05    .36747E-04
   2  Prefactor     27.625        25.935       -.71251E-06    .53879E-05
   3  norm          .10000E-03    4.8898        .20976E-06** at limit **
   4  Prefactor     .10000E-03    4.0805        .46121E-06** at limit **
   5  Prefactor     22.415        62.086       -.44169E-04    .39748E-05
   6  Prefactor     .10000E-03    24.322        .86988E-06** at limit **
   7  Prefactor     .10000E-03    6.0408        .42750E-06** at limit **
   8  norm          2.8559        1.6733       -.27517E-08   -.15337E-03
   9  Prefactor     6.8015        7.0670       -.61814E-06   -.17101E-03
  10  Prefactor     3.4851        3.4582        .78363E-06   -.26906E-03
  11  Prefactor     .10000E-03    10.216       -.22640E-06** at limit **
  12  Prefactor     .10000E-03    2.2372        .13723E-06** at limit **
  13  norm          .97819        .51359       -.78522E-07   -.33743E-03
  14  Prefactor     .10000E-03    2.5659        .16272E-06** at limit **
  15  norm          1.1312        1.4141       -.40501E-06   -.10072E-02
  16  Prefactor     .10000E-03    13.815        .93315E-07** at limit **
  17  norm          8.4015        8.8536       -.17791E-06   -.40734E-05
  18  Normalizat    1.2244        .19589        .46719E-05   -.22908E-03
  19  Prefactor     .80889        .15385       -.18867E-05    .22265E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 11.8068
  Prefactor  = 27.6255
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 22.4154
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 2.85588
  Prefactor  = 6.80148
  Prefactor  = 3.48507
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.978189
  Prefactor  = 0.0001
  norm       = 1.1312
  Prefactor  = 0.0001
  norm       = 8.40147
  Normalizat = 1.22444
  Prefactor  = 0.808892
 **********
 **   18 **HESSE 
 **********

 FCN=   6093.037     FROM HESSE     STATUS=OK           268 CALLS     2102 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     11.807        12.661        .11657E-03   -1.5021    
   2  Prefactor     27.625        25.931        .76221E-04   -1.4656    
   3  norm          .10000E-03    4.8917        .16858E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    4.0953        .15405E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     22.415        62.244        .84559E-04   -1.4761    
   6  Prefactor     .10000E-03    24.357        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    6.0481        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.8559        1.6670        .72849E-04   -1.5370    
   9  Prefactor     6.8015        7.0744        .15384E-03   -1.5186    
  10  Prefactor     3.4851        3.4474        .13663E-03   -1.5335    
  11  Prefactor     .10000E-03    10.568        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    2.2408        .11399E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .97819        .50996        .38796E-04   -1.5510    
  14  Prefactor     .10000E-03    2.5705        .12205E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.1312        1.3950        .97653E-04   -1.5495    
  16  Prefactor     .10000E-03    13.861        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          8.4015        8.8491        .13830E-03   -1.5128    
  18  Normalizat    1.2244        .22827        .24532E-03   -.85851    
  19  Prefactor     .80889        .17946        .24664E-03   -.99401    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.10936e-09
Minuit parameter uncertainties:
  1  12.6644
  2  25.9418
  3  3.07702e-05
  4  7.37716e-05
  5  62.4249
  6  0.000268468
  7  5.45548e-05
  8  1.66701
  9  7.07528
  10  3.44758
  11  6.98932e-05
  12  4.68962e-06
  13  0.509965
  14  4.31869e-06
  15  1.39503
  16  3.60479e-05
  17  8.85049
  18  0.228456
  19  0.179587
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.485e+00  3.448e+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:  8.089e-01  1.796e-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.224e+00  2.285e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.42
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 4.21e-08 +/- 4.16e-08
Energy Flux (Fixed Index): 1.44e-05 +/- 1.43e-05

TS (Fixed Index): 1.42
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.32e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.02e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/68097/likelihoodResults_537408001_537667201_4FGL_J1040.5+0617_daily_bin1150.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): 0
logL (Free Index) = 6093.01666046
delta logL = 0.0207658122727

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6093.0114254
delta logL = 0.0260008774403

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.1459       1.0000         .10000E-03   10000.    
     2 'Index     '    2.5195       1.0000          .0000       10.000    
     3 'Normalizat'    1.2186       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .81186       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=   6093.011     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      211 TOTAL
                     EDM=   .26E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.1423        92.882        .57136E-02    .54351E-03
   2  Index         2.5196        6.1971        .16329        .94618E-04
   3  Normalizat    1.2184        .74308E-01    .55596E-01    .62301E-04
   4  Prefactor     .81216        .60313E-01    .43871E-01   -.73627E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.14232
  Index      = 2.5196
  Normalizat = 1.21836
  Prefactor  = 0.812159
 **********
 **   18 **HESSE 
 **********

 FCN=   6093.011     FROM HESSE     STATUS=OK            33 CALLS      244 TOTAL
                     EDM=   .91E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.1423        3.7225        .12631E-03   -1.5353    
   2  Index         2.5196        .70975        .83378E-02   -.51908    
   3  Normalizat    1.2184        .21421        .24584E-03   -.86037    
   4  Prefactor     .81216        .17759        .24619E-03   -.99282    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.11504e-11
Minuit parameter uncertainties:
  1  3.72279
  2  0.712955
  3  0.214365
  4  0.177719
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/68097': 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) = 6093.01142319
delta logL = 0.0260030886357

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.142e+00  3.723e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.520e+00  7.130e-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:  8.122e-01  1.777e-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.218e+00  2.144e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.47
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.52 +/- 0.71
Photon Flux (Free Index): 4.74e-08 +/- 4.91e-08
Energy Flux (Free Index): 1.35e-05 +/- 1.40e-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/68097/cmap_HighResolution_537408001_537667201_4FGL_J1040.5+0617_daily_bin1150.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.02e-02', comment='SUCCESS', photon_flux='4.21e-08', energy_flux2='1.35e-05', photon_flux_error='4.16e-08', dlogl='2.60e-02', energy_flux='1.44e-05', photon_flux2='4.74e-08', job_status='DONE', time_completed='2021-09-02 08:47:34.297035', photon_index_error2='0.71', photon_index2='2.52', ts='1.42', fit_tolerance='1e-08', GAL='0.81', photon_index_error='0.00', photon_flux_upper_limit='1.32e-07', energy_flux_error2='1.40e-05', EG='1.22', time_epoch_completed='1630597654.3', return_code='0', job_id='68097', GAL2='0.81', EG2='1.22', return_code2='0', energy_flux_error='1.43e-05', photon_flux_error2='4.91e-08', ts2='1.47', photon_index='2.37' WHERE bin_id='1150' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:47:34 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0089>
Subject: Job 68097: <4FGL_J1040.5+0617_daily_bin1150> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1150> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Thu Sep  2 08:31:36 2021
Job was executed on host(s) <bullet0089>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:33:42 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:33:42 2021
Terminated at Thu Sep  2 08:47:34 2021
Results reported at Thu Sep  2 08:47:34 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1150 160.15 6.2848 537408001 537667201 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 :                                   571.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             256.26 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   832 sec.
    Turnaround time :                            958 sec.

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

