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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1094
RA = 160.15, Dec = 6.2848
tmin = 522892801, tmax = 523152001
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='68013', job_status='RUN', time_executed='2021-09-02 08:35:55.938170', time_epoch_executed='1630596955.94' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1094'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/68013

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/68013/ft1_4FGL_J1040.5+0617_daily_bin1094.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/68013/ft2_4FGL_J1040.5+0617_daily_bin1094.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/68013/ft1_4FGL_J1040.5+0617_daily_bin1094.fits outfile=/scratch/kocevski/68013/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1094.fits ra=160.15 dec=6.2848 rad=12.0 tmin=522892801.0 tmax=523152001.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.79
user 3.54
sys 0.18

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/68013/ft2_4FGL_J1040.5+0617_daily_bin1094.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/68013/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1094.fits evtable="EVENTS" outfile="/scratch/kocevski/68013/ft1_filtered_4FGL_J1040.5+0617_daily_bin1094.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.50
user 0.33
sys 0.16

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/68013/ft1_filtered_4FGL_J1040.5+0617_daily_bin1094.fits evtable="EVENTS" scfile=/scratch/kocevski/68013/ft2_4FGL_J1040.5+0617_daily_bin1094.fits sctable="SC_DATA" expcube=/scratch/kocevski/68013/ltcube_522892801_523152001_4FGL_J1040.5+0617_daily_bin1094.fits outfile=/scratch/kocevski/68013/expmap_522892801_523152001_4FGL_J1040.5+0617_daily_bin1094.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/68013/ltcube_522892801_523152001_4FGL_J1040.5+0617_daily_bin1094.fits
.....................!
real 191.91
user 187.16
sys 3.88

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/68013/ft1_filtered_4FGL_J1040.5+0617_daily_bin1094.fits scfile=/scratch/kocevski/68013/ft2_4FGL_J1040.5+0617_daily_bin1094.fits outfile=/scratch/kocevski/68013/cmap_522892801_523152001_4FGL_J1040.5+0617_daily_bin1094.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/68013/ft1_filtered_4FGL_J1040.5+0617_daily_bin1094.fits scfile=/scratch/kocevski/68013/ft2_4FGL_J1040.5+0617_daily_bin1094.fits outfile=/scratch/kocevski/68013/cmap_HighResolution_522892801_523152001_4FGL_J1040.5+0617_daily_bin1094.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.55
user 0.40
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.0783       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10089E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    43.070       1.0000         .10000E-03   10000.    
     4 'Prefactor '    16.590       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .15427E-02   1.0000         .10000E-03   10000.    
     6 'Prefactor '    113.27       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10469E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    4.1265       1.0000         .10000E-03   10000.    
     9 'Prefactor '    3.6244       1.0000         .10000E-03   10000.    
    10 'Prefactor '    5.3894       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10061E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.0418       1.0000         .10000E-03   10000.    
    15 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    22.873       1.0000         .10000E-03   10000.    
    17 'norm      '    22.597       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .95040       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1539       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5360E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6582.676     FROM MIGRAD    STATUS=CONVERGED     74 CALLS     1596 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY= 22.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.0777        1.2460        .58285E-05    .26370E-02
   2  Prefactor     .10000E-03    31.638        .11103E-04** at limit **
   3  norm          43.071        1.2986        .18187E-05    .25355E-02
   4  Prefactor     16.588        1.0805        .14510E-05    .15699E-02
   5  Prefactor     .10373E-03    291.11       -.49145E-03** at limit **
   6  Prefactor     113.26        3.0389       -.38887E-05    .43242E-02
   7  Prefactor     .10000E-03    13.431       -.24491E-05** at limit **
   8  norm          4.1264        1.7005        .12925E-06    .25524E-03
   9  Prefactor     3.6217        2.0788       -.96492E-06   -.48852E-02
  10  Prefactor     5.3890        3.7379        .87506E-06    .14783E-03
  11  Prefactor     .10000E-03    1.9560       -.86112E-06** at limit **
  12  Prefactor     .10000E-03    5.8131       -.51637E-06** at limit **
  13  norm          .10000E-03    .47977       -.12278E-05** at limit **
  14  Prefactor     4.0434        5.4491       -.15239E-04   -.24986E-02
  15  norm          .10000E-03    1.6190       -.80701E-06** at limit **
  16  Prefactor     22.861        5.6025       -.16527E-04   -.55613E-02
  17  norm          22.600        1.2146        .20639E-05    .18572E-02
  18  Normalizat    .95034        .21976        .68731E-05    .16523E-03
  19  Prefactor     1.1540        .18970       -.42094E-06    .19008E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.07769
  Prefactor  = 0.0001
  norm       = 43.0711
  Prefactor  = 16.5884
  Prefactor  = 0.000103734
  Prefactor  = 113.261
  Prefactor  = 0.0001
  norm       = 4.12638
  Prefactor  = 3.62165
  Prefactor  = 5.38898
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 4.04338
  norm       = 0.0001
  Prefactor  = 22.8606
  norm       = 22.5996
  Normalizat = 0.95034
  Prefactor  = 1.15403
 **********
 **   18 **HESSE 
 **********

 FCN=   6582.676     FROM HESSE     STATUS=OK           320 CALLS     1916 TOTAL
                     EDM=   .22E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.0777        9.9544        .57794E-02   -1.5357    
   2  Prefactor     .10000E-03    31.557        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          43.071        22.373        .15271E-02   -1.4394    
   4  Prefactor     16.588        15.919        .24583E-02   -1.4893    
   5  Prefactor     .10373E-03    316.81        .10224E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     113.26        91.901        .94499E-03   -1.3575    
   7  Prefactor     .10000E-03    13.429        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          4.1264        1.7167        .49609E-02   -1.5302    
   9  Prefactor     3.6217        6.2073        .53054E-02   -1.5327    
  10  Prefactor     5.3890        3.7507        .43276E-02   -1.5244    
  11  Prefactor     .10000E-03    1.9520        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    5.6748        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .28360        .15768E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     4.0434        6.0242        .50143E-02   -1.5306    
  15  norm          .10000E-03    .92914        .27498E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     22.861        21.180        .20938E-02   -1.4751    
  17  norm          22.600        14.692        .21065E-02   -1.4757    
  18  Normalizat    .95034        .19460        .65890E-01   -.94713    
  19  Prefactor     1.1540        .16129        .52399E-01   -.87758    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.23541e-07
Minuit parameter uncertainties:
  1  9.9598
  2  0.00013997
  3  22.3772
  4  15.9227
  5  0.0691562
  6  92.0172
  7  0.000102343
  8  1.71675
  9  6.20841
  10  3.7509
  11  1.07674e-05
  12  1.77323e-05
  13  1.28331e-05
  14  6.02514
  15  1.1119e-05
  16  21.1868
  17  14.6945
  18  0.194742
  19  0.161357
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.389e+00  3.751e+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.154e+00  1.614e-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.503e-01  1.947e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.36
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 6.51e-08 +/- 4.53e-08
Energy Flux (Fixed Index): 2.23e-05 +/- 1.55e-05

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

Saving results to:
/scratch/kocevski/68013/likelihoodResults_522892801_523152001_4FGL_J1040.5+0617_daily_bin1094.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) = 6582.61131323
delta logL = 0.0650690104621

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6582.60912791
delta logL = 0.0672543330656

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.1657       1.0000         .10000E-03   10000.    
     2 'Index     '    2.1660       1.0000          .0000       10.000    
     3 'Normalizat'    .96261       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1463       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=   6582.609     FROM MIGRAD    STATUS=CONVERGED     59 CALLS      271 TOTAL
                     EDM=   .12E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.1717        125.51        .40419E-02    .22784E-03
   2  Index         2.1669        5.9081        .16096        .46075E-04
   3  Normalizat    .96250        .12814        .65518E-01    .16720E-04
   4  Prefactor     1.1463        .96850E-01    .52544E-01    .40854E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.17168
  Index      = 2.16693
  Normalizat = 0.962495
  Prefactor  = 1.14632
 **********
 **   18 **HESSE 
 **********

 FCN=   6582.609     FROM HESSE     STATUS=OK            33 CALLS      304 TOTAL
                     EDM=   .94E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.1717        4.5735        .13333E-03   -1.5211    
   2  Index         2.1669        .53205        .79486E-02   -.60239    
   3  Normalizat    .96250        .22058        .28979E-03   -.94298    
   4  Prefactor     1.1463        .19024        .23230E-03   -.87999    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.42511e-13
Minuit parameter uncertainties:
  1  4.5738
  2  0.533537
  3  0.220789
  4  0.19035
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/68013': 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) = 6582.60912441
delta logL = 0.0672578320609

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  6.172e+00  4.574e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.167e+00  5.335e-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.146e+00  1.904e-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.625e-01  2.208e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.48
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.17 +/- 0.53
Photon Flux (Free Index): 5.66e-08 +/- 4.61e-08
Energy Flux (Free Index): 2.71e-05 +/- 2.50e-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/68013/cmap_HighResolution_522892801_523152001_4FGL_J1040.5+0617_daily_bin1094.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.22e-02', comment='SUCCESS', photon_flux='6.51e-08', energy_flux2='2.71e-05', photon_flux_error='4.53e-08', dlogl='6.73e-02', energy_flux='2.23e-05', photon_flux2='5.66e-08', job_status='DONE', time_completed='2021-09-02 08:46:04.343421', photon_index_error2='0.53', photon_index2='2.17', ts='3.36', fit_tolerance='1e-08', GAL='1.15', photon_index_error='0.00', photon_flux_upper_limit='1.59e-07', energy_flux_error2='2.50e-05', EG='0.95', time_epoch_completed='1630597564.34', return_code='0', job_id='68013', GAL2='1.15', EG2='0.96', return_code2='0', energy_flux_error='1.55e-05', photon_flux_error2='4.61e-08', ts2='3.48', photon_index='2.37' WHERE bin_id='1094' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:46:04 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0233>
Subject: Job 68013: <4FGL_J1040.5+0617_daily_bin1094> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1094 160.15 6.2848 522892801 523152001 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 :                                   583.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             294.31 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   788 sec.
    Turnaround time :                            875 sec.

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

