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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1222
RA = 160.15, Dec = 6.2848
tmin = 556070401, tmax = 556329601
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='69167', job_status='RUN', time_executed='2021-09-02 08:38:22.298109', time_epoch_executed='1630597102.3' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1222'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/69167

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/69167/ft1_4FGL_J1040.5+0617_daily_bin1222.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/69167/ft2_4FGL_J1040.5+0617_daily_bin1222.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/69167/ft1_4FGL_J1040.5+0617_daily_bin1222.fits outfile=/scratch/kocevski/69167/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1222.fits ra=160.15 dec=6.2848 rad=12.0 tmin=556070401.0 tmax=556329601.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.77
user 3.52
sys 0.19

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/69167/ft2_4FGL_J1040.5+0617_daily_bin1222.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/69167/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1222.fits evtable="EVENTS" outfile="/scratch/kocevski/69167/ft1_filtered_4FGL_J1040.5+0617_daily_bin1222.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.14

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/69167/ft1_filtered_4FGL_J1040.5+0617_daily_bin1222.fits evtable="EVENTS" scfile=/scratch/kocevski/69167/ft2_4FGL_J1040.5+0617_daily_bin1222.fits sctable="SC_DATA" expcube=/scratch/kocevski/69167/ltcube_556070401_556329601_4FGL_J1040.5+0617_daily_bin1222.fits outfile=/scratch/kocevski/69167/expmap_556070401_556329601_4FGL_J1040.5+0617_daily_bin1222.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/69167/ltcube_556070401_556329601_4FGL_J1040.5+0617_daily_bin1222.fits
.....................!
real 188.45
user 184.15
sys 3.95

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/69167/ft1_filtered_4FGL_J1040.5+0617_daily_bin1222.fits scfile=/scratch/kocevski/69167/ft2_4FGL_J1040.5+0617_daily_bin1222.fits outfile=/scratch/kocevski/69167/cmap_556070401_556329601_4FGL_J1040.5+0617_daily_bin1222.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.55
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/69167/ft1_filtered_4FGL_J1040.5+0617_daily_bin1222.fits scfile=/scratch/kocevski/69167/ft2_4FGL_J1040.5+0617_daily_bin1222.fits outfile=/scratch/kocevski/69167/cmap_HighResolution_556070401_556329601_4FGL_J1040.5+0617_daily_bin1222.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.58
user 0.39
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    6.8120       1.0000         .10000E-03   10000.    
     6 'Prefactor '    30.952       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.8500       1.0000         .10000E-03   10000.    
     9 'Prefactor '    7.1647       1.0000         .10000E-03   10000.    
    10 'Prefactor '    9.6461       1.0000         .10000E-03   10000.    
    11 'Prefactor '    15.536       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .24412       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10020E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    8.6427       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0723       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.3097       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=   5212.763     FROM MIGRAD    STATUS=CONVERGED    364 CALLS     1869 TOTAL
                     EDM=   .19E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    12.310       -.39246E-05** at limit **
   2  Prefactor     .10000E-03    16.368        .20688E-05** at limit **
   3  norm          .10001E-03    17.428       -.72232E-05** at limit **
   4  Prefactor     .10000E-03    3.4146        .44683E-06** at limit **
   5  Prefactor     6.7602        90.349       -.18060E-03    .32599E-04
   6  Prefactor     30.958        31.546        .94862E-05    .10334E-03
   7  Prefactor     .10000E-03    5.3447        .60870E-06** at limit **
   8  norm          2.8500        1.6994       -.28870E-07    .31842E-04
   9  Prefactor     7.1643        6.2219       -.57070E-06   -.13160E-03
  10  Prefactor     9.6458        5.3802       -.47468E-06   -.22809E-02
  11  Prefactor     15.548        20.813        .17166E-04    .25344E-04
  12  Prefactor     .10000E-03    15.607        .48918E-05** at limit **
  13  norm          .24404        .45840       -.31417E-06   -.26888E-02
  14  Prefactor     .10000E-03    4.0637       -.20622E-06** at limit **
  15  norm          .10000E-03    2.1451       -.55678E-06** at limit **
  16  Prefactor     8.6434        23.896        .12688E-05   -.14706E-04
  17  norm          .10000E-03    15.422        .74432E-05** at limit **
  18  Normalizat    1.0725        .24915        .70306E-05    .33635E-05
  19  Prefactor     1.3096        .19907       -.96214E-06    .33349E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100003
  Prefactor  = 0.0001
  norm       = 0.000100009
  Prefactor  = 0.0001
  Prefactor  = 6.76016
  Prefactor  = 30.958
  Prefactor  = 0.0001
  norm       = 2.85001
  Prefactor  = 7.16434
  Prefactor  = 9.64581
  Prefactor  = 15.548
  Prefactor  = 0.0001
  norm       = 0.244037
  Prefactor  = 0.0001
  norm       = 0.000100001
  Prefactor  = 8.64344
  norm       = 0.0001
  Normalizat = 1.07248
  Prefactor  = 1.30961
 **********
 **   18 **HESSE 
 **********

 FCN=   5212.763     FROM HESSE     STATUS=OK           268 CALLS     2137 TOTAL
                     EDM=   .38E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    12.342        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    16.379        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10001E-03    17.532        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    3.4185        .13030E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     6.7602        90.686        .15373E-03   -1.5188    
   6  Prefactor     30.958        31.574        .72018E-04   -1.4595    
   7  Prefactor     .10000E-03    5.3466        .16303E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.8500        1.6941        .68318E-04   -1.5370    
   9  Prefactor     7.1643        6.2165        .14986E-03   -1.5173    
  10  Prefactor     9.6458        5.3949        .59256E-03   -1.5087    
  11  Prefactor     15.548        20.827        .10161E-03   -1.4919    
  12  Prefactor     .10000E-03    15.938        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .24404        .42031        .64002E-03   -1.5609    
  14  Prefactor     .10000E-03    4.0734        .14198E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    2.2452        .20632E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     8.6434        23.890        .13635E-03   -1.5120    
  17  norm          .10000E-03    15.425        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.0725        .29638        .31630E-03   -.90640    
  19  Prefactor     1.3096        .23789        .23946E-03   -.83022    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.79218e-09
Minuit parameter uncertainties:
  1  0.00037298
  2  1.40818e-05
  3  0.000807965
  4  7.18232e-05
  5  49.6114
  6  31.591
  7  5.62527e-05
  8  1.69411
  9  6.21708
  10  5.39521
  11  20.8368
  12  7.20927e-05
  13  0.420314
  14  2.54334e-06
  15  7.31666e-05
  16  23.9163
  17  4.0991e-05
  18  0.296837
  19  0.238084
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  9.646e+00  5.395e+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.310e+00  2.381e-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.072e+00  2.968e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 7.18
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.17e-07 +/- 6.51e-08
Energy Flux (Fixed Index): 3.99e-05 +/- 2.23e-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) = 5212.75994299
delta logL = 0.00352134687546

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5212.75879865
delta logL = 0.00466568583488

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    9.4259       1.0000         .10000E-03   10000.    
     2 'Index     '    2.4182       1.0000          .0000       10.000    
     3 'Normalizat'    1.0659       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3129       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=   5212.759     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      207 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     9.4259        101.73        .32633E-02   -.20308E-03
   2  Index         2.4181        6.2090        .16376        .68325E-04
   3  Normalizat    1.0659        .14459        .71667E-01    .12394E-04
   4  Prefactor     1.3129        .87363E-01    .54100E-01    .17015E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 9.42591
  Index      = 2.41811
  Normalizat = 1.06586
  Prefactor  = 1.31295
 **********
 **   18 **HESSE 
 **********

 FCN=   5212.759     FROM HESSE     STATUS=OK            33 CALLS      240 TOTAL
                     EDM=   .43E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     9.4259        5.9004        .11536E-03   -1.5094    
   2  Index         2.4181        .53182        .57919E-02   -.54262    
   3  Normalizat    1.0659        .29670        .31712E-03   -.90856    
   4  Prefactor     1.3129        .23936        .23920E-03   -.82923    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.3257e-11
Minuit parameter uncertainties:
  1  5.90074
  2  0.533201
  3  0.297162
  4  0.239566
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/69167': 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) = 5212.75879864
delta logL = 0.00466569130276

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  9.426e+00  5.901e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.418e+00  5.332e-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.313e+00  2.396e-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.066e+00  2.972e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 7.18
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.42 +/- 0.53
Photon Flux (Free Index): 1.22e-07 +/- 8.92e-08
Energy Flux (Free Index): 3.92e-05 +/- 2.30e-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/69167/cmap_HighResolution_556070401_556329601_4FGL_J1040.5+0617_daily_bin1222.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.17e-07', energy_flux2='3.92e-05', photon_flux_error='6.51e-08', dlogl='4.67e-03', energy_flux='3.99e-05', photon_flux2='1.22e-07', job_status='DONE', time_completed='2021-09-02 08:47:04.808618', photon_index_error2='0.53', photon_index2='2.42', ts='7.18', fit_tolerance='1e-08', GAL='1.31', photon_index_error='0.00', energy_flux_error2='2.30e-05', EG='1.07', time_epoch_completed='1630597624.81', return_code='0', job_id='69167', GAL2='1.31', EG2='1.07', return_code2='0', energy_flux_error='2.23e-05', photon_flux_error2='8.92e-08', ts2='7.18', photon_index='2.37' WHERE bin_id='1222' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:47:04 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0191>
Subject: Job 69167: <4FGL_J1040.5+0617_daily_bin1222> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1222> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Thu Sep  2 08:36:32 2021
Job was executed on host(s) <bullet0191>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:36:33 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:36:33 2021
Terminated at Thu Sep  2 08:47:05 2021
Results reported at Thu Sep  2 08:47:05 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1222 160.15 6.2848 556070401 556329601 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 :                                   489.05 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             304.62 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   632 sec.
    Turnaround time :                            633 sec.

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

