/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 214 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 = 7478
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin113
RA = 160.15, Dec = 6.2848
tmin = 268617601, tmax = 268876801
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='60714', job_status='RUN', time_executed='2021-09-02 08:09:45.643860', time_epoch_executed='1630595385.64' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='113'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/60714

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/60714/ft1_4FGL_J1040.5+0617_daily_bin113.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/60714/ft2_4FGL_J1040.5+0617_daily_bin113.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/60714/ft1_4FGL_J1040.5+0617_daily_bin113.fits outfile=/scratch/kocevski/60714/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin113.fits ra=160.15 dec=6.2848 rad=12.0 tmin=268617601.0 tmax=268876801.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 1.26
user 1.08
sys 0.16

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/60714/ft2_4FGL_J1040.5+0617_daily_bin113.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/60714/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin113.fits evtable="EVENTS" outfile="/scratch/kocevski/60714/ft1_filtered_4FGL_J1040.5+0617_daily_bin113.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.43
user 0.29
sys 0.12

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/60714/ft1_filtered_4FGL_J1040.5+0617_daily_bin113.fits" evtable="EVENTS" scfile=/scratch/kocevski/60714/ft2_4FGL_J1040.5+0617_daily_bin113.fits sctable="SC_DATA" outfile=/scratch/kocevski/60714/ltcube_268617601_268876801_4FGL_J1040.5+0617_daily_bin113.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/60714/ft2_4FGL_J1040.5+0617_daily_bin113.fits
.....................!
real 10.58
user 10.24
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/60714/ft1_filtered_4FGL_J1040.5+0617_daily_bin113.fits evtable="EVENTS" scfile=/scratch/kocevski/60714/ft2_4FGL_J1040.5+0617_daily_bin113.fits sctable="SC_DATA" expcube=/scratch/kocevski/60714/ltcube_268617601_268876801_4FGL_J1040.5+0617_daily_bin113.fits outfile=/scratch/kocevski/60714/expmap_268617601_268876801_4FGL_J1040.5+0617_daily_bin113.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/60714/ltcube_268617601_268876801_4FGL_J1040.5+0617_daily_bin113.fits
.....................!
real 155.46
user 150.76
sys 4.17

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/60714/ft1_filtered_4FGL_J1040.5+0617_daily_bin113.fits scfile=/scratch/kocevski/60714/ft2_4FGL_J1040.5+0617_daily_bin113.fits outfile=/scratch/kocevski/60714/cmap_268617601_268876801_4FGL_J1040.5+0617_daily_bin113.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.45
user 0.31
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/60714/ft1_filtered_4FGL_J1040.5+0617_daily_bin113.fits scfile=/scratch/kocevski/60714/ft2_4FGL_J1040.5+0617_daily_bin113.fits outfile=/scratch/kocevski/60714/cmap_HighResolution_268617601_268876801_4FGL_J1040.5+0617_daily_bin113.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.47
user 0.32
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10141E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10927E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    26.233       1.0000         .10000E-03   10000.    
     5 'Prefactor '    39.428       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10621E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10068E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .17553       1.0000         .10000E-03   10000.    
     9 'Prefactor '    4.0179       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .16968       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    4.1778       1.0000         .10000E-03   10000.    
    13 'norm      '    .56896       1.0000         .10000E-03   10000.    
    14 'Prefactor '    6.0826       1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    24.677       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .88099       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1087       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=   6361.875     FROM MIGRAD    STATUS=CONVERGED    389 CALLS     1886 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    6.7924        .23715E-06** at limit **
   2  Prefactor     .10000E-03    11.271       -.27432E-07** at limit **
   3  norm          .10000E-03    14.965        .99793E-06** at limit **
   4  Prefactor     26.231        11.726        .11563E-05    .61082E-04
   5  Prefactor     39.409        44.119       -.15640E-04   -.30281E-03
   6  Prefactor     .10000E-03    25.064        .43954E-06** at limit **
   7  Prefactor     .10000E-03    6.1212       -.14066E-06** at limit **
   8  norm          .17395        1.0797       -.36470E-06   -.14109E-03
   9  Prefactor     4.0176        4.4881        .96341E-06   -.26018E-02
  10  Prefactor     .17406        1.4067       -.56945E-07   -.64131E-04
  11  Prefactor     .10000E-03    2.4955       -.20024E-06** at limit **
  12  Prefactor     4.1761        5.3745        .10709E-05   -.21871E-02
  13  norm          .56893        .48906       -.23350E-08   -.18225E-03
  14  Prefactor     6.0828        5.8825       -.79896E-07    .25990E-04
  15  norm          .10000E-03    .28250       -.26314E-07** at limit **
  16  Prefactor     24.678        18.551        .46769E-07    .27955E-04
  17  norm          .10000E-03    3.9345        .11959E-06** at limit **
  18  Normalizat    .88087        .18522        .14130E-05    .59181E-04
  19  Prefactor     1.1088        .15883       -.18168E-06    .16720E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.000100001
  Prefactor  = 26.2309
  Prefactor  = 39.4089
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.173949
  Prefactor  = 4.01757
  Prefactor  = 0.174065
  Prefactor  = 0.0001
  Prefactor  = 4.17607
  norm       = 0.568932
  Prefactor  = 6.08279
  norm       = 0.0001
  Prefactor  = 24.6778
  norm       = 0.0001
  Normalizat = 0.880867
  Prefactor  = 1.10879
 **********
 **   18 **HESSE 
 **********

 FCN=   6361.875     FROM HESSE     STATUS=OK           272 CALLS     2158 TOTAL
                     EDM=   .63E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    6.8285        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    11.276        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    15.171        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     26.231        11.723        .78214E-04   -1.4683    
   5  Prefactor     39.409        45.005        .63834E-04   -1.4452    
   6  Prefactor     .10000E-03    25.090        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    6.1258        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .17395        2.2647        .15236E-02   -1.5625    
   9  Prefactor     4.0176        5.5481        .10059E-02   -1.5307    
  10  Prefactor     .17406        11.333        .17607E-02   -1.5625    
  11  Prefactor     .10000E-03    2.5115        .12303E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     4.1761        6.5435        .98589E-03   -1.5299    
  13  norm          .56893        .46930        .46840E-03   -1.5557    
  14  Prefactor     6.0828        5.8994        .16279E-03   -1.5215    
  15  norm          .10000E-03    .28522        .41381E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     24.678        18.556        .80638E-04   -1.4714    
  17  norm          .10000E-03    3.9439        .15450E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .88087        .21206        .27265E-03   -.97136    
  19  Prefactor     1.1088        .18315        .21735E-03   -.89186    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.27428e-08
Minuit parameter uncertainties:
  1  4.02605e-05
  2  2.52675e-06
  3  0.000202599
  4  11.7244
  5  45.0433
  6  0.000112026
  7  1.35026e-05
  8  1.255
  9  5.54883
  10  2.80882
  11  7.98552e-06
  12  6.54463
  13  0.4693
  14  5.89995
  15  8.87865e-07
  16  18.5601
  17  1.5387e-06
  18  0.212259
  19  0.183256
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.741e-01  2.809e+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.109e+00  1.833e-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.809e-01  2.123e-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: 8.45e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.52e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/60714/likelihoodResults_268617601_268876801_4FGL_J1040.5+0617_daily_bin113.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) = 6361.63913243
delta logL = 0.235701786855

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6361.60331421
delta logL = 0.271520011525

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .15507E-01   1.0000         .10000E-03   10000.    
     2 'Index     '    5.2371       1.0000          .0000       10.000    
     3 'Normalizat'    .84093       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1323       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=   6361.603     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      253 TOTAL
                     EDM=   .20E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .15314E-01    .30389        .32092E-02   -.43572E-02
   2  Index         5.2435        2.5224        .20160       -.64091E-04
   3  Normalizat    .84110        .26288E-01    .44142E-01   -.13027E-03
   4  Prefactor     1.1322        .23353E-01    .36471E-01   -.12277E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0153136
  Index      = 5.24352
  Normalizat = 0.841099
  Prefactor  = 1.13218
 **********
 **   18 **HESSE 
 **********

 FCN=   6361.603     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      286 TOTAL
                     EDM=   .37E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .15314E-01    1.6793        .14941E-03   -1.5683    
   2  Index         5.2435        7.3324        .71755E-02    .48724E-01
   3  Normalizat    .84110        .13292        .27836E-03   -.98562    
   4  Prefactor     1.1322        .11652        .21539E-03   -.88444    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.73066e-10
Minuit parameter uncertainties:
  1  0.319689
  2  10.5147
  3  0.132973
  4  0.116549
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/60714': 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): 102
logL (Free Index) = 6361.60331334
delta logL = 0.271520875896

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.531e-02  3.197e-01  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  5.244e+00  1.051e+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.132e+00  1.165e-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.411e-01  1.330e-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/60714/cmap_HighResolution_268617601_268876801_4FGL_J1040.5+0617_daily_bin113.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.52e-03', job_status='DONE', photon_flux_upper_limit='8.45e-08', time_completed='2021-09-02 08:17:34.013924', job_id='60714', GAL2='1.13', fit_tolerance='1e-08', EG2='0.84', EG='0.88', time_epoch_completed='1630595854.01', return_code2='102', ts='0.00', comment='SUCCESS', return_code='0', GAL='1.11', dlogl='2.72e-01', ts2='0.58', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='113' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:17:34 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0168>
Subject: Job 60714: <4FGL_J1040.5+0617_daily_bin113> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin113> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:06:03 2021
Job was executed on host(s) <bullet0168>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:06:04 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:06:04 2021
Terminated at Thu Sep  2 08:17:34 2021
Results reported at Thu Sep  2 08:17:34 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin113 160.15 6.2848 268617601 268876801 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 :                                   467.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             257.17 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   690 sec.
    Turnaround time :                            691 sec.

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

