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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1109
RA = 160.15, Dec = 6.2848
tmin = 526780801, tmax = 527040001
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='68046', job_status='RUN', time_executed='2021-09-02 08:36:56.718998', time_epoch_executed='1630597016.72' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1109'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/68046

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/68046/ft1_4FGL_J1040.5+0617_daily_bin1109.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/68046/ft2_4FGL_J1040.5+0617_daily_bin1109.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/68046/ft1_4FGL_J1040.5+0617_daily_bin1109.fits outfile=/scratch/kocevski/68046/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1109.fits ra=160.15 dec=6.2848 rad=12.0 tmin=526780801.0 tmax=527040001.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.34
user 4.08
sys 0.23

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/68046/ft1_filtered_4FGL_J1040.5+0617_daily_bin1109.fits evtable="EVENTS" scfile=/scratch/kocevski/68046/ft2_4FGL_J1040.5+0617_daily_bin1109.fits sctable="SC_DATA" expcube=/scratch/kocevski/68046/ltcube_526780801_527040001_4FGL_J1040.5+0617_daily_bin1109.fits outfile=/scratch/kocevski/68046/expmap_526780801_527040001_4FGL_J1040.5+0617_daily_bin1109.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/68046/ltcube_526780801_527040001_4FGL_J1040.5+0617_daily_bin1109.fits
.....................!
real 190.87
user 185.27
sys 5.17

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Added 169 point sources and 0 extended sources

Setting source of interest to:
4FGL J1040.5+0617 @ 160.15 6.2848

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/68046/ft1_filtered_4FGL_J1040.5+0617_daily_bin1109.fits scfile=/scratch/kocevski/68046/ft2_4FGL_J1040.5+0617_daily_bin1109.fits outfile=/scratch/kocevski/68046/cmap_526780801_527040001_4FGL_J1040.5+0617_daily_bin1109.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/68046/ft1_filtered_4FGL_J1040.5+0617_daily_bin1109.fits scfile=/scratch/kocevski/68046/ft2_4FGL_J1040.5+0617_daily_bin1109.fits outfile=/scratch/kocevski/68046/cmap_HighResolution_526780801_527040001_4FGL_J1040.5+0617_daily_bin1109.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.56
user 0.38
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    7.1257       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10193E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10049E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    7.7900       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .11735E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .13252E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10634E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    4.1660       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .23750E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    5.9143       1.0000         .10000E-03   10000.    
    11 'Prefactor '    15.478       1.0000         .10000E-03   10000.    
    12 'Prefactor '    5.0703       1.0000         .10000E-03   10000.    
    13 'norm      '    .38487       1.0000         .10000E-03   10000.    
    14 'Prefactor '    9.3486       1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    45.679       1.0000         .10000E-03   10000.    
    17 'norm      '    5.2903       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.3896       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1815       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=   6895.641     FROM MIGRAD    STATUS=CONVERGED    394 CALLS     1940 TOTAL
                     EDM=   .42E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     7.1253        8.4632       -.74333E-06   -.25083E-03
   2  Prefactor     .10000E-03    16.175        .10732E-06** at limit **
   3  norm          .10000E-03    7.8221       -.12081E-07** at limit **
   4  Prefactor     7.7798        9.6623       -.82229E-07   -.53077E-04
   5  Prefactor     .10000E-03    46.843        .88636E-07** at limit **
   6  Prefactor     .10000E-03    94.795        .15108E-06** at limit **
   7  Prefactor     .10000E-03    18.296       -.12605E-06** at limit **
   8  norm          4.1665        1.5203       -.76135E-08    .24598E-04
   9  Prefactor     .10000E-03    5.1830        .28641E-07** at limit **
  10  Prefactor     5.9137        4.2698        .45595E-07   -.31823E-04
  11  Prefactor     15.476        10.481       -.18369E-06   -.65043E-04
  12  Prefactor     5.0674        12.433       -.64964E-07   -.79660E-04
  13  norm          .38473        .48607       -.11773E-07   -.17577E-03
  14  Prefactor     9.3533        11.819        .34618E-06    .53353E-04
  15  norm          .10000E-03    .78171       -.50864E-07** at limit **
  16  Prefactor     45.664        32.414       -.30495E-05   -.39038E-03
  17  norm          5.2920        12.956        .32726E-05   -.42797E-03
  18  Normalizat    1.3897        .22701        .67367E-06   -.25691E-04
  19  Prefactor     1.1815        .18254       -.22997E-06    .44639E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 7.12529
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 7.77985
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 4.16649
  Prefactor  = 0.0001
  Prefactor  = 5.91375
  Prefactor  = 15.4764
  Prefactor  = 5.06737
  norm       = 0.384729
  Prefactor  = 9.35331
  norm       = 0.0001
  Prefactor  = 45.6644
  norm       = 5.29204
  Normalizat = 1.38967
  Prefactor  = 1.18154
 **********
 **   18 **HESSE 
 **********

 FCN=   6895.641     FROM HESSE     STATUS=OK           272 CALLS     2212 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     7.1253        8.5721        .15027E-03   -1.5174    
   2  Prefactor     .10000E-03    16.202        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    7.8337        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     7.7798        9.6316        .14367E-03   -1.5150    
   5  Prefactor     .10000E-03    46.930        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    94.948        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    18.377        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          4.1665        1.5209        .59927E-04   -1.5300    
   9  Prefactor     .10000E-03    5.4060        .36285E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     5.9137        4.2570        .13447E-03   -1.5222    
  11  Prefactor     15.476        10.550        .10180E-03   -1.4921    
  12  Prefactor     5.0674        12.374        .17857E-03   -1.5258    
  13  norm          .38473        .44631        .54419E-03   -1.5584    
  14  Prefactor     9.3533        11.513        .13107E-03   -1.5096    
  15  norm          .10000E-03    .80686        .14316E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     45.664        34.635        .59323E-04   -1.4355    
  17  norm          5.2920        15.186        .87372E-03   -1.5248    
  18  Normalizat    1.3897        .27497        .29517E-03   -.80928    
  19  Prefactor     1.1815        .21906        .26765E-03   -.86901    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.27187e-09
Minuit parameter uncertainties:
  1  8.5736
  2  1.12648e-05
  3  4.15394e-06
  4  9.63352
  5  1.71819e-05
  6  0.000131001
  7  1.06679e-05
  8  1.5209
  9  6.38765e-06
  10  4.25722
  11  10.5508
  12  12.3804
  13  0.446315
  14  11.5157
  15  1.04812e-06
  16  34.6504
  17  15.1973
  18  0.275263
  19  0.219232
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.914e+00  4.257e+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.182e+00  2.192e-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.390e+00  2.753e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.18
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 7.14e-08 +/- 5.14e-08
Energy Flux (Fixed Index): 2.45e-05 +/- 1.76e-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) = 6894.93065337
delta logL = 0.710570526548

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6894.92559445
delta logL = 0.71562944596

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    5.6349       1.0000         .10000E-03   10000.    
     2 'Index     '    1.5934       1.0000          .0000       10.000    
     3 'Normalizat'    1.4346       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1613       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=   6894.926     FROM MIGRAD    STATUS=CONVERGED     55 CALLS      215 TOTAL
                     EDM=   .82E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.6339        4.0208        .42307E-02    .81899E-03
   2  Index         1.5930        .35599        .21710       -.23494E-03
   3  Normalizat    1.4345        .21479        .65855E-01   -.27390E-04
   4  Prefactor     1.1614        .18187        .60958E-01    .14615E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.63388
  Index      = 1.59296
  Normalizat = 1.43455
  Prefactor  = 1.16136
 **********
 **   18 **HESSE 
 **********

 FCN=   6894.926     FROM HESSE     STATUS=OK            31 CALLS      246 TOTAL
                     EDM=   .50E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.6339        5.0749        .13645E-03   -1.5233    
   2  Index         1.5930        .54810        .78540E-02   -.74968    
   3  Normalizat    1.4345        .25744        .29131E-03   -.79635    
   4  Prefactor     1.1614        .21778        .26960E-03   -.87529    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.98958e-10
Minuit parameter uncertainties:
  1  5.0753
  2  0.550166
  3  0.257671
  4  0.217947
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/68046': 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) = 6894.92559393
delta logL = 0.715629968261

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.634e+00  5.075e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.593e+00  5.502e-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.161e+00  2.179e-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.435e+00  2.577e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.61
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.59 +/- 0.55
Photon Flux (Free Index): 2.90e-08 +/- 3.27e-08
Energy Flux (Free Index): 6.72e-05 +/- 8.00e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/68046/cmap_HighResolution_526780801_527040001_4FGL_J1040.5+0617_daily_bin1109.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='7.14e-08', energy_flux2='6.72e-05', photon_flux_error='5.14e-08', dlogl='7.16e-01', energy_flux='2.45e-05', photon_flux2='2.90e-08', job_status='DONE', time_completed='2021-09-02 08:46:28.848927', photon_index_error2='0.55', photon_index2='1.59', ts='4.18', fit_tolerance='1e-08', GAL='1.18', photon_index_error='0.00', energy_flux_error2='8.00e-05', EG='1.39', time_epoch_completed='1630597588.85', return_code='0', job_id='68046', GAL2='1.16', EG2='1.43', return_code2='0', energy_flux_error='1.76e-05', photon_flux_error2='3.27e-08', ts2='5.61', photon_index='2.37' WHERE bin_id='1109' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:46:28 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0289>
Subject: Job 68046: <4FGL_J1040.5+0617_daily_bin1109> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1109 160.15 6.2848 526780801 527040001 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 :                                   566.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             301.84 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   802 sec.
    Turnaround time :                            897 sec.

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

