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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin778
RA = 160.15, Dec = 6.2848
tmin = 440985601, tmax = 441244801
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='65742', job_status='RUN', time_executed='2021-09-02 08:27:21.664380', time_epoch_executed='1630596441.66' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='778'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65742

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65742/ft1_4FGL_J1040.5+0617_daily_bin778.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65742/ft2_4FGL_J1040.5+0617_daily_bin778.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65742/ft1_4FGL_J1040.5+0617_daily_bin778.fits outfile=/scratch/kocevski/65742/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin778.fits ra=160.15 dec=6.2848 rad=12.0 tmin=440985601.0 tmax=441244801.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.56
user 3.26
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65742/ft1_filtered_4FGL_J1040.5+0617_daily_bin778.fits" evtable="EVENTS" scfile=/scratch/kocevski/65742/ft2_4FGL_J1040.5+0617_daily_bin778.fits sctable="SC_DATA" outfile=/scratch/kocevski/65742/ltcube_440985601_441244801_4FGL_J1040.5+0617_daily_bin778.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/65742/ft2_4FGL_J1040.5+0617_daily_bin778.fits
.....................!
real 15.41
user 14.86
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65742/ft1_filtered_4FGL_J1040.5+0617_daily_bin778.fits evtable="EVENTS" scfile=/scratch/kocevski/65742/ft2_4FGL_J1040.5+0617_daily_bin778.fits sctable="SC_DATA" expcube=/scratch/kocevski/65742/ltcube_440985601_441244801_4FGL_J1040.5+0617_daily_bin778.fits outfile=/scratch/kocevski/65742/expmap_440985601_441244801_4FGL_J1040.5+0617_daily_bin778.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/65742/ltcube_440985601_441244801_4FGL_J1040.5+0617_daily_bin778.fits
.....................!
real 193.08
user 186.99
sys 4.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/65742/ft1_filtered_4FGL_J1040.5+0617_daily_bin778.fits scfile=/scratch/kocevski/65742/ft2_4FGL_J1040.5+0617_daily_bin778.fits outfile=/scratch/kocevski/65742/cmap_440985601_441244801_4FGL_J1040.5+0617_daily_bin778.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.61
user 0.38
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65742/ft1_filtered_4FGL_J1040.5+0617_daily_bin778.fits scfile=/scratch/kocevski/65742/ft2_4FGL_J1040.5+0617_daily_bin778.fits outfile=/scratch/kocevski/65742/cmap_HighResolution_440985601_441244801_4FGL_J1040.5+0617_daily_bin778.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.53
user 0.39
sys 0.13

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.1412       1.0000         .10000E-03   10000.    
     2 'Prefactor '    24.120       1.0000         .10000E-03   10000.    
     3 'norm      '    .10031E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    3.0969       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .94897       1.0000         .10000E-03   10000.    
    10 'Prefactor '    11.493       1.0000         .10000E-03   10000.    
    11 'Prefactor '    4.7662       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.4517       1.0000         .10000E-03   10000.    
    14 'Prefactor '    5.7309       1.0000         .10000E-03   10000.    
    15 'norm      '    .16168       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    11.784       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.4001       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .68318       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=   7461.892     FROM MIGRAD    STATUS=CONVERGED    376 CALLS     1610 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.1396        3.8172        .15211E-05   -.17749E-02
   2  Prefactor     24.120        20.592       -.14799E-06   -.26039E-05
   3  norm          .10000E-03    4.9356       -.31930E-05** at limit **
   4  Prefactor     .10000E-03    2.7513        .12770E-06** at limit **
   5  Prefactor     .10000E-03    9.2888        .92630E-05** at limit **
   6  Prefactor     .10000E-03    11.578       -.71415E-05** at limit **
   7  Prefactor     .10000E-03    4.3336        .35695E-05** at limit **
   8  norm          3.0969        1.3013       -.12679E-07   -.19178E-04
   9  Prefactor     .94897        3.1082       -.15833E-06   -.29009E-03
  10  Prefactor     11.492        3.9107       -.14847E-07    .49026E-04
  11  Prefactor     4.7649        7.4414       -.24143E-07   -.20583E-04
  12  Prefactor     .10000E-03    3.2426       -.10137E-05** at limit **
  13  norm          1.4516        .59369        .45222E-08    .11512E-03
  14  Prefactor     5.7310        6.6510        .12619E-07   -.34125E-05
  15  norm          .16116        .87697       -.94298E-07   -.58493E-04
  16  Prefactor     .10000E-03    6.7024       -.33295E-05** at limit **
  17  norm          11.783        11.818       -.85767E-06   -.16705E-04
  18  Normalizat    1.4002        .17778        .25866E-06    .53907E-04
  19  Prefactor     .68305        .14294       -.36218E-06    .81078E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.13956
  Prefactor  = 24.1198
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.09685
  Prefactor  = 0.948975
  Prefactor  = 11.4922
  Prefactor  = 4.76493
  Prefactor  = 0.0001
  norm       = 1.45165
  Prefactor  = 5.73098
  norm       = 0.161158
  Prefactor  = 0.0001
  norm       = 11.7829
  Normalizat = 1.40023
  Prefactor  = 0.683046
 **********
 **   18 **HESSE 
 **********

 FCN=   7461.892     FROM HESSE     STATUS=OK           272 CALLS     1882 TOTAL
                     EDM=   .48E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.1396        8.0695        .14083E-02   -1.5415    
   2  Prefactor     24.120        20.592        .81563E-04   -1.4725    
   3  norm          .10000E-03    4.9530        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    2.7607        .13992E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    9.3395        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    11.616        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    4.3469        .17575E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          3.0969        1.2999        .61253E-04   -1.5356    
   9  Prefactor     .94897        3.0608        .26647E-03   -1.5513    
  10  Prefactor     11.492        3.9234        .94550E-04   -1.5030    
  11  Prefactor     4.7649        7.4531        .18429E-03   -1.5271    
  12  Prefactor     .10000E-03    3.2753        .15181E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.4516        .59443        .37916E-04   -1.5467    
  14  Prefactor     5.7310        6.6808        .16778E-03   -1.5229    
  15  norm          .16116        1.6398        .14948E-02   -1.5628    
  16  Prefactor     .10000E-03    6.7317        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          11.783        11.788        .11670E-03   -1.5021    
  18  Normalizat    1.4002        .21342        .23656E-03   -.80622    
  19  Prefactor     .68305        .17005        .27167E-03   -1.0420    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.75445e-08
Minuit parameter uncertainties:
  1  8.07357
  2  20.5979
  3  3.65365e-05
  4  4.85155e-07
  5  0.000146167
  6  0.000127456
  7  3.78177e-05
  8  1.2999
  9  3.06132
  10  3.92348
  11  7.45459
  12  7.17631e-06
  13  0.594435
  14  6.68165
  15  1.02784
  16  3.99004e-05
  17  11.7907
  18  0.213557
  19  0.170183
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.149e+01  3.923e+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:  6.830e-01  1.702e-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.400e+00  2.136e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 16.18
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.39e-07 +/- 4.74e-08
Energy Flux (Fixed Index): 4.75e-05 +/- 1.62e-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) = 7461.60337033
delta logL = 0.28904705407

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7461.59656795
delta logL = 0.295849428606

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    9.1170       1.0000         .10000E-03   10000.    
     2 'Index     '    2.6076       1.0000          .0000       10.000    
     3 'Normalizat'    1.3773       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .69777       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=   7461.597     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      281 TOTAL
                     EDM=   .58E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     9.1171        4.7750        .81467E-04   -.47894E-03
   2  Index         2.6077        .34253        .37819E-02   -.14375E-03
   3  Normalizat    1.3773        .20500        .23808E-03    .43836E-04
   4  Prefactor     .69771        .16931        .26908E-03    .64812E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 9.11715
  Index      = 2.60767
  Normalizat = 1.37727
  Prefactor  = 0.697711
 **********
 **   18 **HESSE 
 **********

 FCN=   7461.597     FROM HESSE     STATUS=OK            25 CALLS      306 TOTAL
                     EDM=   .78E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     9.1171        4.5554        .32587E-05   -1.5104    
   2  Index         2.6077        .32667        .15128E-03   -.49891    
   3  Normalizat    1.3773        .20513        .95232E-05   -.81288    
   4  Prefactor     .69771        .16938        .10763E-04   -1.0362    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.8439e-11
Minuit parameter uncertainties:
  1  4.55558
  2  0.326967
  3  0.205256
  4  0.169501
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65742': 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) = 7461.5965675
delta logL = 0.295849883334

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  9.117e+00  4.556e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.608e+00  3.270e-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:  6.977e-01  1.695e-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.377e+00  2.053e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 16.74
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.61 +/- 0.33
Photon Flux (Free Index): 1.57e-07 +/- 5.56e-08
Energy Flux (Free Index): 4.09e-05 +/- 1.53e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/65742/cmap_HighResolution_440985601_441244801_4FGL_J1040.5+0617_daily_bin778.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.39e-07', energy_flux2='4.09e-05', photon_flux_error='4.74e-08', dlogl='2.96e-01', energy_flux='4.75e-05', photon_flux2='1.57e-07', job_status='DONE', time_completed='2021-09-02 08:36:49.110748', photon_index_error2='0.33', photon_index2='2.61', ts='16.18', fit_tolerance='1e-08', GAL='0.68', photon_index_error='0.00', energy_flux_error2='1.53e-05', EG='1.40', time_epoch_completed='1630597009.11', return_code='0', job_id='65742', GAL2='0.70', EG2='1.38', return_code2='0', energy_flux_error='1.62e-05', photon_flux_error2='5.56e-08', ts2='16.74', photon_index='2.37' WHERE bin_id='778' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:36:49 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0143>
Subject: Job 65742: <4FGL_J1040.5+0617_daily_bin778> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin778 160.15 6.2848 440985601 441244801 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 :                                   563.38 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             308.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   759 sec.
    Turnaround time :                            926 sec.

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

