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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin659
RA = 160.15, Dec = 6.2848
tmin = 410140801, tmax = 410400001
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='65587', job_status='RUN', time_executed='2021-09-02 08:25:37.558529', time_epoch_executed='1630596337.56' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='659'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65587

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65587/ft1_4FGL_J1040.5+0617_daily_bin659.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65587/ft2_4FGL_J1040.5+0617_daily_bin659.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65587/ft1_4FGL_J1040.5+0617_daily_bin659.fits outfile=/scratch/kocevski/65587/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin659.fits ra=160.15 dec=6.2848 rad=12.0 tmin=410140801.0 tmax=410400001.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 6.91
user 6.65
sys 0.24

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/65587/ft2_4FGL_J1040.5+0617_daily_bin659.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/65587/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin659.fits evtable="EVENTS" outfile="/scratch/kocevski/65587/ft1_filtered_4FGL_J1040.5+0617_daily_bin659.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.62
user 0.34
sys 0.14

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65587/ft1_filtered_4FGL_J1040.5+0617_daily_bin659.fits evtable="EVENTS" scfile=/scratch/kocevski/65587/ft2_4FGL_J1040.5+0617_daily_bin659.fits sctable="SC_DATA" expcube=/scratch/kocevski/65587/ltcube_410140801_410400001_4FGL_J1040.5+0617_daily_bin659.fits outfile=/scratch/kocevski/65587/expmap_410140801_410400001_4FGL_J1040.5+0617_daily_bin659.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/65587/ltcube_410140801_410400001_4FGL_J1040.5+0617_daily_bin659.fits
.....................!
real 191.80
user 187.22
sys 4.11

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/65587/ft1_filtered_4FGL_J1040.5+0617_daily_bin659.fits scfile=/scratch/kocevski/65587/ft2_4FGL_J1040.5+0617_daily_bin659.fits outfile=/scratch/kocevski/65587/cmap_410140801_410400001_4FGL_J1040.5+0617_daily_bin659.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.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65587/ft1_filtered_4FGL_J1040.5+0617_daily_bin659.fits scfile=/scratch/kocevski/65587/ft2_4FGL_J1040.5+0617_daily_bin659.fits outfile=/scratch/kocevski/65587/cmap_HighResolution_410140801_410400001_4FGL_J1040.5+0617_daily_bin659.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.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    7.9566       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10066E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10078E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    3.5576       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10165E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10094E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.5627       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10962E-02   1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.6701       1.0000         .10000E-03   10000.    
    11 'Prefactor '    15.003       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10100E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.8209       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10702E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    24.439       1.0000         .10000E-03   10000.    
    17 'norm      '    2.4194       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1286       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .96349       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=   4666.391     FROM MIGRAD    STATUS=CONVERGED    384 CALLS     1627 TOTAL
                     EDM=   .10E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     7.9590        9.1940        .35536E-02    .34745E-03
   2  Prefactor     .10000E-03    53.194        .90712E-02** at limit **
   3  norm          .10000E-03    7.0075        .90712E-02** at limit **
   4  Prefactor     3.5493        11.192        .53571E-02   -.30893E-03
   5  Prefactor     .10007E-03    19.918        .90712E-02** at limit **
   6  Prefactor     .10003E-03    20.353        .90712E-02** at limit **
   7  Prefactor     .10000E-03    7.7883        .90712E-02** at limit **
   8  norm          2.5639        1.9677        .63752E-02    .25906E-03
   9  Prefactor     .10016E-03    7.9186        .59705E-01** at limit **
  10  Prefactor     2.6677        3.8254        .62352E-02    .47507E-03
  11  Prefactor     15.001        7.8145        .25851E-02   -.42055E-04
  12  Prefactor     .10000E-03    8.8007        .90712E-02** at limit **
  13  norm          1.8207        .75561        .77361E-02    .22375E-04
  14  Prefactor     .10000E-03    7.1715        .90712E-02** at limit **
  15  norm          .10000E-03    .81788        .37030E-01** at limit **
  16  Prefactor     24.434        20.370        .20257E-02    .11523E-02
  17  norm          2.4183        16.718        .65787E-02    .26746E-03
  18  Normalizat    1.1288        .21770        .58078E-01   -.17847E-05
  19  Prefactor     .96344        .18121        .45809E-01   -.70391E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 7.95896
  Prefactor  = 0.000100001
  norm       = 0.000100002
  Prefactor  = 3.54931
  Prefactor  = 0.000100066
  Prefactor  = 0.000100028
  Prefactor  = 0.0001
  norm       = 2.56391
  Prefactor  = 0.000100161
  Prefactor  = 2.6677
  Prefactor  = 15.0013
  Prefactor  = 0.0001
  norm       = 1.82067
  Prefactor  = 0.000100002
  norm       = 0.0001
  Prefactor  = 24.4341
  norm       = 2.41829
  Normalizat = 1.1288
  Prefactor  = 0.963444
 **********
 **   18 **HESSE 
 **********

 FCN=   4666.391     FROM HESSE     STATUS=OK           268 CALLS     1895 TOTAL
                     EDM=   .14E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     7.9590        9.1810        .14215E-03   -1.5144    
   2  Prefactor     .10000E-03    53.302        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    7.0119        .17655E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     3.5493        11.148        .21428E-03   -1.5331    
   5  Prefactor     .10007E-03    19.927        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10003E-03    20.354        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    7.7920        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.5639        1.9462        .79166E-04   -1.5388    
   9  Prefactor     .10016E-03    27.584        .36474E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     2.6677        3.8160        .15090E-03   -1.5381    
  11  Prefactor     15.001        7.8304        .10341E-03   -1.4933    
  12  Prefactor     .10000E-03    8.9146        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.8207        .75379        .36604E-04   -1.5438    
  14  Prefactor     .10000E-03    7.1984        .17844E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    5.3994        .11714E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     24.434        20.365        .81030E-04   -1.4719    
  17  norm          2.4183        16.527        .26315E-03   -1.5397    
  18  Normalizat    1.1288        .25130        .25684E-03   -.88832    
  19  Prefactor     .96344        .21113        .23942E-03   -.93958    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.41316e-08
Minuit parameter uncertainties:
  1  9.18259
  2  0.000352315
  3  0.000213374
  4  11.1543
  5  0.00229189
  6  0.00150729
  7  4.38105e-05
  8  1.94627
  9  0.00421621
  10  3.81635
  11  7.83094
  12  0.000101705
  13  0.753795
  14  0.00023774
  15  3.8069e-06
  16  20.3703
  17  12.6487
  18  0.251567
  19  0.211309
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.668e+00  3.816e+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:  9.634e-01  2.113e-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.129e+00  2.516e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/65587/likelihoodResults_410140801_410400001_4FGL_J1040.5+0617_daily_bin659.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) = 4666.09447072
delta logL = 0.296587468987

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4666.08412062
delta logL = 0.306937565857

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.3735       1.0000         .10000E-03   10000.    
     2 'Index     '    3.2016       1.0000          .0000       10.000    
     3 'Normalizat'    1.0919       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .98314       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=   4666.084     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      245 TOTAL
                     EDM=   .52E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.3757        32.185        .92955E-02    .15566E-02
   2  Index         3.2017        6.5516        .13138        .19675E-03
   3  Normalizat    1.0915        .62448E-01    .58905E-01   -.93200E-05
   4  Prefactor     .98336        .53617E-01    .46056E-01   -.26986E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.37569
  Index      = 3.20168
  Normalizat = 1.09154
  Prefactor  = 0.983355
 **********
 **   18 **HESSE 
 **********

 FCN=   4666.084     FROM HESSE     STATUS=OK            33 CALLS      278 TOTAL
                     EDM=   .26E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.3757        3.9118        .76880E-04   -1.5473    
   2  Index         3.2017        1.6498        .67948E-02   -.36791    
   3  Normalizat    1.0915        .24919        .26050E-03   -.90024    
   4  Prefactor     .98336        .21283        .23720E-03   -.93286    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.63396e-10
Minuit parameter uncertainties:
  1  3.91256
  2  1.6863
  3  0.249459
  4  0.213015
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65587': 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) = 4666.08411888
delta logL = 0.306939311055

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.376e+00  3.913e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.202e+00  1.686e+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:  9.834e-01  2.130e-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.092e+00  2.495e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.24
Ra Dec: 160.150 6.285
Photon Index (Free Index): 3.20 +/- 1.69
Photon Flux (Free Index): 6.24e-08 +/- 6.50e-08
Energy Flux (Free Index): 1.14e-05 +/- 1.26e-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/65587/cmap_HighResolution_410140801_410400001_4FGL_J1040.5+0617_daily_bin659.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.04e-02', comment='SUCCESS', energy_flux2='1.14e-05', dlogl='3.07e-01', photon_flux2='6.24e-08', job_status='DONE', time_completed='2021-09-02 08:34:19.726012', photon_index_error2='1.69', photon_index2='3.20', ts='0.59', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', photon_flux_upper_limit='1.35e-07', energy_flux_error2='1.26e-05', EG='1.13', time_epoch_completed='1630596859.73', return_code='0', job_id='65587', GAL2='0.98', EG2='1.09', return_code2='0', photon_flux_error2='6.50e-08', ts2='1.24', photon_index='2.37' WHERE bin_id='659' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:34:19 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0303>
Subject: Job 65587: <4FGL_J1040.5+0617_daily_bin659> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin659 160.15 6.2848 410140801 410400001 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 :                                   518.07 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             271.73 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   643 sec.
    Turnaround time :                            789 sec.

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

