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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin465
RA = 160.15, Dec = 6.2848
tmin = 359856001, tmax = 360115201
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='64362', job_status='RUN', time_executed='2021-09-02 08:21:45.187374', time_epoch_executed='1630596105.19' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='465'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64362

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

Retrieving the FT1 file...

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

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

Retrieving 45 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64362/ft1_4FGL_J1040.5+0617_daily_bin465.fits


Retrieving the FT1 file...

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

Retrieving 45 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64362/ft2_4FGL_J1040.5+0617_daily_bin465.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64362/ft1_4FGL_J1040.5+0617_daily_bin465.fits outfile=/scratch/kocevski/64362/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin465.fits ra=160.15 dec=6.2848 rad=12.0 tmin=359856001.0 tmax=360115201.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.27
user 3.04
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/64362/ft1_filtered_4FGL_J1040.5+0617_daily_bin465.fits" evtable="EVENTS" scfile=/scratch/kocevski/64362/ft2_4FGL_J1040.5+0617_daily_bin465.fits sctable="SC_DATA" outfile=/scratch/kocevski/64362/ltcube_359856001_360115201_4FGL_J1040.5+0617_daily_bin465.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/64362/ft2_4FGL_J1040.5+0617_daily_bin465.fits
.....................!
real 15.94
user 15.19
sys 0.38

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64362/ft1_filtered_4FGL_J1040.5+0617_daily_bin465.fits evtable="EVENTS" scfile=/scratch/kocevski/64362/ft2_4FGL_J1040.5+0617_daily_bin465.fits sctable="SC_DATA" expcube=/scratch/kocevski/64362/ltcube_359856001_360115201_4FGL_J1040.5+0617_daily_bin465.fits outfile=/scratch/kocevski/64362/expmap_359856001_360115201_4FGL_J1040.5+0617_daily_bin465.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/64362/ltcube_359856001_360115201_4FGL_J1040.5+0617_daily_bin465.fits
.....................!
real 192.98
user 186.81
sys 4.24

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/64362/ft1_filtered_4FGL_J1040.5+0617_daily_bin465.fits scfile=/scratch/kocevski/64362/ft2_4FGL_J1040.5+0617_daily_bin465.fits outfile=/scratch/kocevski/64362/cmap_359856001_360115201_4FGL_J1040.5+0617_daily_bin465.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.56
user 0.40
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/64362/ft1_filtered_4FGL_J1040.5+0617_daily_bin465.fits scfile=/scratch/kocevski/64362/ft2_4FGL_J1040.5+0617_daily_bin465.fits outfile=/scratch/kocevski/64362/cmap_HighResolution_359856001_360115201_4FGL_J1040.5+0617_daily_bin465.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.62
user 0.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10052E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10041E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    48.332       1.0000         .10000E-03   10000.    
     4 'Prefactor '    5.1513       1.0000         .10000E-03   10000.    
     5 'Prefactor '    29.387       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10071E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10063E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .18507E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    7.1975       1.0000         .10000E-03   10000.    
    10 'Prefactor '    5.0387       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    14.361       1.0000         .10000E-03   10000.    
    13 'norm      '    .78848       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10258E-01   1.0000         .10000E-03   10000.    
    15 'norm      '    1.0012       1.0000         .10000E-03   10000.    
    16 'Prefactor '    4.6676       1.0000         .10000E-03   10000.    
    17 'norm      '    11.336       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.3707       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0609       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=   5757.154     FROM MIGRAD    STATUS=CONVERGED    392 CALLS     1943 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    18.887        .33053E-06** at limit **
   2  Prefactor     .10000E-03    42.433        .50156E-04** at limit **
   3  norm          48.321        27.253       -.79562E-05    .17098E-04
   4  Prefactor     5.1615        13.973       -.31196E-05   -.75555E-04
   5  Prefactor     29.430        79.888        .69309E-04    .21644E-04
   6  Prefactor     .10000E-03    36.592       -.35041E-04** at limit **
   7  Prefactor     .10000E-03    8.8997       -.21784E-06** at limit **
   8  norm          .10000E-03    1.0079        .49448E-06** at limit **
   9  Prefactor     7.1984        8.3968       -.35534E-05   -.34877E-03
  10  Prefactor     5.0381        3.8223       -.23868E-06   -.22009E-03
  11  Prefactor     .10000E-03    2.9832        .16643E-06** at limit **
  12  Prefactor     14.363        10.303        .56713E-07    .14664E-03
  13  norm          .78865        .57649        .12583E-06    .18251E-02
  14  Prefactor     .10116E-03    8.9866       -.15007E-05** at limit **
  15  norm          1.0011        .89627        .77002E-07    .60248E-04
  16  Prefactor     4.6656        24.692        .10226E-05   -.24802E-04
  17  norm          11.336        10.332       -.13069E-06   -.35553E-04
  18  Normalizat    1.3710        .22643       -.53736E-05    .20293E-03
  19  Prefactor     1.0606        .18675        .21734E-05   -.28566E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 48.3212
  Prefactor  = 5.16147
  Prefactor  = 29.4296
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 7.19835
  Prefactor  = 5.03812
  Prefactor  = 0.0001
  Prefactor  = 14.3627
  norm       = 0.788645
  Prefactor  = 0.000101157
  norm       = 1.00106
  Prefactor  = 4.66563
  norm       = 11.3355
  Normalizat = 1.37099
  Prefactor  = 1.06064
 **********
 **   18 **HESSE 
 **********

 FCN=   5757.154     FROM HESSE     STATUS=OK           270 CALLS     2213 TOTAL
                     EDM=   .15E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    19.044        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    42.423        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          48.321        27.169        .57679E-04   -1.4317    
   4  Prefactor     5.1615        13.876        .17713E-03   -1.5254    
   5  Prefactor     29.430        80.241        .73907E-04   -1.4622    
   6  Prefactor     .10000E-03    36.684        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    8.9015        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    4.9557        .14320E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     7.1984        8.3201        .14951E-03   -1.5171    
  10  Prefactor     5.0381        3.8195        .12239E-03   -1.5259    
  11  Prefactor     .10000E-03    3.0070        .12795E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     14.363        10.137        .10569E-03   -1.4950    
  13  norm          .78865        .54965        .44163E-04   -1.5530    
  14  Prefactor     .10116E-03    83.102        .39626E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.0011        .90261        .65770E-04   -1.5508    
  16  Prefactor     4.6656        24.634        .18627E-03   -1.5276    
  17  norm          11.336        10.331        .11899E-03   -1.5034    
  18  Normalizat    1.3710        .26938        .26815E-03   -.81471    
  19  Prefactor     1.0606        .22256        .26112E-03   -.90735    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.4764e-08
Minuit parameter uncertainties:
  1  0.000160472
  2  1.91889e-05
  3  27.176
  4  13.8845
  5  80.5371
  6  0.000247227
  7  4.28265e-05
  8  6.97357e-05
  9  8.32142
  10  3.81972
  11  9.78671e-06
  12  10.1381
  13  0.549652
  14  0.0196388
  15  0.902621
  16  21.4549
  17  10.3326
  18  0.269656
  19  0.222753
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.038e+00  3.820e+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.061e+00  2.228e-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.371e+00  2.697e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.79
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 6.09e-08 +/- 4.61e-08
Energy Flux (Fixed Index): 2.08e-05 +/- 1.58e-05

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

Saving results to:
/scratch/kocevski/64362/likelihoodResults_359856001_360115201_4FGL_J1040.5+0617_daily_bin465.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) = 5757.03462581
delta logL = 0.119685515114

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5757.03175229
delta logL = 0.122559041931

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    5.7507       1.0000         .10000E-03   10000.    
     2 'Index     '    2.0754       1.0000          .0000       10.000    
     3 'Normalizat'    1.3888       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0508       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=   5757.032     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      247 TOTAL
                     EDM=   .36E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.7500        168.48        .41873E-02    .11583E-03
   2  Index         2.0755        5.4390        .17314        .17951E-04
   3  Normalizat    1.3888        .19372        .60317E-01    .46998E-05
   4  Prefactor     1.0508        .13911        .59289E-01    .87102E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.74995
  Index      = 2.07545
  Normalizat = 1.38877
  Prefactor  = 1.05077
 **********
 **   18 **HESSE 
 **********

 FCN=   5757.032     FROM HESSE     STATUS=OK            33 CALLS      280 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.7500        4.5467        .13766E-03   -1.5228    
   2  Index         2.0755        .57226        .86793E-02   -.62477    
   3  Normalizat    1.3888        .25401        .26676E-03   -.80954    
   4  Prefactor     1.0508        .22014        .26219E-03   -.91056    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.05781e-10
Minuit parameter uncertainties:
  1  4.54697
  2  0.574174
  3  0.254244
  4  0.220335
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64362': 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) = 5757.03175226
delta logL = 0.122559066273

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.750e+00  4.547e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.075e+00  5.742e-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.051e+00  2.203e-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.389e+00  2.542e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.04
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.08 +/- 0.57
Photon Flux (Free Index): 4.70e-08 +/- 4.70e-08
Energy Flux (Free Index): 2.72e-05 +/- 2.79e-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/64362/cmap_HighResolution_359856001_360115201_4FGL_J1040.5+0617_daily_bin465.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.25e-02', comment='SUCCESS', photon_flux='6.09e-08', energy_flux2='2.72e-05', photon_flux_error='4.61e-08', dlogl='1.23e-01', energy_flux='2.08e-05', photon_flux2='4.70e-08', job_status='DONE', time_completed='2021-09-02 08:31:30.341921', photon_index_error2='0.57', photon_index2='2.08', ts='3.79', fit_tolerance='1e-08', GAL='1.06', photon_index_error='0.00', photon_flux_upper_limit='1.62e-07', energy_flux_error2='2.79e-05', EG='1.37', time_epoch_completed='1630596690.34', return_code='0', job_id='64362', GAL2='1.05', EG2='1.39', return_code2='0', energy_flux_error='1.58e-05', photon_flux_error2='4.70e-08', ts2='4.04', photon_index='2.37' WHERE bin_id='465' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:31:30 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0256>
Subject: Job 64362: <4FGL_J1040.5+0617_daily_bin465> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin465> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Sep  2 08:16:26 2021
Job was executed on host(s) <bullet0256>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:18:01 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:18:01 2021
Terminated at Thu Sep  2 08:31:31 2021
Results reported at Thu Sep  2 08:31:31 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin465 160.15 6.2848 359856001 360115201 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 :                                   578.26 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             243.71 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   810 sec.
    Turnaround time :                            905 sec.

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

