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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin697
RA = 160.15, Dec = 6.2848
tmin = 419990401, tmax = 420249601
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='65640', job_status='RUN', time_executed='2021-09-02 08:27:49.048603', time_epoch_executed='1630596469.05' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='697'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65640

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65640/ft1_4FGL_J1040.5+0617_daily_bin697.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65640/ft2_4FGL_J1040.5+0617_daily_bin697.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65640/ft1_4FGL_J1040.5+0617_daily_bin697.fits outfile=/scratch/kocevski/65640/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin697.fits ra=160.15 dec=6.2848 rad=12.0 tmin=419990401.0 tmax=420249601.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.79
user 3.19
sys 0.20

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/65640/ft2_4FGL_J1040.5+0617_daily_bin697.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/65640/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin697.fits evtable="EVENTS" outfile="/scratch/kocevski/65640/ft1_filtered_4FGL_J1040.5+0617_daily_bin697.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/65640/ft1_filtered_4FGL_J1040.5+0617_daily_bin697.fits" evtable="EVENTS" scfile=/scratch/kocevski/65640/ft2_4FGL_J1040.5+0617_daily_bin697.fits sctable="SC_DATA" outfile=/scratch/kocevski/65640/ltcube_419990401_420249601_4FGL_J1040.5+0617_daily_bin697.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/65640/ft2_4FGL_J1040.5+0617_daily_bin697.fits
.....................!
real 15.56
user 15.15
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65640/ft1_filtered_4FGL_J1040.5+0617_daily_bin697.fits evtable="EVENTS" scfile=/scratch/kocevski/65640/ft2_4FGL_J1040.5+0617_daily_bin697.fits sctable="SC_DATA" expcube=/scratch/kocevski/65640/ltcube_419990401_420249601_4FGL_J1040.5+0617_daily_bin697.fits outfile=/scratch/kocevski/65640/expmap_419990401_420249601_4FGL_J1040.5+0617_daily_bin697.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/65640/ltcube_419990401_420249601_4FGL_J1040.5+0617_daily_bin697.fits
.....................!
real 191.55
user 186.30
sys 4.52

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/65640/ft1_filtered_4FGL_J1040.5+0617_daily_bin697.fits scfile=/scratch/kocevski/65640/ft2_4FGL_J1040.5+0617_daily_bin697.fits outfile=/scratch/kocevski/65640/cmap_419990401_420249601_4FGL_J1040.5+0617_daily_bin697.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.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65640/ft1_filtered_4FGL_J1040.5+0617_daily_bin697.fits scfile=/scratch/kocevski/65640/ft2_4FGL_J1040.5+0617_daily_bin697.fits outfile=/scratch/kocevski/65640/cmap_HighResolution_419990401_420249601_4FGL_J1040.5+0617_daily_bin697.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/65640/ft1_filtered_4FGL_J1040.5+0617_daily_bin697.fits evtable="EVENTS" scfile=/scratch/kocevski/65640/ft2_4FGL_J1040.5+0617_daily_bin697.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/65640/Model_4FGL_J1040.5+0617_daily_bin697.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/65640/ft1_filtered_4FGL_J1040.5+0617_daily_bin697.fits.....................!
real 52.88
user 50.84
sys 1.26

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    24.343       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10085E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    7.0643       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10198E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    5.1711       1.0000         .10000E-03   10000.    
     7 'Prefactor '    21.404       1.0000         .10000E-03   10000.    
     8 'norm      '    6.4281       1.0000         .10000E-03   10000.    
     9 'Prefactor '    6.4621       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    3.4800       1.0000         .10000E-03   10000.    
    13 'norm      '    1.1735       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    5.5338       1.0000         .10000E-03   10000.    
    16 'Prefactor '    6.1448       1.0000         .10000E-03   10000.    
    17 'norm      '    8.4272       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .81423       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .99971       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=   5066.589     FROM MIGRAD    STATUS=CONVERGED    405 CALLS     1930 TOTAL
                     EDM=   .16E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     24.339        16.270        .54774E-05    .40742E-04
   2  Prefactor     .10000E-03    52.302       -.39017E-05** at limit **
   3  norm          .10000E-03    8.1134       -.49869E-07** at limit **
   4  Prefactor     7.1158        13.368       -.13514E-04   -.10193E-03
   5  Prefactor     .10000E-03    28.080       -.47016E-06** at limit **
   6  Prefactor     4.7385        277.92       -.14720E-04   -.19670E-04
   7  Prefactor     21.513        26.395        .24084E-04    .59934E-04
   8  norm          6.4281        2.0458       -.82393E-07    .96892E-04
   9  Prefactor     6.4621        5.7213        .64142E-06   -.77115E-04
  10  Prefactor     .10000E-03    1.0930        .85037E-07** at limit **
  11  Prefactor     .10000E-03    2.8465       -.15673E-06** at limit **
  12  Prefactor     3.4797        6.6859       -.68769E-05   -.34253E-03
  13  norm          1.1734        .57003        .10628E-06    .25015E-03
  14  Prefactor     .10000E-03    4.2917        .10230E-06** at limit **
  15  norm          5.5338        1.9152        .13105E-06   -.46183E-04
  16  Prefactor     6.1439        22.936        .47637E-05   -.50991E-05
  17  norm          8.4271        8.7319       -.64761E-05    .10620E-04
  18  Normalizat    .81427        .20074       -.10737E-05    .90366E-04
  19  Prefactor     .99970        .16925        .63630E-06    .25207E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 24.3391
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 7.11581
  Prefactor  = 0.0001
  Prefactor  = 4.7385
  Prefactor  = 21.5128
  norm       = 6.42805
  Prefactor  = 6.46212
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.47971
  norm       = 1.17342
  Prefactor  = 0.0001
  norm       = 5.5338
  Prefactor  = 6.14388
  norm       = 8.42712
  Normalizat = 0.814266
  Prefactor  = 0.999702
 **********
 **   18 **HESSE 
 **********

 FCN=   5066.589     FROM HESSE     STATUS=OK           274 CALLS     2204 TOTAL
                     EDM=   .32E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     24.339        16.258        .81189E-04   -1.4721    
   2  Prefactor     .10000E-03    52.551        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    8.1155        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     7.1158        13.141        .15093E-03   -1.5174    
   5  Prefactor     .10000E-03    28.102        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     4.7385        258.16        .17678E-03   -1.5273    
   7  Prefactor     21.513        25.895        .86575E-04   -1.4780    
   8  norm          6.4281        2.0459        .54905E-04   -1.5201    
   9  Prefactor     6.4621        5.7164        .15447E-03   -1.5199    
  10  Prefactor     .10000E-03    1.1005        .72634E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    2.8636        .11723E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     3.4797        6.6964        .21676E-03   -1.5335    
  13  norm          1.1734        .56955        .35841E-04   -1.5491    
  14  Prefactor     .10000E-03    4.3069        .14389E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          5.5338        1.9206        .54352E-04   -1.5237    
  16  Prefactor     6.1439        22.907        .16195E-03   -1.5212    
  17  norm          8.4271        8.7279        .13809E-03   -1.5127    
  18  Normalizat    .81427        .23061        .27605E-03   -.99542    
  19  Prefactor     .99970        .19485        .22278E-03   -.92739    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.16274e-10
Minuit parameter uncertainties:
  1  16.2614
  2  3.61784e-06
  3  1.83572e-05
  4  13.1464
  5  8.50848e-05
  6  70.2719
  7  25.9086
  8  2.04597
  9  5.71691
  10  5.50613e-06
  11  2.8199e-06
  12  6.69784
  13  0.569553
  14  2.04985e-05
  15  1.92061
  16  22.9394
  17  8.72925
  18  0.230891
  19  0.194991
Done.

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

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  9.997e-01  1.950e-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.143e-01  2.309e-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: 6.29e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.85e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/65640/likelihoodResults_419990401_420249601_4FGL_J1040.5+0617_daily_bin697.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) = 5066.59363342
delta logL = -0.00428188749174

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5066.58935133
delta logL = 2.03047420655e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3538       1.0000          .0000       10.000    
     3 'Normalizat'    .81427       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .99975       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=   5066.589     FROM MIGRAD    STATUS=FAILED        96 CALLS      243 TOTAL
                     EDM=   .50E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    10.123        .73238E-02** at limit **
   2  Index         1.9202        5.2860        .50000       -.48365E-05
   3  Normalizat    .81426        .13735E-01    .27605E-03   -.11043E-02
   4  Prefactor     .99970        .12235E-01    .22278E-03   -.13482E-02
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5066.589     FROM SIMPLEX   STATUS=UNCHANGED    192 CALLS      435 TOTAL
                     EDM=   .12E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    10.123        .20280E-03** at limit **
   2  Index         1.9202        5.2860        .11514E-06   -.48365E-05
   3  Normalizat    .81426        .13735E-01    .29532E-08   -.11043E-02
   4  Prefactor     .99970        .12235E-01    .87668E-09   -.13482E-02
                               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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5066.589     FROM MIGRAD    STATUS=FAILED        68 CALLS      503 TOTAL
                     EDM=   .16E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    300.97        .15651E-03** at limit **
   2  Index         1.9201        5.0287        .50000       -.48677E-05
   3  Normalizat    .81426        .16980        .11042E-04   -.10961E-02
   4  Prefactor     .99970        .15110        .89111E-05   -.13373E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.92005
  Normalizat = 0.814263
  Prefactor  = 0.999701
 **********
 **   18 **HESSE 
 **********

 FCN=   5066.589     FROM HESSE     STATUS=OK            27 CALLS      530 TOTAL
                     EDM=   .86E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1.3347        .31302E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.9201        9.0381        .50000       -.66364    
   3  Normalizat    .81426        .21725        .22084E-05   -.99542    
   4  Prefactor     .99970        .19367        .17822E-05   -.92739    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.61468e-09
Minuit parameter uncertainties:
  1  5.07135e-06
  2  65.594
  3  0.217486
  4  0.193808
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65640': 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): 1
logL (Free Index) = 5066.58934545
delta logL = 6.0835864133e-06

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  5.071e-06  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.920e+00  6.559e+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.997e-01  1.938e-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.143e-01  2.175e-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/65640/cmap_HighResolution_419990401_420249601_4FGL_J1040.5+0617_daily_bin697.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.85e-03', job_status='DONE', photon_flux_upper_limit='6.29e-08', time_completed='2021-09-02 08:37:04.900125', job_id='65640', GAL2='1.00', fit_tolerance='1e-08', EG2='0.81', EG='0.81', time_epoch_completed='1630597024.9', return_code2='1', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.00', dlogl='6.08e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='697' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:37:04 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0124>
Subject: Job 65640: <4FGL_J1040.5+0617_daily_bin697> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin697 160.15 6.2848 419990401 420249601 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 :                                   552.00 sec.
    Max Memory :                                 1208 MB
    Average Memory :                             261.58 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   793 sec.
    Turnaround time :                            950 sec.

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

