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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1139
RA = 160.15, Dec = 6.2848
tmin = 534556801, tmax = 534816001
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='68084', job_status='RUN', time_executed='2021-09-02 08:35:55.270794', time_epoch_executed='1630596955.27' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1139'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/68084

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/68084/ft1_4FGL_J1040.5+0617_daily_bin1139.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/68084/ft2_4FGL_J1040.5+0617_daily_bin1139.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/68084/ft1_4FGL_J1040.5+0617_daily_bin1139.fits outfile=/scratch/kocevski/68084/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1139.fits ra=160.15 dec=6.2848 rad=12.0 tmin=534556801.0 tmax=534816001.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.93
user 3.72
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/68084/ft1_filtered_4FGL_J1040.5+0617_daily_bin1139.fits" evtable="EVENTS" scfile=/scratch/kocevski/68084/ft2_4FGL_J1040.5+0617_daily_bin1139.fits sctable="SC_DATA" outfile=/scratch/kocevski/68084/ltcube_534556801_534816001_4FGL_J1040.5+0617_daily_bin1139.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/68084/ft2_4FGL_J1040.5+0617_daily_bin1139.fits
.....................!
real 12.63
user 12.27
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/68084/ft1_filtered_4FGL_J1040.5+0617_daily_bin1139.fits evtable="EVENTS" scfile=/scratch/kocevski/68084/ft2_4FGL_J1040.5+0617_daily_bin1139.fits sctable="SC_DATA" expcube=/scratch/kocevski/68084/ltcube_534556801_534816001_4FGL_J1040.5+0617_daily_bin1139.fits outfile=/scratch/kocevski/68084/expmap_534556801_534816001_4FGL_J1040.5+0617_daily_bin1139.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/68084/ltcube_534556801_534816001_4FGL_J1040.5+0617_daily_bin1139.fits
.....................!
real 189.75
user 185.25
sys 4.08

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/68084/ft1_filtered_4FGL_J1040.5+0617_daily_bin1139.fits scfile=/scratch/kocevski/68084/ft2_4FGL_J1040.5+0617_daily_bin1139.fits outfile=/scratch/kocevski/68084/cmap_534556801_534816001_4FGL_J1040.5+0617_daily_bin1139.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.56
user 0.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/68084/ft1_filtered_4FGL_J1040.5+0617_daily_bin1139.fits scfile=/scratch/kocevski/68084/ft2_4FGL_J1040.5+0617_daily_bin1139.fits outfile=/scratch/kocevski/68084/cmap_HighResolution_534556801_534816001_4FGL_J1040.5+0617_daily_bin1139.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.55
user 0.40
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    45.466       1.0000         .10000E-03   10000.    
     3 'norm      '    5.6004       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10088E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    9.3192       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .11365E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    15.056       1.0000         .10000E-03   10000.    
     8 'norm      '    1.4215       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .93153       1.0000         .10000E-03   10000.    
    10 'Prefactor '    13.328       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    3.4351       1.0000         .10000E-03   10000.    
    13 'norm      '    .46361       1.0000         .10000E-03   10000.    
    14 'Prefactor '    18.086       1.0000         .10000E-03   10000.    
    15 'norm      '    .10039E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    20.213       1.0000         .10000E-03   10000.    
    17 'norm      '    .86092E-02   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .84772       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2084       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=   5725.123     FROM MIGRAD    STATUS=CONVERGED    396 CALLS     1914 TOTAL
                     EDM=   .84E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    5.1206       -.39719E-06** at limit **
   2  Prefactor     45.454        43.665       -.92483E-07   -.25930E-04
   3  norm          5.6001        8.8660       -.58506E-07    .36716E-05
   4  Prefactor     .10000E-03    4.4624       -.67482E-06** at limit **
   5  Prefactor     9.2589        61.240       -.50009E-06   -.27631E-04
   6  Prefactor     .10000E-03    56.515       -.26773E-05** at limit **
   7  Prefactor     15.075        19.160        .46758E-07    .33356E-05
   8  norm          1.4216        1.1272       -.17764E-07   -.11038E-03
   9  Prefactor     .93369        4.1871        .19141E-05    .14030E-05
  10  Prefactor     13.326        4.5638       -.19377E-07   -.12764E-03
  11  Prefactor     .10000E-03    1.8591        .70795E-07** at limit **
  12  Prefactor     3.4343        5.5442        .25379E-06   -.93145E-05
  13  norm          .46339        .68619        .33311E-06    .45677E-03
  14  Prefactor     18.087        13.067       -.56212E-06    .54866E-05
  15  norm          .10000E-03    .49864        .19699E-06** at limit **
  16  Prefactor     20.175        21.921        .82163E-07    .35397E-04
  17  norm          .10011E-03    10.611       -.17738E-06** at limit **
  18  Normalizat    .84829        .20266        .10031E-05   -.12292E-03
  19  Prefactor     1.2079        .17994       -.15325E-05    .10604E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 45.454
  norm       = 5.60011
  Prefactor  = 0.0001
  Prefactor  = 9.25891
  Prefactor  = 0.0001
  Prefactor  = 15.0755
  norm       = 1.42157
  Prefactor  = 0.933693
  Prefactor  = 13.3263
  Prefactor  = 0.0001
  Prefactor  = 3.43434
  norm       = 0.463395
  Prefactor  = 18.0874
  norm       = 0.0001
  Prefactor  = 20.1751
  norm       = 0.00010011
  Normalizat = 0.848292
  Prefactor  = 1.20788
 **********
 **   18 **HESSE 
 **********

 FCN=   5725.123     FROM HESSE     STATUS=OK           284 CALLS     2198 TOTAL
                     EDM=   .23E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    5.1282        .16704E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     45.454        43.660        .59461E-04   -1.4359    
   3  norm          5.6001        8.8511        .16976E-03   -1.5235    
   4  Prefactor     .10000E-03    4.4479        .15561E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     9.2589        61.675        .13128E-03   -1.5099    
   6  Prefactor     .10000E-03    56.318        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     15.075        19.111        .10322E-03   -1.4931    
   8  norm          1.4216        1.1266        .69115E-04   -1.5470    
   9  Prefactor     .93369        4.1246        .29977E-03   -1.5515    
  10  Prefactor     13.326        4.5672        .88802E-04   -1.4978    
  11  Prefactor     .10000E-03    1.8702        .10075E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     3.4343        5.5152        .21549E-03   -1.5337    
  13  norm          .46339        .65896        .57499E-03   -1.5572    
  14  Prefactor     18.087        12.884        .94179E-04   -1.4857    
  15  norm          .10000E-03    .51348        .10423E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     20.175        21.969        .89088E-04   -1.4809    
  17  norm          .10011E-03    15.386        .71560E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .84829        .23616        .28974E-03   -.98302    
  19  Prefactor     1.2079        .20702        .22309E-03   -.86089    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.27653e-10
Minuit parameter uncertainties:
  1  4.06937e-06
  2  43.6908
  3  8.85313
  4  4.96543e-06
  5  47.8642
  6  4.67358e-05
  7  19.1184
  8  1.12664
  9  3.9251
  10  4.56735
  11  4.18932e-07
  12  5.51605
  13  0.658971
  14  12.8856
  15  7.44098e-08
  16  21.9774
  17  0.00260083
  18  0.236451
  19  0.207155
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.333e+01  4.567e+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.208e+00  2.072e-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.483e-01  2.365e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 16.48
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.61e-07 +/- 5.51e-08
Energy Flux (Fixed Index): 5.51e-05 +/- 1.89e-05

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) = 5724.51500042
delta logL = 0.607663413409

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5724.51240457
delta logL = 0.61025926211

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    8.9954       1.0000         .10000E-03   10000.    
     2 'Index     '    2.7522       1.0000          .0000       10.000    
     3 'Normalizat'    .80354       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2368       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=   5724.512     FROM MIGRAD    STATUS=CONVERGED     44 CALLS      243 TOTAL
                     EDM=   .34E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.9954        39.651        .33409E-02    .10310E-03
   2  Index         2.7522        2.4722        .75320E-01    .12255E-03
   3  Normalizat    .80354        .11714        .67029E-01    .27646E-04
   4  Prefactor     1.2368        .99191E-01    .49952E-01   -.10204E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.99536
  Index      = 2.75215
  Normalizat = 0.803539
  Prefactor  = 1.23683
 **********
 **   18 **HESSE 
 **********

 FCN=   5724.512     FROM HESSE     STATUS=OK            33 CALLS      276 TOTAL
                     EDM=   .20E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.9954        5.5339        .69066E-04   -1.5108    
   2  Index         2.7522        .40154        .32006E-02   -.46628    
   3  Normalizat    .80354        .23235        .29655E-03   -.99938    
   4  Prefactor     1.2368        .20737        .22083E-03   -.85205    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.03937e-09
Minuit parameter uncertainties:
  1  5.53422
  2  0.402083
  3  0.232641
  4  0.207507
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/68084': 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) = 5724.51240457
delta logL = 0.610259262116

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  8.995e+00  5.534e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.752e+00  4.021e-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.237e+00  2.075e-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.035e-01  2.326e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 17.90
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.75 +/- 0.40
Photon Flux (Free Index): 1.94e-07 +/- 6.65e-08
Energy Flux (Free Index): 4.50e-05 +/- 1.65e-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/68084/cmap_HighResolution_534556801_534816001_4FGL_J1040.5+0617_daily_bin1139.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.61e-07', energy_flux2='4.50e-05', photon_flux_error='5.51e-08', dlogl='6.10e-01', energy_flux='5.51e-05', photon_flux2='1.94e-07', job_status='DONE', time_completed='2021-09-02 08:45:00.862294', photon_index_error2='0.40', photon_index2='2.75', ts='16.48', fit_tolerance='1e-08', GAL='1.21', photon_index_error='0.00', energy_flux_error2='1.65e-05', EG='0.85', time_epoch_completed='1630597500.86', return_code='0', job_id='68084', GAL2='1.24', EG2='0.80', return_code2='0', energy_flux_error='1.89e-05', photon_flux_error2='6.65e-08', ts2='17.90', photon_index='2.37' WHERE bin_id='1139' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:45:00 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0138>
Subject: Job 68084: <4FGL_J1040.5+0617_daily_bin1139> in cluster <slac> Done

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

Your job looked like:

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

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

