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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin657
RA = 160.15, Dec = 6.2848
tmin = 409622401, tmax = 409881601
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='65584', job_status='RUN', time_executed='2021-09-02 08:27:27.785469', time_epoch_executed='1630596447.79' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='657'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65584

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65584/ft1_4FGL_J1040.5+0617_daily_bin657.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65584/ft2_4FGL_J1040.5+0617_daily_bin657.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65584/ft1_4FGL_J1040.5+0617_daily_bin657.fits outfile=/scratch/kocevski/65584/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin657.fits ra=160.15 dec=6.2848 rad=12.0 tmin=409622401.0 tmax=409881601.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 5.85
user 5.48
sys 0.25

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65584/ft1_filtered_4FGL_J1040.5+0617_daily_bin657.fits" evtable="EVENTS" scfile=/scratch/kocevski/65584/ft2_4FGL_J1040.5+0617_daily_bin657.fits sctable="SC_DATA" outfile=/scratch/kocevski/65584/ltcube_409622401_409881601_4FGL_J1040.5+0617_daily_bin657.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/65584/ft2_4FGL_J1040.5+0617_daily_bin657.fits
.....................!
real 17.63
user 17.09
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65584/ft1_filtered_4FGL_J1040.5+0617_daily_bin657.fits evtable="EVENTS" scfile=/scratch/kocevski/65584/ft2_4FGL_J1040.5+0617_daily_bin657.fits sctable="SC_DATA" expcube=/scratch/kocevski/65584/ltcube_409622401_409881601_4FGL_J1040.5+0617_daily_bin657.fits outfile=/scratch/kocevski/65584/expmap_409622401_409881601_4FGL_J1040.5+0617_daily_bin657.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/65584/ltcube_409622401_409881601_4FGL_J1040.5+0617_daily_bin657.fits
.....................!
real 191.36
user 186.91
sys 3.60

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/65584/ft1_filtered_4FGL_J1040.5+0617_daily_bin657.fits scfile=/scratch/kocevski/65584/ft2_4FGL_J1040.5+0617_daily_bin657.fits outfile=/scratch/kocevski/65584/cmap_409622401_409881601_4FGL_J1040.5+0617_daily_bin657.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.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65584/ft1_filtered_4FGL_J1040.5+0617_daily_bin657.fits scfile=/scratch/kocevski/65584/ft2_4FGL_J1040.5+0617_daily_bin657.fits outfile=/scratch/kocevski/65584/cmap_HighResolution_409622401_409881601_4FGL_J1040.5+0617_daily_bin657.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.58
user 0.41
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.2902       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10546E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .11402E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10167E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    69.627       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .13954E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10264E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    6.8511       1.0000         .10000E-03   10000.    
     9 'Prefactor '    5.3300       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .31640       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .12316E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    5.6167       1.0000         .10000E-03   10000.    
    13 'norm      '    .11398       1.0000         .10000E-03   10000.    
    14 'Prefactor '    13.137       1.0000         .10000E-03   10000.    
    15 'norm      '    .44633       1.0000         .10000E-03   10000.    
    16 'Prefactor '    5.7028       1.0000         .10000E-03   10000.    
    17 'norm      '    6.5967       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2890       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .84432       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=   4935.605     FROM MIGRAD    STATUS=CONVERGED    406 CALLS     1944 TOTAL
                     EDM=   .62E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.2877        15.998        .29776E-05   -.10604E-03
   2  Prefactor     .10000E-03    36.630       -.14115E-06** at limit **
   3  norm          .10000E-03    22.970        .46001E-05** at limit **
   4  Prefactor     .10000E-03    10.529        .44017E-05** at limit **
   5  Prefactor     69.806        75.634        .72105E-06    .10023E-03
   6  Prefactor     .10001E-03    150.94        .18686E-04** at limit **
   7  Prefactor     .10000E-03    25.422        .56751E-05** at limit **
   8  norm          6.8516        2.4781        .63666E-07   -.26385E-03
   9  Prefactor     5.3255        7.5149        .56873E-06    .72233E-04
  10  Prefactor     .29500        2.3083       -.46429E-06   -.17458E-03
  11  Prefactor     .10000E-03    15.162       -.13125E-05** at limit **
  12  Prefactor     5.6264        9.4086        .62275E-05    .26001E-03
  13  norm          .11331        .63061       -.54868E-07   -.49209E-03
  14  Prefactor     13.150        14.768       -.24779E-07   -.14218E-04
  15  norm          .44565        1.3793        .58470E-06    .24735E-03
  16  Prefactor     5.7122        29.947        .60324E-06   -.20212E-04
  17  norm          6.5933        10.320        .33614E-06   -.18110E-04
  18  Normalizat    1.2892        .24611       -.76460E-05    .95036E-04
  19  Prefactor     .84436        .19446        .51140E-05   -.32496E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.28768
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 69.8063
  Prefactor  = 0.000100005
  Prefactor  = 0.0001
  norm       = 6.85157
  Prefactor  = 5.32546
  Prefactor  = 0.294999
  Prefactor  = 0.0001
  Prefactor  = 5.6264
  norm       = 0.113307
  Prefactor  = 13.1503
  norm       = 0.445649
  Prefactor  = 5.71224
  norm       = 6.5933
  Normalizat = 1.28918
  Prefactor  = 0.844357
 **********
 **   18 **HESSE 
 **********

 FCN=   4935.605     FROM HESSE     STATUS=OK           274 CALLS     2218 TOTAL
                     EDM=   .21E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.2877        15.841        .19450E-03   -1.5294    
   2  Prefactor     .10000E-03    36.748        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    22.978        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    10.591        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     69.806        75.274        .24053E-03   -1.4035    
   6  Prefactor     .10001E-03    151.55        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    25.546        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          6.8516        2.4749        .62276E-04   -1.5184    
   9  Prefactor     5.3255        7.4992        .17408E-03   -1.5246    
  10  Prefactor     .29500        10.677        .19547E-02   -1.5599    
  11  Prefactor     .10000E-03    15.696        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     5.6264        9.5118        .84753E-03   -1.5234    
  13  norm          .11331        1.3175        .76416E-03   -1.5641    
  14  Prefactor     13.150        16.312        .11051E-03   -1.4983    
  15  norm          .44565        1.3311        .13561E-03   -1.5574    
  16  Prefactor     5.7122        29.787        .16820E-03   -1.5230    
  17  norm          6.5933        10.303        .15624E-03   -1.5194    
  18  Normalizat    1.2892        .27226        .25340E-03   -.83890    
  19  Prefactor     .84436        .21927        .25758E-03   -.98113    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.07525e-08
Minuit parameter uncertainties:
  1  15.8563
  2  6.55118e-06
  3  6.84207e-05
  4  6.60616e-05
  5  75.3768
  6  0.00176578
  7  9.39044e-05
  8  2.47493
  9  7.5005
  10  3.54949
  11  0.000132208
  12  9.51439
  13  0.772413
  14  16.3175
  15  1.33121
  16  26.1087
  17  10.3054
  18  0.272559
  19  0.219496
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.950e-01  3.549e+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:  8.444e-01  2.195e-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.289e+00  2.726e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.01
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.13e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.68e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/65584/likelihoodResults_409622401_409881601_4FGL_J1040.5+0617_daily_bin657.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) = 4935.60388525
delta logL = 0.00160077306828

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4935.60381176
delta logL = 0.00167425614472

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .29501       1.0000         .10000E-03   10000.    
     2 'Index     '    2.5113       1.0000          .0000       10.000    
     3 'Normalizat'    1.2884       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .84462       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=   4935.604     FROM MIGRAD    STATUS=CONVERGED     67 CALLS      241 TOTAL
                     EDM=   .24E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .31652        8.8979        .53510E-01    .80183E-03
   2  Index         2.5113        1.5418        .50000       -.41967E-05
   3  Normalizat    1.2882        .12222E-01    .57323E-01    .82800E-04
   4  Prefactor     .84464        .10350E-01    .44295E-01    .24567E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.31652
  Index      = 2.51132
  Normalizat = 1.28817
  Prefactor  = 0.844637
 **********
 **   18 **HESSE 
 **********

 FCN=   4935.604     FROM HESSE     STATUS=OK            35 CALLS      276 TOTAL
                     EDM=   .70E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .31652        9.6185        .18547E-02   -1.5595    
   2  Index         2.5113        2.4918        .11299E-01   -.52099    
   3  Normalizat    1.2882        .25903        .25349E-03   -.83920    
   4  Prefactor     .84464        .21769        .25754E-03   -.98103    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.04177e-10
Minuit parameter uncertainties:
  1  3.48974
  2  2.65449
  3  0.259289
  4  0.217912
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65584': 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) = 4935.60378761
delta logL = 0.00169840800299

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.165e-01  3.490e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.511e+00  2.654e+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:  8.446e-01  2.179e-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.288e+00  2.593e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.01
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/65584/cmap_HighResolution_409622401_409881601_4FGL_J1040.5+0617_daily_bin657.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.68e-03', job_status='DONE', photon_flux_upper_limit='1.13e-07', time_completed='2021-09-02 08:36:34.493797', job_id='65584', GAL2='0.84', fit_tolerance='1e-08', EG2='1.29', EG='1.29', time_epoch_completed='1630596994.49', return_code2='0', ts='0.01', comment='SUCCESS', return_code='0', GAL='0.84', dlogl='1.70e-03', ts2='0.01', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='657' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:36:34 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0006>
Subject: Job 65584: <4FGL_J1040.5+0617_daily_bin657> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin657 160.15 6.2848 409622401 409881601 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 :                                   542.00 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             279.88 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   779 sec.
    Turnaround time :                            925 sec.

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

