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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1554
RA = 160.15, Dec = 6.2848
tmin = 642124801, tmax = 642384001
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='70513', job_status='RUN', time_executed='2021-09-02 08:45:13.395928', time_epoch_executed='1630597513.4' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1554'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/70513

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/70513/ft1_4FGL_J1040.5+0617_daily_bin1554.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/70513/ft2_4FGL_J1040.5+0617_daily_bin1554.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/70513/ft1_4FGL_J1040.5+0617_daily_bin1554.fits outfile=/scratch/kocevski/70513/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1554.fits ra=160.15 dec=6.2848 rad=12.0 tmin=642124801.0 tmax=642384001.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 4.33
user 4.08
sys 0.21

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/70513/ft1_filtered_4FGL_J1040.5+0617_daily_bin1554.fits evtable="EVENTS" scfile=/scratch/kocevski/70513/ft2_4FGL_J1040.5+0617_daily_bin1554.fits sctable="SC_DATA" expcube=/scratch/kocevski/70513/ltcube_642124801_642384001_4FGL_J1040.5+0617_daily_bin1554.fits outfile=/scratch/kocevski/70513/expmap_642124801_642384001_4FGL_J1040.5+0617_daily_bin1554.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/70513/ltcube_642124801_642384001_4FGL_J1040.5+0617_daily_bin1554.fits
.....................!
real 192.81
user 187.74
sys 4.61

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/70513/ft1_filtered_4FGL_J1040.5+0617_daily_bin1554.fits scfile=/scratch/kocevski/70513/ft2_4FGL_J1040.5+0617_daily_bin1554.fits outfile=/scratch/kocevski/70513/cmap_642124801_642384001_4FGL_J1040.5+0617_daily_bin1554.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.40
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/70513/ft1_filtered_4FGL_J1040.5+0617_daily_bin1554.fits scfile=/scratch/kocevski/70513/ft2_4FGL_J1040.5+0617_daily_bin1554.fits outfile=/scratch/kocevski/70513/cmap_HighResolution_642124801_642384001_4FGL_J1040.5+0617_daily_bin1554.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.57
user 0.40
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    44.881       1.0000         .10000E-03   10000.    
     3 'norm      '    19.758       1.0000         .10000E-03   10000.    
     4 'Prefactor '    7.0284       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .11620E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10779E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    3.5417       1.0000         .10000E-03   10000.    
     9 'Prefactor '    3.2895       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .24103       1.0000         .10000E-03   10000.    
    11 'Prefactor '    24.903       1.0000         .10000E-03   10000.    
    12 'Prefactor '    8.8088       1.0000         .10000E-03   10000.    
    13 'norm      '    .63120       1.0000         .10000E-03   10000.    
    14 'Prefactor '    3.4853       1.0000         .10000E-03   10000.    
    15 'norm      '    1.5793       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10068E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    6.2810       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0950       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0030       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=   6518.667     FROM MIGRAD    STATUS=CONVERGED     75 CALLS     1319 TOTAL
                     EDM=   .31E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    5.4092       -.22507E-05** at limit **
   2  Prefactor     44.770        40.206       -.76983E-04    .49736E-03
   3  norm          19.765        1.7845        .37407E-05    .43765E-02
   4  Prefactor     7.0265        1.3153       -.38108E-05   -.26395E-02
   5  Prefactor     .10000E-03    18.856       -.16686E-04** at limit **
   6  Prefactor     .10000E-03    33.584        .17867E-04** at limit **
   7  Prefactor     .10000E-03    12.447       -.28643E-06** at limit **
   8  norm          3.5425        1.4932       -.69931E-06    .39567E-03
   9  Prefactor     3.2914        5.2443        .28530E-04   -.43581E-04
  10  Prefactor     .23854        3.3590       -.11850E-04   -.16001E-03
  11  Prefactor     24.906        1.1311       -.13994E-05   -.14295E-02
  12  Prefactor     8.8114        1.0506       -.15245E-05    .26716E-03
  13  norm          .63103        .47341       -.13023E-06   -.35331E-03
  14  Prefactor     3.4864        1.0435       -.20747E-05   -.62218E-04
  15  norm          1.5791        1.4503       -.20153E-05   -.84599E-05
  16  Prefactor     .10000E-03    9.4214       -.81171E-05** at limit **
  17  norm          6.2874        1.2915        .28442E-05    .25773E-02
  18  Normalizat    1.0946        .21743        .82793E-05    .52769E-04
  19  Prefactor     1.0033        .18320        .83896E-06    .61434E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 44.7704
  norm       = 19.765
  Prefactor  = 7.0265
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.5425
  Prefactor  = 3.29137
  Prefactor  = 0.23854
  Prefactor  = 24.9061
  Prefactor  = 8.81144
  norm       = 0.631026
  Prefactor  = 3.48644
  norm       = 1.57907
  Prefactor  = 0.0001
  norm       = 6.2874
  Normalizat = 1.0946
  Prefactor  = 1.00333
 **********
 **   18 **HESSE 
 **********

 FCN=   6518.667     FROM HESSE     STATUS=OK           316 CALLS     1635 TOTAL
                     EDM=   .36E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    5.4005        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     44.770        40.597        .14961E-02   -1.4369    
   3  norm          19.765        15.812        .22527E-02   -1.4819    
   4  Prefactor     7.0265        9.8789        .37830E-02   -1.5178    
   5  Prefactor     .10000E-03    18.859        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    33.616        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    12.379        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          3.5425        1.4965        .53695E-02   -1.5332    
   9  Prefactor     3.2914        5.2762        .55810E-02   -1.5345    
  10  Prefactor     .23854        1.7014        .35120E-01   -1.5610    
  11  Prefactor     24.906        10.090        .20068E-02   -1.4709    
  12  Prefactor     8.8114        8.4026        .33763E-02   -1.5114    
  13  norm          .63103        .56710        .10437E-01   -1.5549    
  14  Prefactor     3.4864        10.551        .54147E-02   -1.5335    
  15  norm          1.5791        1.4813        .84501E-02   -1.5457    
  16  Prefactor     .10000E-03    9.4092        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          6.2874        14.746        .40042E-02   -1.5206    
  18  Normalizat    1.0946        .19549        .61755E-01   -.89925    
  19  Prefactor     1.0033        .15806        .44683E-01   -.92618    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.62333e-07
Minuit parameter uncertainties:
  1  9.29263e-05
  2  40.6217
  3  15.8149
  4  9.88123
  5  0.000299033
  6  2.00867e-05
  7  6.63942e-05
  8  1.49653
  9  5.27697
  10  1.27391
  11  10.0905
  12  8.40377
  13  0.567101
  14  10.5567
  15  1.48132
  16  8.31602e-05
  17  14.7543
  18  0.195621
  19  0.15813
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.385e-01  1.274e+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.003e+00  1.581e-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.095e+00  1.956e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.02
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 7.19e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.55e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/70513/likelihoodResults_642124801_642384001_4FGL_J1040.5+0617_daily_bin1554.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) = 6518.6220649
delta logL = 0.0452127279104

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6518.61573683
delta logL = 0.0515407939502

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .60083       1.0000         .10000E-03   10000.    
     2 'Index     '    1.8109       1.0000          .0000       10.000    
     3 'Normalizat'    1.0965       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0006       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.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6518.616     FROM MIGRAD    STATUS=CONVERGED     98 CALLS      292 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .60027        1.9203        .19296E-03   -.92501E-05
   2  Index         1.8112        1.3094        .20140E-01   -.10236E-03
   3  Normalizat    1.0965        .21276        .27292E-03    .15412E-05
   4  Prefactor     1.0007        .18207        .24171E-03    .29161E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.600267
  Index      = 1.81118
  Normalizat = 1.0965
  Prefactor  = 1.00071
 **********
 **   18 **HESSE 
 **********

 FCN=   6518.616     FROM HESSE     STATUS=OK            25 CALLS      317 TOTAL
                     EDM=   .21E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .60027        1.9318        .77183E-05   -1.5553    
   2  Index         1.8112        1.3184        .40280E-02   -.69159    
   3  Normalizat    1.0965        .21295        .10917E-04   -.89864    
   4  Prefactor     1.0007        .18223        .96684E-05   -.92706    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.06983e-13
Minuit parameter uncertainties:
  1  1.93196
  2  1.34559
  3  0.21312
  4  0.182338
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/70513': 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) = 6518.61573653
delta logL = 0.0515410980624

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  6.003e-01  1.932e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.811e+00  1.346e+00  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.001e+00  1.823e-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.096e+00  2.131e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.02
Ra Dec: 160.150 6.285

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/70513/cmap_HighResolution_642124801_642384001_4FGL_J1040.5+0617_daily_bin1554.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.55e-03', job_status='DONE', photon_flux_upper_limit='7.19e-08', time_completed='2021-09-02 08:54:50.962550', job_id='70513', GAL2='1.00', fit_tolerance='1e-08', EG2='1.10', EG='1.09', time_epoch_completed='1630598090.96', return_code2='0', ts='0.02', comment='SUCCESS', return_code='0', GAL='1.00', dlogl='5.15e-02', ts2='0.12', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='1554' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:54:50 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0037>
Subject: Job 70513: <4FGL_J1040.5+0617_daily_bin1554> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1554 160.15 6.2848 642124801 642384001 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 :                                   567.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             251.32 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   798 sec.
    Turnaround time :                            822 sec.

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

