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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin285
RA = 160.15, Dec = 6.2848
tmin = 313200001, tmax = 313459201
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='62856', job_status='RUN', time_executed='2021-09-02 08:14:08.969789', time_epoch_executed='1630595648.97' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='285'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62856

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62856/ft1_4FGL_J1040.5+0617_daily_bin285.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62856/ft2_4FGL_J1040.5+0617_daily_bin285.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62856/ft1_4FGL_J1040.5+0617_daily_bin285.fits outfile=/scratch/kocevski/62856/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin285.fits ra=160.15 dec=6.2848 rad=12.0 tmin=313200001.0 tmax=313459201.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.37
user 3.16
sys 0.19

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

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

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/62856/ft1_filtered_4FGL_J1040.5+0617_daily_bin285.fits" evtable="EVENTS" scfile=/scratch/kocevski/62856/ft2_4FGL_J1040.5+0617_daily_bin285.fits sctable="SC_DATA" outfile=/scratch/kocevski/62856/ltcube_313200001_313459201_4FGL_J1040.5+0617_daily_bin285.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/62856/ft2_4FGL_J1040.5+0617_daily_bin285.fits
.....................!
real 13.77
user 13.36
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62856/ft1_filtered_4FGL_J1040.5+0617_daily_bin285.fits evtable="EVENTS" scfile=/scratch/kocevski/62856/ft2_4FGL_J1040.5+0617_daily_bin285.fits sctable="SC_DATA" expcube=/scratch/kocevski/62856/ltcube_313200001_313459201_4FGL_J1040.5+0617_daily_bin285.fits outfile=/scratch/kocevski/62856/expmap_313200001_313459201_4FGL_J1040.5+0617_daily_bin285.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/62856/ltcube_313200001_313459201_4FGL_J1040.5+0617_daily_bin285.fits
.....................!
real 192.30
user 185.74
sys 3.86

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/62856/ft1_filtered_4FGL_J1040.5+0617_daily_bin285.fits scfile=/scratch/kocevski/62856/ft2_4FGL_J1040.5+0617_daily_bin285.fits outfile=/scratch/kocevski/62856/cmap_313200001_313459201_4FGL_J1040.5+0617_daily_bin285.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.54
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/62856/ft1_filtered_4FGL_J1040.5+0617_daily_bin285.fits scfile=/scratch/kocevski/62856/ft2_4FGL_J1040.5+0617_daily_bin285.fits outfile=/scratch/kocevski/62856/cmap_HighResolution_313200001_313459201_4FGL_J1040.5+0617_daily_bin285.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=160.15 yref=6.2848 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.55
user 0.40
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    28.924       1.0000         .10000E-03   10000.    
     3 'norm      '    .10095E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10119E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    13.788       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .85066E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10116E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.2909       1.0000         .10000E-03   10000.    
     9 'Prefactor '    7.8279       1.0000         .10000E-03   10000.    
    10 'Prefactor '    5.2576       1.0000         .10000E-03   10000.    
    11 'Prefactor '    11.743       1.0000         .10000E-03   10000.    
    12 'Prefactor '    4.3705       1.0000         .10000E-03   10000.    
    13 'norm      '    1.2070       1.0000         .10000E-03   10000.    
    14 'Prefactor '    1.2210       1.0000         .10000E-03   10000.    
    15 'norm      '    .52307       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .49441       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0677       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .92685       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=   5330.534     FROM MIGRAD    STATUS=CONVERGED    681 CALLS     2500 TOTAL
                     EDM=   .83E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    7.5524        .18142E-02** at limit **
   2  Prefactor     28.951        46.566        .74494E-04   -.15872E-04
   3  norm          .10000E-03    6.0674        .17557E-02** at limit **
   4  Prefactor     .10000E-03    7.8913        .18142E-02** at limit **
   5  Prefactor     13.748        94.867        .10787E-03    .13806E-04
   6  Prefactor     .10000E-03    74.562        .15091    ** at limit **
   7  Prefactor     .10000E-03    16.949        .18142E-02** at limit **
   8  norm          2.2907        1.4907        .68956E-04    .59847E-04
   9  Prefactor     7.8267        7.2685        .14332E-03    .26891E-04
  10  Prefactor     5.2572        3.2891        .98446E-04    .97004E-04
  11  Prefactor     11.743        7.2403        .11690E-03    .61947E-04
  12  Prefactor     4.3729        10.766        .19266E-03    .73112E-04
  13  norm          1.2070        .95681        .43387E-04    .33749E-03
  14  Prefactor     1.2195        50.499        .40812E-03    .41673E-04
  15  norm          .52304        .92413        .98632E-03   -.20752E-03
  16  Prefactor     .50441        83.146        .47052E-02    .38299E-04
  17  norm          .10000E-03    2.8334        .11999E-02** at limit **
  18  Normalizat    1.0677        .24328        .25908E-03    .62750E-04
  19  Prefactor     .92686        .19267        .23528E-03    .71514E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 28.9514
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 13.7484
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.29071
  Prefactor  = 7.82672
  Prefactor  = 5.25724
  Prefactor  = 11.7432
  Prefactor  = 4.37293
  norm       = 1.20695
  Prefactor  = 1.21952
  norm       = 0.523041
  Prefactor  = 0.504405
  norm       = 0.0001
  Normalizat = 1.06771
  Prefactor  = 0.926856
 **********
 **   18 **HESSE 
 **********

 FCN=   5330.534     FROM HESSE     STATUS=OK           262 CALLS     2762 TOTAL
                     EDM=   .62E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    7.5537        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     28.951        46.547        .29798E-05   -1.4631    
   3  norm          .10000E-03    6.0675        .35114E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    7.8924        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     13.748        94.747        .43148E-05   -1.4966    
   6  Prefactor     .10000E-03    74.617        .15077       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    16.950        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.2907        1.4905        .27582E-05   -1.5405    
   9  Prefactor     7.8267        7.2676        .57327E-05   -1.5148    
  10  Prefactor     5.2572        3.2886        .39378E-05   -1.5249    
  11  Prefactor     11.743        7.2396        .46762E-05   -1.5022    
  12  Prefactor     4.3729        10.748        .77065E-05   -1.5290    
  13  norm          1.2070        .94891        .17355E-05   -1.5488    
  14  Prefactor     1.2195        49.522        .16325E-04   -1.5487    
  15  norm          .52304        .92331        .39453E-04   -1.5563    
  16  Prefactor     .50441        84.081        .18821E-03   -1.5566    
  17  norm          .10000E-03    2.8334        .23997E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.0677        .24328        .10363E-04   -.90795    
  19  Prefactor     .92686        .19280        .94111E-05   -.95209    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.16442e-11
Minuit parameter uncertainties:
  1  1.18548e-06
  2  46.605
  3  1.10712e-06
  4  2.47014e-06
  5  72.348
  6  2.89143e-05
  7  4.01536e-06
  8  1.49057
  9  7.26843
  10  3.28869
  11  7.24009
  12  10.7527
  13  0.948921
  14  15.5557
  15  0.92333
  16  13.0421
  17  8.17289e-08
  18  0.243532
  19  0.192939
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.257e+00  3.289e+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.269e-01  1.929e-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.068e+00  2.435e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.86
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 6.35e-08 +/- 3.97e-08
Energy Flux (Fixed Index): 2.17e-05 +/- 1.36e-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) = 5330.07278242
delta logL = 0.461181546581

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5330.07235957
delta logL = 0.461604398229

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    5.2580       1.0000         .10000E-03   10000.    
     2 'Index     '    1.7784       1.0000          .0000       10.000    
     3 'Normalizat'    1.1000       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .91396       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=   5330.072     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      202 TOTAL
                     EDM=   .34E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.2213        4.1770        .43823E-02   -.14052E-03
   2  Index         1.7754        .49528        .22726       -.18786E-04
   3  Normalizat    1.1002        .19167        .57858E-01    .33076E-03
   4  Prefactor     .91392        .16299        .45183E-01    .55749E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.22133
  Index      = 1.77537
  Normalizat = 1.10022
  Prefactor  = 0.913923
 **********
 **   18 **HESSE 
 **********

 FCN=   5330.072     FROM HESSE     STATUS=OK            31 CALLS      233 TOTAL
                     EDM=   .43E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.2213        4.1824        .11258E-03   -1.5251    
   2  Index         1.7754        .62364        .79324E-02   -.70093    
   3  Normalizat    1.1002        .22360        .25586E-03   -.89745    
   4  Prefactor     .91392        .18978        .23684E-03   -.95656    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.26087e-10
Minuit parameter uncertainties:
  1  4.18268
  2  0.626447
  3  0.223792
  4  0.189919
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62856': 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) = 5330.07232245
delta logL = 0.461641516271

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.221e+00  4.183e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.775e+00  6.264e-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.139e-01  1.899e-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.100e+00  2.238e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 7.77
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.78 +/- 0.63
Photon Flux (Free Index): 3.08e-08 +/- 3.66e-08
Energy Flux (Free Index): 3.98e-05 +/- 4.69e-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/62856/cmap_HighResolution_313200001_313459201_4FGL_J1040.5+0617_daily_bin285.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='6.35e-08', energy_flux2='3.98e-05', photon_flux_error='3.97e-08', dlogl='4.62e-01', energy_flux='2.17e-05', photon_flux2='3.08e-08', job_status='DONE', time_completed='2021-09-02 08:23:06.068895', photon_index_error2='0.63', photon_index2='1.78', ts='6.86', fit_tolerance='1e-08', GAL='0.93', photon_index_error='0.00', energy_flux_error2='4.69e-05', EG='1.07', time_epoch_completed='1630596186.07', return_code='0', job_id='62856', GAL2='0.91', EG2='1.10', return_code2='0', energy_flux_error='1.36e-05', photon_flux_error2='3.66e-08', ts2='7.77', photon_index='2.37' WHERE bin_id='285' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:23:06 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0245>
Subject: Job 62856: <4FGL_J1040.5+0617_daily_bin285> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin285 160.15 6.2848 313200001 313459201 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 :                                   531.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             258.15 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   613 sec.
    Turnaround time :                            707 sec.

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

