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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin579
RA = 160.15, Dec = 6.2848
tmin = 389404801, tmax = 389664001
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='65471', job_status='RUN', time_executed='2021-09-02 08:25:53.917127', time_epoch_executed='1630596353.92' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='579'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65471

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65471/ft1_4FGL_J1040.5+0617_daily_bin579.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65471/ft2_4FGL_J1040.5+0617_daily_bin579.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65471/ft1_4FGL_J1040.5+0617_daily_bin579.fits outfile=/scratch/kocevski/65471/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin579.fits ra=160.15 dec=6.2848 rad=12.0 tmin=389404801.0 tmax=389664001.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 4.02
user 3.79
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65471/ft1_filtered_4FGL_J1040.5+0617_daily_bin579.fits" evtable="EVENTS" scfile=/scratch/kocevski/65471/ft2_4FGL_J1040.5+0617_daily_bin579.fits sctable="SC_DATA" outfile=/scratch/kocevski/65471/ltcube_389404801_389664001_4FGL_J1040.5+0617_daily_bin579.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/65471/ft2_4FGL_J1040.5+0617_daily_bin579.fits
.....................!
real 13.82
user 13.33
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65471/ft1_filtered_4FGL_J1040.5+0617_daily_bin579.fits evtable="EVENTS" scfile=/scratch/kocevski/65471/ft2_4FGL_J1040.5+0617_daily_bin579.fits sctable="SC_DATA" expcube=/scratch/kocevski/65471/ltcube_389404801_389664001_4FGL_J1040.5+0617_daily_bin579.fits outfile=/scratch/kocevski/65471/expmap_389404801_389664001_4FGL_J1040.5+0617_daily_bin579.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/65471/ltcube_389404801_389664001_4FGL_J1040.5+0617_daily_bin579.fits
.....................!
real 192.26
user 187.35
sys 4.28

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/65471/ft1_filtered_4FGL_J1040.5+0617_daily_bin579.fits scfile=/scratch/kocevski/65471/ft2_4FGL_J1040.5+0617_daily_bin579.fits outfile=/scratch/kocevski/65471/cmap_389404801_389664001_4FGL_J1040.5+0617_daily_bin579.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.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65471/ft1_filtered_4FGL_J1040.5+0617_daily_bin579.fits scfile=/scratch/kocevski/65471/ft2_4FGL_J1040.5+0617_daily_bin579.fits outfile=/scratch/kocevski/65471/cmap_HighResolution_389404801_389664001_4FGL_J1040.5+0617_daily_bin579.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.39
sys 0.14

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/65471/ft1_filtered_4FGL_J1040.5+0617_daily_bin579.fits', '/scratch/kocevski/65471/ft2_4FGL_J1040.5+0617_daily_bin579.fits', expMap='/scratch/kocevski/65471/expmap_389404801_389664001_4FGL_J1040.5+0617_daily_bin579.fits', expCube='/scratch/kocevski/65471/ltcube_389404801_389664001_4FGL_J1040.5+0617_daily_bin579.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/65471/Model_4FGL_J1040.5+0617_daily_bin579.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/65471/ft1_filtered_4FGL_J1040.5+0617_daily_bin579.fits
Spacecraft file(s): /scratch/kocevski/65471/ft2_4FGL_J1040.5+0617_daily_bin579.fits
Exposure map: /scratch/kocevski/65471/expmap_389404801_389664001_4FGL_J1040.5+0617_daily_bin579.fits
Exposure cube: /scratch/kocevski/65471/ltcube_389404801_389664001_4FGL_J1040.5+0617_daily_bin579.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/65471/Model_4FGL_J1040.5+0617_daily_bin579.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 102
logL (Fixed Index) = 6026.45444833

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.046       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .43733E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    5.7382       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .26173E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10131E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10152E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .50208       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    9.0833       1.0000         .10000E-03   10000.    
    11 'Prefactor '    6.8004       1.0000         .10000E-03   10000.    
    12 'Prefactor '    7.7600       1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10275E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .28738       1.0000         .10000E-03   10000.    
    16 'Prefactor '    20.602       1.0000         .10000E-03   10000.    
    17 'norm      '    3.5703       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .94885       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0419       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=   6026.393     FROM MIGRAD    STATUS=CONVERGED    386 CALLS     1665 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.046        10.422       -.19220E-06   -.35532E-03
   2  Prefactor     .10000E-03    10.300        .59700E-08** at limit **
   3  norm          .10120E-03    11.056        .32830E-05** at limit **
   4  Prefactor     5.7380        12.420       -.89855E-06   -.28730E-03
   5  Prefactor     .10014E-03    495.26       -.12760E-04** at limit **
   6  Prefactor     .10000E-03    71.619       -.96923E-07** at limit **
   7  Prefactor     .10000E-03    16.684       -.12934E-07** at limit **
   8  norm          .50291        .99560        .50959E-06    .97784E-03
   9  Prefactor     .10000E-03    4.4611        .39152E-07** at limit **
  10  Prefactor     9.0825        4.1721        .42494E-06   -.71128E-05
  11  Prefactor     6.7990        6.2388       -.40875E-08   -.19632E-03
  12  Prefactor     7.7664        9.8052        .68808E-07   -.11283E-03
  13  norm          .10000E-03    .14324        .21942E-07** at limit **
  14  Prefactor     .10000E-03    12.735        .90072E-07** at limit **
  15  norm          .28753        1.1213        .11677E-05    .16161E-03
  16  Prefactor     20.628        21.034        .29712E-06    .86185E-04
  17  norm          3.5710        9.5053        .30858E-06   -.31573E-04
  18  Normalizat    .94858        .19603       -.18627E-05   -.35212E-03
  19  Prefactor     1.0420        .15856       -.12070E-06   -.43623E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.0463
  Prefactor  = 0.0001
  norm       = 0.000101204
  Prefactor  = 5.738
  Prefactor  = 0.000100144
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.502909
  Prefactor  = 0.0001
  Prefactor  = 9.08245
  Prefactor  = 6.79903
  Prefactor  = 7.76643
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.287528
  Prefactor  = 20.6278
  norm       = 3.57101
  Normalizat = 0.948577
  Prefactor  = 1.04199
 **********
 **   18 **HESSE 
 **********

 FCN=   6026.393     FROM HESSE     STATUS=OK           276 CALLS     1941 TOTAL
                     EDM=   .15E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.046        10.326        .12643E-03   -1.5074    
   2  Prefactor     .10000E-03    10.303        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10120E-03    78.642        .41517E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     5.7380        12.220        .16767E-03   -1.5229    
   5  Prefactor     .10014E-03    511.26        .42893E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    71.649        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    16.708        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .50291        .92698        .11034E-02   -1.5566    
   9  Prefactor     .10000E-03    4.5360        .16002E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     9.0825        4.1579        .49477E-03   -1.5105    
  11  Prefactor     6.7990        6.2413        .15386E-03   -1.5186    
  12  Prefactor     7.7664        9.7757        .14395E-03   -1.5151    
  13  norm          .10000E-03    .15733        .57062E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    13.210        .36285E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .28753        1.1329        .15163E-02   -1.5601    
  16  Prefactor     20.628        21.077        .88243E-04   -1.4799    
  17  norm          3.5710        9.4665        .21389E-03   -1.5330    
  18  Normalizat    .94858        .22528        .26962E-03   -.94774    
  19  Prefactor     1.0420        .18379        .22121E-03   -.91343    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.51717e-08
Minuit parameter uncertainties:
  1  10.3282
  2  1.53872e-06
  3  0.0194855
  4  12.2252
  5  0.0173209
  6  7.25778e-05
  7  2.40088e-05
  8  0.927006
  9  6.4365e-06
  10  4.15806
  11  6.24189
  12  9.77768
  13  9.40102e-07
  14  4.64619e-05
  15  1.13294
  16  21.0841
  17  9.4705
  18  0.225507
  19  0.183902
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  9.082e+00  4.158e+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.042e+00  1.839e-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:  9.486e-01  2.255e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 12.70
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.10e-07 +/- 5.02e-08
Energy Flux (Fixed Index): 3.76e-05 +/- 1.72e-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) = 6026.22188343
delta logL = 0.171008565339

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6026.22001053
delta logL = 0.17288146434

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.059       1.0000         .10000E-03   10000.    
     2 'Index     '    2.1364       1.0000          .0000       10.000    
     3 'Normalizat'    .97218       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0297       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=   6026.220     FROM MIGRAD    STATUS=CONVERGED     80 CALLS      261 TOTAL
                     EDM=   .79E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.059        4.7125        .10824E-03    .43377E-03
   2  Index         2.1364        .38552        .58896E-02    .62583E-04
   3  Normalizat    .97218        .21652        .26680E-03   -.43421E-04
   4  Prefactor     1.0297        .18307        .22239E-03   -.42430E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.059
  Index      = 2.13643
  Normalizat = 0.972175
  Prefactor  = 1.02973
 **********
 **   18 **HESSE 
 **********

 FCN=   6026.220     FROM HESSE     STATUS=OK            25 CALLS      286 TOTAL
                     EDM=   .76E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.059        4.6889        .43297E-05   -1.5074    
   2  Index         2.1364        .38328        .23558E-03   -.60981    
   3  Normalizat    .97218        .21668        .10672E-04   -.93969    
   4  Prefactor     1.0297        .18323        .88956E-05   -.91745    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.55592e-11
Minuit parameter uncertainties:
  1  4.68907
  2  0.383839
  3  0.216879
  4  0.18334
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65471': 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) = 6026.22001052
delta logL = 0.172881469784

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.006e+01  4.689e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.136e+00  3.838e-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.030e+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:  9.722e-01  2.169e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 13.05
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.14 +/- 0.38
Photon Flux (Free Index): 8.87e-08 +/- 5.46e-08
Energy Flux (Free Index): 4.51e-05 +/- 2.67e-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/65471/cmap_HighResolution_389404801_389664001_4FGL_J1040.5+0617_daily_bin579.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.10e-07', energy_flux2='4.51e-05', photon_flux_error='5.02e-08', dlogl='1.73e-01', energy_flux='3.76e-05', photon_flux2='8.87e-08', job_status='DONE', time_completed='2021-09-02 08:34:28.206653', photon_index_error2='0.38', photon_index2='2.14', ts='12.70', fit_tolerance='1e-08', GAL='1.04', photon_index_error='0.00', energy_flux_error2='2.67e-05', EG='0.95', time_epoch_completed='1630596868.21', return_code='0', job_id='65471', GAL2='1.03', EG2='0.97', return_code2='0', energy_flux_error='1.72e-05', photon_flux_error2='5.46e-08', ts2='13.05', photon_index='2.37' WHERE bin_id='579' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:34:28 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0171>
Subject: Job 65471: <4FGL_J1040.5+0617_daily_bin579> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin579 160.15 6.2848 389404801 389664001 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 :                                   513.00 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             253.36 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   737 sec.
    Turnaround time :                            805 sec.

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

