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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin286
RA = 160.15, Dec = 6.2848
tmin = 313459201, tmax = 313718401
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='62857', job_status='RUN', time_executed='2021-09-02 08:13:02.199334', time_epoch_executed='1630595582.2' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='286'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62857

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62857/ft1_4FGL_J1040.5+0617_daily_bin286.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62857/ft2_4FGL_J1040.5+0617_daily_bin286.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62857/ft1_4FGL_J1040.5+0617_daily_bin286.fits outfile=/scratch/kocevski/62857/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin286.fits ra=160.15 dec=6.2848 rad=12.0 tmin=313459201.0 tmax=313718401.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.38
user 3.15
sys 0.21

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62857/ft1_filtered_4FGL_J1040.5+0617_daily_bin286.fits evtable="EVENTS" scfile=/scratch/kocevski/62857/ft2_4FGL_J1040.5+0617_daily_bin286.fits sctable="SC_DATA" expcube=/scratch/kocevski/62857/ltcube_313459201_313718401_4FGL_J1040.5+0617_daily_bin286.fits outfile=/scratch/kocevski/62857/expmap_313459201_313718401_4FGL_J1040.5+0617_daily_bin286.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/62857/ltcube_313459201_313718401_4FGL_J1040.5+0617_daily_bin286.fits
.....................!
real 191.07
user 186.08
sys 4.62

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/62857/ft1_filtered_4FGL_J1040.5+0617_daily_bin286.fits scfile=/scratch/kocevski/62857/ft2_4FGL_J1040.5+0617_daily_bin286.fits outfile=/scratch/kocevski/62857/cmap_313459201_313718401_4FGL_J1040.5+0617_daily_bin286.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.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/62857/ft1_filtered_4FGL_J1040.5+0617_daily_bin286.fits scfile=/scratch/kocevski/62857/ft2_4FGL_J1040.5+0617_daily_bin286.fits outfile=/scratch/kocevski/62857/cmap_HighResolution_313459201_313718401_4FGL_J1040.5+0617_daily_bin286.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.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    20.634       1.0000         .10000E-03   10000.    
     3 'norm      '    12.653       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .64256E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.9232       1.0000         .10000E-03   10000.    
     9 'Prefactor '    7.3840       1.0000         .10000E-03   10000.    
    10 'Prefactor '    13.473       1.0000         .10000E-03   10000.    
    11 'Prefactor '    12.487       1.0000         .10000E-03   10000.    
    12 'Prefactor '    8.5387       1.0000         .10000E-03   10000.    
    13 'norm      '    2.1799       1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.4013       1.0000         .10000E-03   10000.    
    15 'norm      '    .60069       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .30879E-02   1.0000         .10000E-03   10000.    
    17 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0582       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .93845       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=   5361.660     FROM MIGRAD    STATUS=CONVERGED    415 CALLS     2196 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    16.736       -.17929E-07** at limit **
   2  Prefactor     20.628        48.844       -.16424E-06    .16800E-03
   3  norm          12.645        15.473        .92518E-07   -.62331E-03
   4  Prefactor     .10000E-03    7.6882       -.44546E-07** at limit **
   5  Prefactor     .10000E-03    21.998       -.58851E-08** at limit **
   6  Prefactor     .10000E-03    19.120        .55022E-08** at limit **
   7  Prefactor     .10000E-03    5.6452        .13083E-08** at limit **
   8  norm          1.9233        1.3984        .11525E-08   -.39326E-04
   9  Prefactor     7.3848        7.8581       -.75561E-07    .90423E-03
  10  Prefactor     13.474        4.6412       -.55557E-08    .21499E-03
  11  Prefactor     12.486        7.5114       -.33838E-07    .74088E-03
  12  Prefactor     8.5392        7.3484        .35199E-07   -.34992E-03
  13  norm          2.1800        .74019        .26275E-07    .10206E-03
  14  Prefactor     4.4010        2.5357       -.55269E-06   -.35244E-03
  15  norm          .60198        1.1866       -.20780E-07   -.61969E-04
  16  Prefactor     .10000E-03    27.576        .34442E-07** at limit **
  17  norm          .10000E-03    4.9130        .25831E-08** at limit **
  18  Normalizat    1.0580        .20884        .49790E-07    .95079E-04
  19  Prefactor     .93857        .17352        .25723E-07    .81594E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 20.6275
  norm       = 12.6452
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.92326
  Prefactor  = 7.38482
  Prefactor  = 13.4737
  Prefactor  = 12.4864
  Prefactor  = 8.53924
  norm       = 2.17999
  Prefactor  = 4.401
  norm       = 0.601984
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 1.058
  Prefactor  = 0.938569
 **********
 **   18 **HESSE 
 **********

 FCN=   5361.660     FROM HESSE     STATUS=OK           284 CALLS     2480 TOTAL
                     EDM=   .47E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    16.938        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     20.628        48.802        .88175E-04   -1.4799    
   3  norm          12.645        14.887        .11261E-03   -1.4997    
   4  Prefactor     .10000E-03    52.646        .37747E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    22.021        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    19.126        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    5.6474        .16991E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.9233        1.3943        .70770E-04   -1.5431    
   9  Prefactor     7.3848        7.8463        .14760E-03   -1.5164    
  10  Prefactor     13.474        4.6453        .87689E-04   -1.4974    
  11  Prefactor     12.486        7.5151        .11336E-03   -1.5001    
  12  Prefactor     8.5392        7.3483        .13718E-03   -1.5123    
  13  norm          2.1800        .80462        .34860E-04   -1.5413    
  14  Prefactor     4.4010        8.9526        .95984E-03   -1.5288    
  15  norm          .60198        1.0344        .10560E-02   -1.5553    
  16  Prefactor     .10000E-03    36.970        .95762E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    4.9194        .15850E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.0580        .24517        .26627E-03   -.91112    
  19  Prefactor     .93857        .20385        .24317E-03   -.94806    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.67311e-09
Minuit parameter uncertainties:
  1  2.61869e-05
  2  48.8961
  3  14.8909
  4  5.08999e-05
  5  2.09171e-05
  6  3.61439e-05
  7  5.80331e-06
  8  1.39436
  9  7.84735
  10  4.64542
  11  7.51571
  12  7.34909
  13  0.804626
  14  8.95535
  15  1.03443
  16  0.000107048
  17  6.57492e-06
  18  0.245437
  19  0.204015
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.347e+01  4.645e+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.386e-01  2.040e-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.058e+00  2.454e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 30.31
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.63e-07 +/- 5.61e-08
Energy Flux (Fixed Index): 5.57e-05 +/- 1.92e-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) = 5360.28496702
delta logL = 1.37534347654

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5360.13216663
delta logL = 1.52814387088

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    16.815       1.0000         .10000E-03   10000.    
     2 'Index     '    1.8940       1.0000          .0000       10.000    
     3 'Normalizat'    1.1085       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .91324       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=   5360.132     FROM MIGRAD    STATUS=CONVERGED     45 CALLS      208 TOTAL
                     EDM=   .45E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     16.815        6.8407        .24418E-02   -.39884E-02
   2  Index         1.8940        .27763        .10586        .18681E-04
   3  Normalizat    1.1085        .20004        .59068E-01    .15770E-04
   4  Prefactor     .91324        .17258        .45174E-01    .44239E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 16.8147
  Index      = 1.89398
  Normalizat = 1.10854
  Prefactor  = 0.913239
 **********
 **   18 **HESSE 
 **********

 FCN=   5360.132     FROM HESSE     STATUS=OK            31 CALLS      239 TOTAL
                     EDM=   .36E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     16.815        6.1328        .97673E-04   -1.4888    
   2  Index         1.8940        .26035        .44639E-02   -.67028    
   3  Normalizat    1.1085        .23458        .26123E-03   -.89478    
   4  Prefactor     .91324        .20229        .24629E-03   -.95680    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.57978e-09
Minuit parameter uncertainties:
  1  6.13298
  2  0.260538
  3  0.234799
  4  0.202453
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62857': 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) = 5360.13216663
delta logL = 1.52814387109

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.681e+01  6.133e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.894e+00  2.605e-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.132e-01  2.025e-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.109e+00  2.348e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 33.35
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.89 +/- 0.26
Photon Flux (Free Index): 1.12e-07 +/- 5.13e-08
Energy Flux (Free Index): 1.02e-04 +/- 5.83e-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/62857/cmap_HighResolution_313459201_313718401_4FGL_J1040.5+0617_daily_bin286.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.63e-07', energy_flux2='1.02e-04', photon_flux_error='5.61e-08', dlogl='1.53e+00', energy_flux='5.57e-05', photon_flux2='1.12e-07', job_status='DONE', time_completed='2021-09-02 08:21:50.247692', photon_index_error2='0.26', photon_index2='1.89', ts='30.31', fit_tolerance='1e-08', GAL='0.94', photon_index_error='0.00', energy_flux_error2='5.83e-05', EG='1.06', time_epoch_completed='1630596110.25', return_code='0', job_id='62857', GAL2='0.91', EG2='1.11', return_code2='0', energy_flux_error='1.92e-05', photon_flux_error2='5.13e-08', ts2='33.35', photon_index='2.37' WHERE bin_id='286' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:21:50 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0282>
Subject: Job 62857: <4FGL_J1040.5+0617_daily_bin286> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin286> 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) <bullet0282>, 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:21:51 2021
Results reported at Thu Sep  2 08:21:51 2021

Your job looked like:

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

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

