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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1065
RA = 160.15, Dec = 6.2848
tmin = 515376001, tmax = 515635201
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='67976', job_status='RUN', time_executed='2021-09-02 08:35:18.381078', time_epoch_executed='1630596918.38' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1065'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/67976

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/67976/ft1_4FGL_J1040.5+0617_daily_bin1065.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/67976/ft2_4FGL_J1040.5+0617_daily_bin1065.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/67976/ft1_4FGL_J1040.5+0617_daily_bin1065.fits outfile=/scratch/kocevski/67976/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1065.fits ra=160.15 dec=6.2848 rad=12.0 tmin=515376001.0 tmax=515635201.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.46
user 3.23
sys 0.20

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/67976/ft2_4FGL_J1040.5+0617_daily_bin1065.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/67976/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1065.fits evtable="EVENTS" outfile="/scratch/kocevski/67976/ft1_filtered_4FGL_J1040.5+0617_daily_bin1065.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.49
user 0.31
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/67976/ft1_filtered_4FGL_J1040.5+0617_daily_bin1065.fits" evtable="EVENTS" scfile=/scratch/kocevski/67976/ft2_4FGL_J1040.5+0617_daily_bin1065.fits sctable="SC_DATA" outfile=/scratch/kocevski/67976/ltcube_515376001_515635201_4FGL_J1040.5+0617_daily_bin1065.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/67976/ft2_4FGL_J1040.5+0617_daily_bin1065.fits
.....................!
real 13.46
user 12.95
sys 0.37

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/67976/ft1_filtered_4FGL_J1040.5+0617_daily_bin1065.fits evtable="EVENTS" scfile=/scratch/kocevski/67976/ft2_4FGL_J1040.5+0617_daily_bin1065.fits sctable="SC_DATA" expcube=/scratch/kocevski/67976/ltcube_515376001_515635201_4FGL_J1040.5+0617_daily_bin1065.fits outfile=/scratch/kocevski/67976/expmap_515376001_515635201_4FGL_J1040.5+0617_daily_bin1065.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/67976/ltcube_515376001_515635201_4FGL_J1040.5+0617_daily_bin1065.fits
.....................!
real 192.24
user 186.42
sys 5.12

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/67976/ft1_filtered_4FGL_J1040.5+0617_daily_bin1065.fits scfile=/scratch/kocevski/67976/ft2_4FGL_J1040.5+0617_daily_bin1065.fits outfile=/scratch/kocevski/67976/cmap_515376001_515635201_4FGL_J1040.5+0617_daily_bin1065.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.53
user 0.36
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/67976/ft1_filtered_4FGL_J1040.5+0617_daily_bin1065.fits scfile=/scratch/kocevski/67976/ft2_4FGL_J1040.5+0617_daily_bin1065.fits outfile=/scratch/kocevski/67976/cmap_HighResolution_515376001_515635201_4FGL_J1040.5+0617_daily_bin1065.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.54
user 0.38
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10051E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10057E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10094E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10184E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10440E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    3.1649       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .70820E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.9656       1.0000         .10000E-03   10000.    
    11 'Prefactor '    5.8738       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.4135       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .73099       1.0000         .10000E-03   10000.    
    17 'norm      '    3.3786       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.3572       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0907       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.

 FCN=   5779.435     FROM MIGRAD    STATUS=CONVERGED    688 CALLS     1944 TOTAL
                     EDM=   .97E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    5.9613        .18108E-02** at limit **
   2  Prefactor     .10000E-03    76.274        .18142E-02** at limit **
   3  norm          .10000E-03    5.6641        .17665E-02** at limit **
   4  Prefactor     .10000E-03    7.1404        .18142E-02** at limit **
   5  Prefactor     .10000E-03    56.034        .18142E-02** at limit **
   6  Prefactor     .10000E-03    40.740        .18142E-02** at limit **
   7  Prefactor     .10000E-03    16.428        .18142E-02** at limit **
   8  norm          3.1631        2.1118        .84911E-04    .11456E-02
   9  Prefactor     .10045E-03    12.275        .58813E-01** at limit **
  10  Prefactor     2.9665        3.9648        .16543E-03   -.92843E-04
  11  Prefactor     5.8712        9.4109        .82850E-03   -.84445E-04
  12  Prefactor     .10000E-03    4.7573        .16116E-02** at limit **
  13  norm          1.4136        .55117        .34109E-04    .24065E-03
  14  Prefactor     .10000E-03    8.0286        .18142E-02** at limit **
  15  norm          .10000E-03    7.9744        .11475E-02** at limit **
  16  Prefactor     .74204        37.744        .41462E-02    .74619E-03
  17  norm          3.3778        8.0644        .22014E-03    .29179E-04
  18  Normalizat    1.3575        .26648        .26457E-03    .23542E-03
  19  Prefactor     1.0901        .22069        .25205E-03    .75668E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 3.16308
  Prefactor  = 0.000100446
  Prefactor  = 2.96647
  Prefactor  = 5.87118
  Prefactor  = 0.0001
  norm       = 1.41365
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.74204
  norm       = 3.37775
  Normalizat = 1.35753
  Prefactor  = 1.09014
 **********
 **   18 **HESSE 
 **********

 FCN=   5779.435     FROM HESSE     STATUS=OK           262 CALLS     2206 TOTAL
                     EDM=   .87E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    5.9618        .36216E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    76.285        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    5.6643        .35331E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    7.1428        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    56.038        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    40.743        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    16.430        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          3.1631        2.1118        .33964E-05   -1.5352    
   9  Prefactor     .10045E-03    10.771        .63862E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     2.9665        3.9642        .66172E-05   -1.5363    
  11  Prefactor     5.8712        9.4034        .33140E-04   -1.5223    
  12  Prefactor     .10000E-03    4.7586        .32231E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.4136        .55111        .13643E-05   -1.5470    
  14  Prefactor     .10000E-03    8.0340        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    8.1562        .22950E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .74204        37.920        .16585E-03   -1.5536    
  17  norm          3.3778        8.0641        .88054E-05   -1.5340    
  18  Normalizat    1.3575        .26656        .52913E-04   -.81865    
  19  Prefactor     1.0901        .22081        .50410E-04   -.89782    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.66205e-09
Minuit parameter uncertainties:
  1  2.94489e-05
  2  0.000265715
  3  1.17347e-05
  4  3.59034e-05
  5  8.38601e-05
  6  0.00028977
  7  6.54473e-05
  8  2.11184
  9  0.00438583
  10  3.96452
  11  9.40573
  12  1.40333e-05
  13  0.551111
  14  2.37286e-05
  15  6.55916e-05
  16  10.6155
  17  8.06669
  18  0.266833
  19  0.221
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.966e+00  3.965e+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.090e+00  2.210e-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.358e+00  2.668e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/67976/likelihoodResults_515376001_515635201_4FGL_J1040.5+0617_daily_bin1065.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) = 5779.4304182
delta logL = 0.00441515481634

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5779.4296127
delta logL = 0.00522065076348

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.0955       1.0000         .10000E-03   10000.    
     2 'Index     '    2.2697       1.0000          .0000       10.000    
     3 'Normalizat'    1.3618       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0878       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=   5779.430     FROM MIGRAD    STATUS=CONVERGED     55 CALLS      212 TOTAL
                     EDM=   .50E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.0948        136.72        .57624E-02    .42789E-03
   2  Index         2.2702        5.9173        .24438        .21120E-04
   3  Normalizat    1.3619        .70742E-01    .59741E-01   -.19687E-04
   4  Prefactor     1.0878        .56194E-01    .57053E-01   -.42179E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.09478
  Index      = 2.27024
  Normalizat = 1.36189
  Prefactor  = 1.08776
 **********
 **   18 **HESSE 
 **********

 FCN=   5779.430     FROM HESSE     STATUS=OK            33 CALLS      245 TOTAL
                     EDM=   .50E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.0948        4.3027        .17127E-03   -1.5356    
   2  Index         2.2702        .95274        .10313E-01   -.57752    
   3  Normalizat    1.3619        .25411        .26421E-03   -.81737    
   4  Prefactor     1.0878        .21768        .25228E-03   -.89859    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.01892e-10
Minuit parameter uncertainties:
  1  4.30317
  2  0.961155
  3  0.254343
  4  0.217855
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/67976': 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) = 5779.42961236
delta logL = 0.00522099728641

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.095e+00  4.303e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.270e+00  9.612e-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.088e+00  2.179e-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.362e+00  2.543e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.74
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/67976/cmap_HighResolution_515376001_515635201_4FGL_J1040.5+0617_daily_bin1065.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.11e-02', job_status='DONE', photon_flux_upper_limit='1.44e-07', time_completed='2021-09-02 08:44:53.081643', job_id='67976', GAL2='1.09', fit_tolerance='1e-08', EG2='1.36', EG='1.36', time_epoch_completed='1630597493.08', return_code2='0', ts='0.74', comment='SUCCESS', return_code='0', GAL='1.09', dlogl='5.22e-03', ts2='0.75', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='1065' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:44:53 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0276>
Subject: Job 67976: <4FGL_J1040.5+0617_daily_bin1065> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1065> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Thu Sep  2 08:31:27 2021
Job was executed on host(s) <bullet0276>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:32:35 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:32:35 2021
Terminated at Thu Sep  2 08:44:53 2021
Results reported at Thu Sep  2 08:44:53 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1065 160.15 6.2848 515376001 515635201 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 :                                   564.16 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             322.08 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   738 sec.
    Turnaround time :                            806 sec.

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

