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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1575
RA = 160.15, Dec = 6.2848
tmin = 647568001, tmax = 647827201
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='70539', job_status='RUN', time_executed='2021-09-02 08:45:08.964738', time_epoch_executed='1630597508.96' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1575'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/70539

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/70539/ft1_4FGL_J1040.5+0617_daily_bin1575.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/70539/ft2_4FGL_J1040.5+0617_daily_bin1575.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/70539/ft1_4FGL_J1040.5+0617_daily_bin1575.fits outfile=/scratch/kocevski/70539/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1575.fits ra=160.15 dec=6.2848 rad=12.0 tmin=647568001.0 tmax=647827201.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.50
user 3.26
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/70539/ft1_filtered_4FGL_J1040.5+0617_daily_bin1575.fits" evtable="EVENTS" scfile=/scratch/kocevski/70539/ft2_4FGL_J1040.5+0617_daily_bin1575.fits sctable="SC_DATA" outfile=/scratch/kocevski/70539/ltcube_647568001_647827201_4FGL_J1040.5+0617_daily_bin1575.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/70539/ft2_4FGL_J1040.5+0617_daily_bin1575.fits
.....................!
real 16.59
user 16.16
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/70539/ft1_filtered_4FGL_J1040.5+0617_daily_bin1575.fits evtable="EVENTS" scfile=/scratch/kocevski/70539/ft2_4FGL_J1040.5+0617_daily_bin1575.fits sctable="SC_DATA" expcube=/scratch/kocevski/70539/ltcube_647568001_647827201_4FGL_J1040.5+0617_daily_bin1575.fits outfile=/scratch/kocevski/70539/expmap_647568001_647827201_4FGL_J1040.5+0617_daily_bin1575.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/70539/ltcube_647568001_647827201_4FGL_J1040.5+0617_daily_bin1575.fits
.....................!
real 192.40
user 186.72
sys 4.99

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/70539/ft1_filtered_4FGL_J1040.5+0617_daily_bin1575.fits scfile=/scratch/kocevski/70539/ft2_4FGL_J1040.5+0617_daily_bin1575.fits outfile=/scratch/kocevski/70539/cmap_647568001_647827201_4FGL_J1040.5+0617_daily_bin1575.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.58
user 0.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/70539/ft1_filtered_4FGL_J1040.5+0617_daily_bin1575.fits scfile=/scratch/kocevski/70539/ft2_4FGL_J1040.5+0617_daily_bin1575.fits outfile=/scratch/kocevski/70539/cmap_HighResolution_647568001_647827201_4FGL_J1040.5+0617_daily_bin1575.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.59
user 0.39
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    11.154       1.0000         .10000E-03   10000.    
     2 'Prefactor '    8.0937       1.0000         .10000E-03   10000.    
     3 'norm      '    .10201E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    3.8796       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10040E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    5.7375       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .50945       1.0000         .10000E-03   10000.    
    10 'Prefactor '    9.4246       1.0000         .10000E-03   10000.    
    11 'Prefactor '    12.145       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10017E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    11.002       1.0000         .10000E-03   10000.    
    15 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    27.681       1.0000         .10000E-03   10000.    
    17 'norm      '    8.4079       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1503       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .93060       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=   5691.924     FROM MIGRAD    STATUS=CONVERGED    429 CALLS     1736 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     11.158        17.889       -.11061E-04    .10297E-03
   2  Prefactor     8.1323        99.915       -.28682E-04    .83009E-05
   3  norm          .10000E-03    13.612        .80341E-06** at limit **
   4  Prefactor     .10000E-03    3.7141        .38708E-06** at limit **
   5  Prefactor     3.7208        275.08       -.68554E-04    .17837E-04
   6  Prefactor     .10000E-03    16.587        .96544E-06** at limit **
   7  Prefactor     .10000E-03    4.8937        .13441E-06** at limit **
   8  norm          5.7390        2.1574        .18507E-06    .47508E-03
   9  Prefactor     .46978        5.2262       -.36585E-06    .42189E-04
  10  Prefactor     9.4245        4.6598       -.31736E-06    .19501E-03
  11  Prefactor     12.136        8.0028        .14797E-05    .72589E-04
  12  Prefactor     .10000E-03    2.7762       -.10705E-06** at limit **
  13  norm          .10000E-03    .45263       -.66191E-06** at limit **
  14  Prefactor     10.988        11.547        .17766E-05    .11885E-02
  15  norm          .10000E-03    .47955       -.31407E-06** at limit **
  16  Prefactor     27.664        21.578        .14618E-04    .96527E-04
  17  norm          8.4096        11.909       -.62872E-05   -.12375E-04
  18  Normalizat    1.1506        .21491        .35075E-05    .43132E-03
  19  Prefactor     .93063        .16852        .17211E-06    .62524E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 11.1579
  Prefactor  = 8.13234
  norm       = 0.000100005
  Prefactor  = 0.0001
  Prefactor  = 3.7208
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 5.73896
  Prefactor  = 0.469782
  Prefactor  = 9.42452
  Prefactor  = 12.1365
  Prefactor  = 0.0001
  norm       = 0.000100002
  Prefactor  = 10.9878
  norm       = 0.0001
  Prefactor  = 27.6643
  norm       = 8.40964
  Normalizat = 1.15057
  Prefactor  = 0.930629
 **********
 **   18 **HESSE 
 **********

 FCN=   5691.924     FROM HESSE     STATUS=OK           274 CALLS     2010 TOTAL
                     EDM=   .33E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     11.158        17.728        .11996E-03   -1.5040    
   2  Prefactor     8.1323        99.590        .14093E-03   -1.5138    
   3  norm          .10000E-03    13.678        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    3.7213        .14200E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     3.7208        271.70        .20486E-03   -1.5322    
   6  Prefactor     .10000E-03    16.596        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    4.8953        .16300E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          5.7390        2.1538        .63422E-04   -1.5229    
   9  Prefactor     .46978        41.609        .31436E-02   -1.5571    
  10  Prefactor     9.4245        4.6802        .10770E-03   -1.5094    
  11  Prefactor     12.136        8.0440        .11495E-03   -1.5011    
  12  Prefactor     .10000E-03    2.7806        .12274E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    2.0349        .81147E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     10.988        9.7263        .12079E-03   -1.5045    
  15  norm          .10000E-03    .81950        .10120E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     27.664        21.528        .76145E-04   -1.4656    
  17  norm          8.4096        11.933        .13825E-03   -1.5128    
  18  Normalizat    1.1506        .25217        .26834E-03   -.88144    
  19  Prefactor     .93063        .19657        .24785E-03   -.95079    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.28846e-09
Minuit parameter uncertainties:
  1  17.7367
  2  57.0355
  3  0.000515901
  4  8.02745e-05
  5  63.8939
  6  0.000148103
  7  3.81109e-05
  8  2.15384
  9  8.84787
  10  4.68041
  11  8.04474
  12  1.83058e-05
  13  0.000116669
  14  9.72767
  15  3.02796e-05
  16  21.5338
  17  11.9368
  18  0.252436
  19  0.196716
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  9.425e+00  4.680e+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:  9.306e-01  1.967e-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.151e+00  2.524e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.76
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.14e-07 +/- 5.65e-08
Energy Flux (Fixed Index): 3.90e-05 +/- 1.94e-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) = 5691.52790164
delta logL = 0.39560420623

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5691.4915282
delta logL = 0.431977648042

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.3476       1.0000         .10000E-03   10000.    
     2 'Index     '    2.8588       1.0000          .0000       10.000    
     3 'Normalizat'    1.0896       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96542       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=   5691.492     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      276 TOTAL
                     EDM=   .82E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.3472        5.6762        .78802E-04    .52125E-03
   2  Index         2.8589        .64070        .42991E-02    .68138E-04
   3  Normalizat    1.0896        .24412        .27449E-03   -.59599E-04
   4  Prefactor     .96542        .19959        .24392E-03   -.15236E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.3472
  Index      = 2.85889
  Normalizat = 1.08959
  Prefactor  = 0.965418
 **********
 **   18 **HESSE 
 **********

 FCN=   5691.492     FROM HESSE     STATUS=OK            25 CALLS      301 TOTAL
                     EDM=   .92E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.3472        5.0712        .31521E-05   -1.5204    
   2  Index         2.8589        .57196        .17197E-03   -.44252    
   3  Normalizat    1.0896        .24316        .10980E-04   -.90087    
   4  Prefactor     .96542        .19892        .97567E-05   -.93891    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.15817e-11
Minuit parameter uncertainties:
  1  5.07156
  2  0.573501
  3  0.243409
  4  0.199074
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/70539': 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) = 5691.49152819
delta logL = 0.431977654396

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  6.347e+00  5.072e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.859e+00  5.735e-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:  9.654e-01  1.991e-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.090e+00  2.434e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 7.73
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.86 +/- 0.57
Photon Flux (Free Index): 1.63e-07 +/- 8.46e-08
Energy Flux (Free Index): 3.51e-05 +/- 1.60e-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/70539/cmap_HighResolution_647568001_647827201_4FGL_J1040.5+0617_daily_bin1575.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.14e-07', energy_flux2='3.51e-05', photon_flux_error='5.65e-08', dlogl='4.32e-01', energy_flux='3.90e-05', photon_flux2='1.63e-07', job_status='DONE', time_completed='2021-09-02 08:53:52.042299', photon_index_error2='0.57', photon_index2='2.86', ts='6.76', fit_tolerance='1e-08', GAL='0.93', photon_index_error='0.00', energy_flux_error2='1.60e-05', EG='1.15', time_epoch_completed='1630598032.04', return_code='0', job_id='70539', GAL2='0.97', EG2='1.09', return_code2='0', energy_flux_error='1.94e-05', photon_flux_error2='8.46e-08', ts2='7.73', photon_index='2.37' WHERE bin_id='1575' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:53:52 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0153>
Subject: Job 70539: <4FGL_J1040.5+0617_daily_bin1575> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1575 160.15 6.2848 647568001 647827201 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 :                                   514.54 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             236.17 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   731 sec.
    Turnaround time :                            760 sec.

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

