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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1588
RA = 160.15, Dec = 6.2848
tmin = 650937601, tmax = 651196801
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='70555', job_status='RUN', time_executed='2021-09-02 08:44:02.058484', time_epoch_executed='1630597442.06' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1588'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/70555

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/70555/ft1_4FGL_J1040.5+0617_daily_bin1588.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/70555/ft2_4FGL_J1040.5+0617_daily_bin1588.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/70555/ft1_4FGL_J1040.5+0617_daily_bin1588.fits outfile=/scratch/kocevski/70555/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1588.fits ra=160.15 dec=6.2848 rad=12.0 tmin=650937601.0 tmax=651196801.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.68
user 3.43
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/70555/ft1_filtered_4FGL_J1040.5+0617_daily_bin1588.fits" evtable="EVENTS" scfile=/scratch/kocevski/70555/ft2_4FGL_J1040.5+0617_daily_bin1588.fits sctable="SC_DATA" outfile=/scratch/kocevski/70555/ltcube_650937601_651196801_4FGL_J1040.5+0617_daily_bin1588.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/70555/ft2_4FGL_J1040.5+0617_daily_bin1588.fits
.....................!
real 17.02
user 16.61
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/70555/ft1_filtered_4FGL_J1040.5+0617_daily_bin1588.fits evtable="EVENTS" scfile=/scratch/kocevski/70555/ft2_4FGL_J1040.5+0617_daily_bin1588.fits sctable="SC_DATA" expcube=/scratch/kocevski/70555/ltcube_650937601_651196801_4FGL_J1040.5+0617_daily_bin1588.fits outfile=/scratch/kocevski/70555/expmap_650937601_651196801_4FGL_J1040.5+0617_daily_bin1588.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/70555/ltcube_650937601_651196801_4FGL_J1040.5+0617_daily_bin1588.fits
.....................!
real 193.27
user 187.80
sys 4.84

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/70555/ft1_filtered_4FGL_J1040.5+0617_daily_bin1588.fits scfile=/scratch/kocevski/70555/ft2_4FGL_J1040.5+0617_daily_bin1588.fits outfile=/scratch/kocevski/70555/cmap_650937601_651196801_4FGL_J1040.5+0617_daily_bin1588.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.57
user 0.39
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/70555/ft1_filtered_4FGL_J1040.5+0617_daily_bin1588.fits scfile=/scratch/kocevski/70555/ft2_4FGL_J1040.5+0617_daily_bin1588.fits outfile=/scratch/kocevski/70555/cmap_HighResolution_650937601_651196801_4FGL_J1040.5+0617_daily_bin1588.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.42
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.3929       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10499E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    7.6163       1.0000         .10000E-03   10000.    
     4 'Prefactor '    11.954       1.0000         .10000E-03   10000.    
     5 'Prefactor '    3.3754       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .33336E-02   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .13516E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    5.2146       1.0000         .10000E-03   10000.    
     9 'Prefactor '    8.3980       1.0000         .10000E-03   10000.    
    10 'Prefactor '    4.1934       1.0000         .10000E-03   10000.    
    11 'Prefactor '    18.966       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .20613E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10033E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2134       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2373       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=   7854.315     FROM MIGRAD    STATUS=CONVERGED    404 CALLS     2241 TOTAL
                     EDM=   .27E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.3776        53.661        .17481E-05    .48214E-04
   2  Prefactor     .10000E-03    76.350       -.12433E-05** at limit **
   3  norm          7.6228        30.540       -.20566E-05    .22772E-04
   4  Prefactor     11.969        11.962       -.15822E-05    .18149E-03
   5  Prefactor     3.3121        464.56       -.39255E-05   -.21490E-04
   6  Prefactor     .10000E-03    278.97       -.11292E-04** at limit **
   7  Prefactor     .10000E-03    35.942       -.14417E-05** at limit **
   8  norm          5.2146        1.7547       -.15176E-06    .13218E-04
   9  Prefactor     8.3924        6.5120        .22908E-05   -.21791E-03
  10  Prefactor     4.1931        3.1428        .24345E-07   -.11043E-04
  11  Prefactor     18.961        9.4475       -.36294E-08   -.66610E-05
  12  Prefactor     .10000E-03    2.7304        .10559E-06** at limit **
  13  norm          .10000E-03    .99382E-01    .47796E-07** at limit **
  14  Prefactor     .10000E-03    2.0247        .78353E-07** at limit **
  15  norm          .10000E-03    .73503        .19296E-06** at limit **
  16  Prefactor     .10001E-03    107.06        .69425E-05** at limit **
  17  norm          .10000E-03    27.072        .55437E-06** at limit **
  18  Normalizat    1.2135        .20712        .17913E-05   -.18494E-03
  19  Prefactor     1.2373        .16955       -.21207E-05    .88688E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.37763
  Prefactor  = 0.000100002
  norm       = 7.62277
  Prefactor  = 11.9695
  Prefactor  = 3.31208
  Prefactor  = 0.000100002
  Prefactor  = 0.000100002
  norm       = 5.21457
  Prefactor  = 8.39243
  Prefactor  = 4.19315
  Prefactor  = 18.9612
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100007
  norm       = 0.0001
  Normalizat = 1.21349
  Prefactor  = 1.23734
 **********
 **   18 **HESSE 
 **********

 FCN=   7854.315     FROM HESSE     STATUS=OK           268 CALLS     2509 TOTAL
                     EDM=   .64E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.3776        44.053        .26475E-03   -1.5400    
   2  Prefactor     .10000E-03    77.599        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          7.6228        27.974        .14531E-03   -1.5156    
   4  Prefactor     11.969        11.755        .11586E-03   -1.5016    
   5  Prefactor     3.3121        459.92        .22025E-03   -1.5344    
   6  Prefactor     .10000E-03    274.78        .19711E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    36.189        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          5.2146        1.7529        .64466E-04   -1.5251    
   9  Prefactor     8.3924        6.6558        .69167E-03   -1.5128    
  10  Prefactor     4.1931        3.1407        .12982E-03   -1.5298    
  11  Prefactor     18.961        9.4944        .91967E-04   -1.4837    
  12  Prefactor     .10000E-03    2.7449        .14296E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .10332        .54512E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    2.0375        .12313E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    .75955        .14808E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10001E-03    112.28        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    28.041        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.2135        .24605        .28918E-03   -.86187    
  19  Prefactor     1.2373        .20098        .24833E-03   -.85190    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.36455e-10
Minuit parameter uncertainties:
  1  20.4858
  2  0.000860538
  3  28.0217
  4  11.7576
  5  78.6817
  6  0.00159
  7  0.000518331
  8  1.75287
  9  6.65634
  10  3.14086
  11  9.49518
  12  1.51055e-06
  13  3.01867e-08
  14  3.74084e-07
  15  1.52659e-06
  16  0.00171975
  17  2.57615e-05
  18  0.246289
  19  0.201101
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.193e+00  3.141e+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.237e+00  2.011e-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.213e+00  2.463e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.69
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 5.07e-08 +/- 3.79e-08
Energy Flux (Fixed Index): 1.73e-05 +/- 1.30e-05

TS (Fixed Index): 2.69
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.31e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.01e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/70555/likelihoodResults_650937601_651196801_4FGL_J1040.5+0617_daily_bin1588.txt

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) = 7854.29666649
delta logL = 0.0183463299782

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7854.28991952
delta logL = 0.0250933045136

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.8099       1.0000         .10000E-03   10000.    
     2 'Index     '    2.5140       1.0000          .0000       10.000    
     3 'Normalizat'    1.2041       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2429       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=   7854.290     FROM MIGRAD    STATUS=CONVERGED     89 CALLS      255 TOTAL
                     EDM=   .69E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.8098        3.6666        .12093E-03    .46639E-03
   2  Index         2.5141        .70790        .85337E-02    .58257E-04
   3  Normalizat    1.2041        .23313        .29014E-03   -.49880E-04
   4  Prefactor     1.2429        .19939        .24787E-03   -.77283E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.80983
  Index      = 2.51413
  Normalizat = 1.20411
  Prefactor  = 1.24291
 **********
 **   18 **HESSE 
 **********

 FCN=   7854.290     FROM HESSE     STATUS=OK            25 CALLS      280 TOTAL
                     EDM=   .56E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.8098        3.4640        .48371E-05   -1.5318    
   2  Index         2.5141        .66816        .34135E-03   -.52034    
   3  Normalizat    1.2041        .23302        .11606E-04   -.86476    
   4  Prefactor     1.2429        .19934        .99148E-05   -.85021    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.62968e-11
Minuit parameter uncertainties:
  1  3.46421
  2  0.670833
  3  0.23322
  4  0.199465
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/70555': 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) = 7854.28991947
delta logL = 0.025093353619

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.810e+00  3.464e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.514e+00  6.708e-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.243e+00  1.995e-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.204e+00  2.332e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.73
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.51 +/- 0.67
Photon Flux (Free Index): 5.70e-08 +/- 4.95e-08
Energy Flux (Free Index): 1.63e-05 +/- 1.27e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/70555/cmap_HighResolution_650937601_651196801_4FGL_J1040.5+0617_daily_bin1588.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.01e-02', comment='SUCCESS', photon_flux='5.07e-08', energy_flux2='1.63e-05', photon_flux_error='3.79e-08', dlogl='2.51e-02', energy_flux='1.73e-05', photon_flux2='5.70e-08', job_status='DONE', time_completed='2021-09-02 08:56:14.049090', photon_index_error2='0.67', photon_index2='2.51', ts='2.69', fit_tolerance='1e-08', GAL='1.24', photon_index_error='0.00', photon_flux_upper_limit='1.31e-07', energy_flux_error2='1.27e-05', EG='1.21', time_epoch_completed='1630598174.05', return_code='0', job_id='70555', GAL2='1.24', EG2='1.20', return_code2='0', energy_flux_error='1.30e-05', photon_flux_error2='4.95e-08', ts2='2.73', photon_index='2.37' WHERE bin_id='1588' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:56:14 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0195>
Subject: Job 70555: <4FGL_J1040.5+0617_daily_bin1588> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1588 160.15 6.2848 650937601 651196801 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 :                                   695.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             260.63 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   866 sec.
    Turnaround time :                            901 sec.

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

