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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin237
RA = 160.15, Dec = 6.2848
tmin = 300758401, tmax = 301017601
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='62796', job_status='RUN', time_executed='2021-09-02 08:12:56.193395', time_epoch_executed='1630595576.19' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='237'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62796

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62796/ft1_4FGL_J1040.5+0617_daily_bin237.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62796/ft2_4FGL_J1040.5+0617_daily_bin237.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62796/ft1_4FGL_J1040.5+0617_daily_bin237.fits outfile=/scratch/kocevski/62796/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin237.fits ra=160.15 dec=6.2848 rad=12.0 tmin=300758401.0 tmax=301017601.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.53
user 3.29
sys 0.21

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62796/ft1_filtered_4FGL_J1040.5+0617_daily_bin237.fits evtable="EVENTS" scfile=/scratch/kocevski/62796/ft2_4FGL_J1040.5+0617_daily_bin237.fits sctable="SC_DATA" expcube=/scratch/kocevski/62796/ltcube_300758401_301017601_4FGL_J1040.5+0617_daily_bin237.fits outfile=/scratch/kocevski/62796/expmap_300758401_301017601_4FGL_J1040.5+0617_daily_bin237.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/62796/ltcube_300758401_301017601_4FGL_J1040.5+0617_daily_bin237.fits
.....................!
real 191.70
user 186.14
sys 5.04

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/62796/ft1_filtered_4FGL_J1040.5+0617_daily_bin237.fits scfile=/scratch/kocevski/62796/ft2_4FGL_J1040.5+0617_daily_bin237.fits outfile=/scratch/kocevski/62796/cmap_300758401_301017601_4FGL_J1040.5+0617_daily_bin237.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.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/62796/ft1_filtered_4FGL_J1040.5+0617_daily_bin237.fits scfile=/scratch/kocevski/62796/ft2_4FGL_J1040.5+0617_daily_bin237.fits outfile=/scratch/kocevski/62796/cmap_HighResolution_300758401_301017601_4FGL_J1040.5+0617_daily_bin237.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.54
user 0.38
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    27.965       1.0000         .10000E-03   10000.    
     2 'Prefactor '    34.111       1.0000         .10000E-03   10000.    
     3 'norm      '    .10019E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    30.258       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10682E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10430E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10087E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .54790       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .15383E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    8.3353       1.0000         .10000E-03   10000.    
    11 'Prefactor '    7.7926       1.0000         .10000E-03   10000.    
    12 'Prefactor '    15.688       1.0000         .10000E-03   10000.    
    13 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    23.134       1.0000         .10000E-03   10000.    
    15 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    9.7830       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0876       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2130       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=   6148.618     FROM MIGRAD    STATUS=CONVERGED    411 CALLS     1934 TOTAL
                     EDM=   .25E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     27.966        17.535        .61462E-06   -.57076E-05
   2  Prefactor     34.031        39.725       -.20805E-04   -.18511E-04
   3  norm          .10000E-03    6.5523        .63740E-07** at limit **
   4  Prefactor     30.257        14.293        .69720E-06   -.49564E-05
   5  Prefactor     .10000E-03    68.211       -.19141E-06** at limit **
   6  Prefactor     .10000E-03    26.537       -.22766E-06** at limit **
   7  Prefactor     .10000E-03    6.6374       -.17782E-06** at limit **
   8  norm          .54904        1.2368       -.11564E-06   -.11603E-02
   9  Prefactor     .10152E-03    4.9118        .11387E-05** at limit **
  10  Prefactor     8.3357        4.7241        .84287E-07   -.17631E-03
  11  Prefactor     7.7931        5.7901        .21751E-05   -.97107E-04
  12  Prefactor     15.688        10.807       -.52413E-06   -.87492E-04
  13  norm          .10000E-03    .43391        .87114E-07** at limit **
  14  Prefactor     23.137        11.287       -.37082E-06   -.15070E-03
  15  norm          .10000E-03    .42830       -.17190E-07** at limit **
  16  Prefactor     .10000E-03    10.578       -.12762E-06** at limit **
  17  norm          9.7835        9.0480        .40523E-06   -.11406E-04
  18  Normalizat    1.0875        .21483       -.71335E-07   -.11193E-03
  19  Prefactor     1.2130        .18284        .51418E-06   -.15658E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 27.9664
  Prefactor  = 34.031
  norm       = 0.0001
  Prefactor  = 30.2567
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.549037
  Prefactor  = 0.000101523
  Prefactor  = 8.33568
  Prefactor  = 7.79311
  Prefactor  = 15.6884
  norm       = 0.0001
  Prefactor  = 23.1373
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 9.78353
  Normalizat = 1.08748
  Prefactor  = 1.21304
 **********
 **   18 **HESSE 
 **********

 FCN=   6148.618     FROM HESSE     STATUS=OK           282 CALLS     2216 TOTAL
                     EDM=   .38E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     27.966        17.553        .75758E-04   -1.4650    
   2  Prefactor     34.031        39.574        .68612E-04   -1.4541    
   3  norm          .10000E-03    6.5543        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     30.257        14.288        .72838E-04   -1.4607    
   5  Prefactor     .10000E-03    68.379        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    26.544        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    6.6390        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .54904        1.1549        .12454E-02   -1.5560    
   9  Prefactor     .10152E-03    5.6089        .53168E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     8.3357        4.7239        .11824E-03   -1.5130    
  11  Prefactor     7.7931        5.7806        .14365E-03   -1.5150    
  12  Prefactor     15.688        10.796        .10112E-03   -1.4916    
  13  norm          .10000E-03    .63454        .92731E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     23.137        10.574        .83279E-04   -1.4746    
  15  norm          .10000E-03    .43652        .50072E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    10.618        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          9.7835        9.0503        .12812E-03   -1.5082    
  18  Normalizat    1.0875        .25678        .29319E-03   -.90155    
  19  Prefactor     1.2130        .21884        .24580E-03   -.85931    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.76689e-10
Minuit parameter uncertainties:
  1  17.5562
  2  39.6044
  3  6.89067e-06
  4  14.2893
  5  8.88367e-05
  6  2.58908e-05
  7  5.27934e-06
  8  1.155
  9  0.00584538
  10  4.72415
  11  5.78099
  12  10.7972
  13  6.62924e-06
  14  10.5749
  15  1.88947e-06
  16  2.2726e-06
  17  9.05153
  18  0.257071
  19  0.219006
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  8.336e+00  4.724e+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.213e+00  2.190e-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.087e+00  2.571e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.75
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.01e-07 +/- 5.70e-08
Energy Flux (Fixed Index): 3.45e-05 +/- 1.95e-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) = 6148.60033692
delta logL = 0.0176601568983

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6148.58929929
delta logL = 0.0286977884634

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    7.5819       1.0000         .10000E-03   10000.    
     2 'Index     '    2.4914       1.0000          .0000       10.000    
     3 'Normalizat'    1.0749       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2209       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.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6148.589     FROM MIGRAD    STATUS=CONVERGED     85 CALLS      241 TOTAL
                     EDM=   .61E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     7.5824        5.6579        .11004E-03   -.95466E-03
   2  Index         2.4912        .55099        .54661E-02   -.20412E-03
   3  Normalizat    1.0749        .25522        .29464E-03    .24980E-03
   4  Prefactor     1.2209        .22082        .24512E-03    .40910E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 7.58244
  Index      = 2.49122
  Normalizat = 1.07486
  Prefactor  = 1.22093
 **********
 **   18 **HESSE 
 **********

 FCN=   6148.589     FROM HESSE     STATUS=OK            25 CALLS      266 TOTAL
                     EDM=   .67E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     7.5824        5.3969        .44014E-05   -1.5157    
   2  Index         2.4912        .52502        .21864E-03   -.52563    
   3  Normalizat    1.0749        .25507        .11785E-04   -.90563    
   4  Prefactor     1.2209        .22073        .49023E-04   -.85690    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.65059e-10
Minuit parameter uncertainties:
  1  5.39723
  2  0.526318
  3  0.255359
  4  0.220896
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62796': 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) = 6148.58929919
delta logL = 0.0286978862759

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  7.582e+00  5.397e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.491e+00  5.263e-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.221e+00  2.209e-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.075e+00  2.554e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.83
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.49 +/- 0.53
Photon Flux (Free Index): 1.10e-07 +/- 6.88e-08
Energy Flux (Free Index): 3.21e-05 +/- 1.95e-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/62796/cmap_HighResolution_300758401_301017601_4FGL_J1040.5+0617_daily_bin237.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.01e-07', energy_flux2='3.21e-05', photon_flux_error='5.70e-08', dlogl='2.87e-02', energy_flux='3.45e-05', photon_flux2='1.10e-07', job_status='DONE', time_completed='2021-09-02 08:21:57.937039', photon_index_error2='0.53', photon_index2='2.49', ts='6.75', fit_tolerance='1e-08', GAL='1.21', photon_index_error='0.00', energy_flux_error2='1.95e-05', EG='1.09', time_epoch_completed='1630596117.94', return_code='0', job_id='62796', GAL2='1.22', EG2='1.07', return_code2='0', energy_flux_error='1.95e-05', photon_flux_error2='6.88e-08', ts2='6.83', photon_index='2.37' WHERE bin_id='237' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:21:57 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0043>
Subject: Job 62796: <4FGL_J1040.5+0617_daily_bin237> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin237 160.15 6.2848 300758401 301017601 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 :                                   537.57 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             342.95 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   606 sec.
    Turnaround time :                            644 sec.

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

