/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 135 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 = 7408
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin357
RA = 160.15, Dec = 6.2848
tmin = 331862401, tmax = 332121601
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='62952', job_status='RUN', time_executed='2021-09-02 08:16:35.277948', time_epoch_executed='1630595795.28' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='357'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62952

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62952/ft1_4FGL_J1040.5+0617_daily_bin357.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62952/ft2_4FGL_J1040.5+0617_daily_bin357.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62952/ft1_4FGL_J1040.5+0617_daily_bin357.fits outfile=/scratch/kocevski/62952/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin357.fits ra=160.15 dec=6.2848 rad=12.0 tmin=331862401.0 tmax=332121601.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.42
user 4.17
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/62952/ft1_filtered_4FGL_J1040.5+0617_daily_bin357.fits" evtable="EVENTS" scfile=/scratch/kocevski/62952/ft2_4FGL_J1040.5+0617_daily_bin357.fits sctable="SC_DATA" outfile=/scratch/kocevski/62952/ltcube_331862401_332121601_4FGL_J1040.5+0617_daily_bin357.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/62952/ft2_4FGL_J1040.5+0617_daily_bin357.fits
.....................!
real 14.69
user 14.31
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62952/ft1_filtered_4FGL_J1040.5+0617_daily_bin357.fits evtable="EVENTS" scfile=/scratch/kocevski/62952/ft2_4FGL_J1040.5+0617_daily_bin357.fits sctable="SC_DATA" expcube=/scratch/kocevski/62952/ltcube_331862401_332121601_4FGL_J1040.5+0617_daily_bin357.fits outfile=/scratch/kocevski/62952/expmap_331862401_332121601_4FGL_J1040.5+0617_daily_bin357.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/62952/ltcube_331862401_332121601_4FGL_J1040.5+0617_daily_bin357.fits
.....................!
real 192.82
user 188.68
sys 3.68

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/62952/ft1_filtered_4FGL_J1040.5+0617_daily_bin357.fits scfile=/scratch/kocevski/62952/ft2_4FGL_J1040.5+0617_daily_bin357.fits outfile=/scratch/kocevski/62952/cmap_331862401_332121601_4FGL_J1040.5+0617_daily_bin357.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.59
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/62952/ft1_filtered_4FGL_J1040.5+0617_daily_bin357.fits scfile=/scratch/kocevski/62952/ft2_4FGL_J1040.5+0617_daily_bin357.fits outfile=/scratch/kocevski/62952/cmap_HighResolution_331862401_332121601_4FGL_J1040.5+0617_daily_bin357.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.57
user 0.39
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    5.2965       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    24.274       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    25.561       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .39780E-01   1.0000         .10000E-03   10000.    
     9 'Prefactor '    11.725       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .73940       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    9.2271       1.0000         .10000E-03   10000.    
    13 'norm      '    3.5550       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    1.0470       1.0000         .10000E-03   10000.    
    16 'Prefactor '    4.7315       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.3083       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .81479       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=   5309.050     FROM MIGRAD    STATUS=CONVERGED    381 CALLS     1878 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.2920        15.103       -.41929E-05    .33433E-04
   2  Prefactor     .10000E-03    21.170        .13325E-06** at limit **
   3  norm          24.277        21.147        .27999E-05   -.32479E-03
   4  Prefactor     .10000E-03    7.6722       -.65318E-06** at limit **
   5  Prefactor     25.565        64.723        .62711E-05   -.86644E-04
   6  Prefactor     .10000E-03    27.970       -.32423E-06** at limit **
   7  Prefactor     .10000E-03    6.5978       -.19885E-05** at limit **
   8  norm          .39573E-01    .68707       -.18863E-06   -.16166E-03
   9  Prefactor     11.725        9.0248       -.12558E-06    .16873E-04
  10  Prefactor     .73976        3.0981       -.10574E-05   -.94545E-03
  11  Prefactor     .10000E-03    3.2681        .65551E-07** at limit **
  12  Prefactor     9.2266        7.9954       -.96941E-06   -.14440E-02
  13  norm          3.5550        .91386        .22118E-07    .14896E-03
  14  Prefactor     .10000E-03    4.8196        .43561E-07** at limit **
  15  norm          1.0470        .91438        .83810E-08    .11113E-03
  16  Prefactor     4.7300        27.606       -.35624E-05    .41653E-04
  17  norm          .10000E-03    6.8219        .23430E-05** at limit **
  18  Normalizat    1.3083        .21511        .37559E-06    .81981E-04
  19  Prefactor     .81477        .17557        .23787E-06    .73684E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.29198
  Prefactor  = 0.0001
  norm       = 24.2774
  Prefactor  = 0.0001
  Prefactor  = 25.5646
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0395727
  Prefactor  = 11.7247
  Prefactor  = 0.739762
  Prefactor  = 0.0001
  Prefactor  = 9.22661
  norm       = 3.55502
  Prefactor  = 0.0001
  norm       = 1.04699
  Prefactor  = 4.72996
  norm       = 0.000100001
  Normalizat = 1.30832
  Prefactor  = 0.814773
 **********
 **   18 **HESSE 
 **********

 FCN=   5309.050     FROM HESSE     STATUS=OK           270 CALLS     2148 TOTAL
                     EDM=   .23E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.2920        14.942        .17464E-03   -1.5248    
   2  Prefactor     .10000E-03    21.185        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          24.277        20.628        .81303E-04   -1.4722    
   4  Prefactor     .10000E-03    7.7292        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     25.565        64.258        .79234E-04   -1.4696    
   6  Prefactor     .10000E-03    27.996        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    6.4959        .18130E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .39573E-01    4.7050        .11622E-02   -1.5668    
   9  Prefactor     11.725        9.0058        .11699E-03   -1.5023    
  10  Prefactor     .73976        3.3600        .24925E-03   -1.5536    
  11  Prefactor     .10000E-03    3.3046        .12859E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     9.2266        8.5959        .65969E-03   -1.5100    
  13  norm          3.5550        .91463        .33577E-04   -1.5331    
  14  Prefactor     .10000E-03    4.8297        .15611E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.0470        .94141        .62830E-03   -1.5503    
  16  Prefactor     4.7300        27.541        .18498E-03   -1.5273    
  17  norm          .10000E-03    6.6817        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.3083        .25526        .24862E-03   -.83318    
  19  Prefactor     .81477        .20720        .26057E-03   -.99186    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.33907e-08
Minuit parameter uncertainties:
  1  14.953
  2  1.36721e-05
  3  20.6345
  4  3.10567e-06
  5  64.4328
  6  3.18854e-05
  7  9.48189e-05
  8  0.861973
  9  9.00688
  10  3.15322
  11  4.67881e-06
  12  8.59709
  13  0.914634
  14  3.50003e-06
  15  0.941428
  16  22.8428
  17  0.000131704
  18  0.255502
  19  0.207396
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  7.398e-01  3.153e+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.148e-01  2.074e-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.308e+00  2.555e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.06
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.08e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.34e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/62952/likelihoodResults_331862401_332121601_4FGL_J1040.5+0617_daily_bin357.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) = 5309.00958499
delta logL = 0.0399626976805

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5309.00847477
delta logL = 0.0410729186751

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .66067       1.0000         .10000E-03   10000.    
     2 'Index     '    2.8717       1.0000          .0000       10.000    
     3 'Normalizat'    1.2987       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .81927       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=   5309.008     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      212 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .65965        33.102        .11910E-01    .83203E-03
   2  Index         2.8708        2.9447        .32446       -.95155E-05
   3  Normalizat    1.2992        .28052E-01    .56384E-01    .12213E-04
   4  Prefactor     .81890        .23970E-01    .43967E-01   -.62360E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.659646
  Index      = 2.87081
  Normalizat = 1.29924
  Prefactor  = 0.818904
 **********
 **   18 **HESSE 
 **********

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

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .65965        2.7476        .15776E-03   -1.5546    
   2  Index         2.8708        1.9874        .97115E-02   -.43989    
   3  Normalizat    1.2992        .24443        .24933E-03   -.83589    
   4  Prefactor     .81890        .20585        .25996E-03   -.99035    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.46786e-10
Minuit parameter uncertainties:
  1  2.69255
  2  2.05756
  3  0.244645
  4  0.206039
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62952': 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) = 5309.00847209
delta logL = 0.0410755942694

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  6.596e-01  2.693e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.871e+00  2.058e+00  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.189e-01  2.060e-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.299e+00  2.446e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.06
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/62952/cmap_HighResolution_331862401_332121601_4FGL_J1040.5+0617_daily_bin357.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.34e-03', job_status='DONE', photon_flux_upper_limit='1.08e-07', time_completed='2021-09-02 08:25:45.173550', job_id='62952', GAL2='0.82', fit_tolerance='1e-08', EG2='1.30', EG='1.31', time_epoch_completed='1630596345.17', return_code2='0', ts='0.06', comment='SUCCESS', return_code='0', GAL='0.81', dlogl='4.11e-02', ts2='0.15', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='357' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:25:45 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0218>
Subject: Job 62952: <4FGL_J1040.5+0617_daily_bin357> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin357> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:11:26 2021
Job was executed on host(s) <bullet0218>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:14:10 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:14:10 2021
Terminated at Thu Sep  2 08:25:45 2021
Results reported at Thu Sep  2 08:25:45 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin357 160.15 6.2848 331862401 332121601 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 :                                   546.46 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             286.79 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   695 sec.
    Turnaround time :                            859 sec.

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

