/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 146 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 = 7421
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin343
RA = 160.15, Dec = 6.2848
tmin = 328233601, tmax = 328492801
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='62935', job_status='RUN', time_executed='2021-09-02 08:16:27.744635', time_epoch_executed='1630595787.74' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='343'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62935

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62935/ft1_4FGL_J1040.5+0617_daily_bin343.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62935/ft2_4FGL_J1040.5+0617_daily_bin343.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62935/ft1_4FGL_J1040.5+0617_daily_bin343.fits outfile=/scratch/kocevski/62935/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin343.fits ra=160.15 dec=6.2848 rad=12.0 tmin=328233601.0 tmax=328492801.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.95
user 3.72
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/62935/ft1_filtered_4FGL_J1040.5+0617_daily_bin343.fits" evtable="EVENTS" scfile=/scratch/kocevski/62935/ft2_4FGL_J1040.5+0617_daily_bin343.fits sctable="SC_DATA" outfile=/scratch/kocevski/62935/ltcube_328233601_328492801_4FGL_J1040.5+0617_daily_bin343.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/62935/ft2_4FGL_J1040.5+0617_daily_bin343.fits
.....................!
real 17.32
user 16.87
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62935/ft1_filtered_4FGL_J1040.5+0617_daily_bin343.fits evtable="EVENTS" scfile=/scratch/kocevski/62935/ft2_4FGL_J1040.5+0617_daily_bin343.fits sctable="SC_DATA" expcube=/scratch/kocevski/62935/ltcube_328233601_328492801_4FGL_J1040.5+0617_daily_bin343.fits outfile=/scratch/kocevski/62935/expmap_328233601_328492801_4FGL_J1040.5+0617_daily_bin343.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/62935/ltcube_328233601_328492801_4FGL_J1040.5+0617_daily_bin343.fits
.....................!
real 191.63
user 187.20
sys 3.91

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/62935/ft1_filtered_4FGL_J1040.5+0617_daily_bin343.fits scfile=/scratch/kocevski/62935/ft2_4FGL_J1040.5+0617_daily_bin343.fits outfile=/scratch/kocevski/62935/cmap_328233601_328492801_4FGL_J1040.5+0617_daily_bin343.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.40
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/62935/ft1_filtered_4FGL_J1040.5+0617_daily_bin343.fits scfile=/scratch/kocevski/62935/ft2_4FGL_J1040.5+0617_daily_bin343.fits outfile=/scratch/kocevski/62935/cmap_HighResolution_328233601_328492801_4FGL_J1040.5+0617_daily_bin343.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.56
user 0.39
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    8.0155       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    16.681       1.0000         .10000E-03   10000.    
     4 'Prefactor '    5.4308       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .12625E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .20359E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10157E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .71576       1.0000         .10000E-03   10000.    
    13 'norm      '    2.5071       1.0000         .10000E-03   10000.    
    14 'Prefactor '    14.859       1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    27.104       1.0000         .10000E-03   10000.    
    17 'norm      '    .10012E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .89189       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1689       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=   5182.274     FROM MIGRAD    STATUS=CONVERGED    404 CALLS     1931 TOTAL
                     EDM=   .41E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.0170        15.817        .94685E-08   -.13775E-03
   2  Prefactor     .10000E-03    18.683       -.61397E-06** at limit **
   3  norm          16.681        16.114       -.47668E-06   -.35286E-03
   4  Prefactor     5.4304        8.9248       -.10183E-05   -.56535E-03
   5  Prefactor     .10002E-03    217.34       -.13314E-05** at limit **
   6  Prefactor     .10000E-03    23.454        .44799E-05** at limit **
   7  Prefactor     .10000E-03    5.6490       -.28309E-07** at limit **
   8  norm          .10000E-03    .58684        .18943E-07** at limit **
   9  Prefactor     .10000E-03    23.032        .23194E-04** at limit **
  10  Prefactor     .10000E-03    2.7430       -.19762E-06** at limit **
  11  Prefactor     .10000E-03    2.4357       -.59235E-07** at limit **
  12  Prefactor     .71554        6.1572        .64326E-05    .10036E-03
  13  norm          2.5069        .88074        .77449E-08    .10050E-02
  14  Prefactor     14.862        13.021       -.55025E-07    .94632E-04
  15  norm          .10000E-03    .77011       -.32682E-06** at limit **
  16  Prefactor     27.107        23.362        .30148E-06    .95353E-04
  17  norm          .10000E-03    10.048       -.12091E-06** at limit **
  18  Normalizat    .89190        .20967        .70679E-06   -.52573E-04
  19  Prefactor     1.1689        .18162       -.89708E-08   -.54986E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.01703
  Prefactor  = 0.0001
  norm       = 16.6814
  Prefactor  = 5.43039
  Prefactor  = 0.00010002
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.715539
  norm       = 2.50688
  Prefactor  = 14.8619
  norm       = 0.0001
  Prefactor  = 27.107
  norm       = 0.0001
  Normalizat = 0.891904
  Prefactor  = 1.16893
 **********
 **   18 **HESSE 
 **********

 FCN=   5182.274     FROM HESSE     STATUS=OK           268 CALLS     2199 TOTAL
                     EDM=   .10E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.0170        15.773        .14162E-03   -1.5142    
   2  Prefactor     .10000E-03    18.698        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          16.681        16.100        .98064E-04   -1.4891    
   4  Prefactor     5.4304        8.9364        .17243E-03   -1.5242    
   5  Prefactor     .10002E-03    223.25        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    23.374        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    5.6509        .16709E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .60434        .10760E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    24.579        .32712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    2.8547        .23233E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    2.4508        .10968E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .71554        17.498        .29341E-02   -1.5539    
  13  norm          2.5069        .89175        .34389E-04   -1.5391    
  14  Prefactor     14.862        13.144        .10390E-03   -1.4937    
  15  norm          .10000E-03    1.3203        .12117E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     27.107        23.340        .76950E-04   -1.4666    
  17  norm          .10000E-03    10.197        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .89190        .23525        .27565E-03   -.96745    
  19  Prefactor     1.1689        .20736        .22033E-03   -.87293    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.03528e-09
Minuit parameter uncertainties:
  1  15.7812
  2  1.11925e-05
  3  16.1044
  4  8.93858
  5  0.00426197
  6  2.89484e-05
  7  6.33324e-06
  8  3.41484e-06
  9  0.000345364
  10  4.1226e-05
  11  7.4136e-06
  12  7.07867
  13  0.891752
  14  13.147
  15  2.66258e-05
  16  23.3481
  17  3.40052e-05
  18  0.235521
  19  0.207504
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  4.123e-05  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.169e+00  2.075e-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:  8.919e-01  2.355e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/62935/likelihoodResults_328233601_328492801_4FGL_J1040.5+0617_daily_bin343.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): 102
logL (Free Index) = 5182.27583734
delta logL = -0.00167301059537

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5182.27416521
delta logL = -8.73792487255e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10380E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3965       1.0000          .0000       10.000    
     3 'Normalizat'    .89169       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1692       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=   5182.274     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      210 TOTAL
                     EDM=   .18E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    3.7199        .35721E-01** at limit **
   2  Index         2.4267        5.9858        .50000       -.96370E-04
   3  Normalizat    .89191        .72612E-02    .44795E-01   -.26505E-04
   4  Prefactor     1.1689        .65811E-02    .35403E-01   -.39614E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.42666
  Normalizat = 0.891909
  Prefactor  = 1.16893
 **********
 **   18 **HESSE 
 **********

 FCN=   5182.274     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      243 TOTAL
                     EDM=   .13E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    371.10        .18582E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4267        8.3185        .50000       -.54062    
   3  Normalizat    .89191        .66094E-01    .27565E-03   -.96745    
   4  Prefactor     1.1689        .59808E-01    .22033E-03   -.87293    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.26779e-06
Minuit parameter uncertainties:
  1  0.000362153
  2  47.4861
  3  0.0660999
  4  0.0598111
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62935': 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): 102
logL (Free Index) = 5182.27416309
delta logL = 1.24806774693e-06

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  3.622e-04  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.427e+00  4.749e+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.169e+00  5.981e-02  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:  8.919e-01  6.610e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
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/62935/cmap_HighResolution_328233601_328492801_4FGL_J1040.5+0617_daily_bin343.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.28e-03', job_status='DONE', photon_flux_upper_limit='8.14e-08', time_completed='2021-09-02 08:25:38.073043', job_id='62935', GAL2='1.17', fit_tolerance='1e-08', EG2='0.89', EG='0.89', time_epoch_completed='1630596338.07', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.17', dlogl='1.25e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='343' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:25:38 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0163>
Subject: Job 62935: <4FGL_J1040.5+0617_daily_bin343> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin343 160.15 6.2848 328233601 328492801 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 :                                   549.02 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             294.17 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   705 sec.
    Turnaround time :                            853 sec.

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

