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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1141
RA = 160.15, Dec = 6.2848
tmin = 535075201, tmax = 535334401
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='68086', job_status='RUN', time_executed='2021-09-02 08:37:28.965178', time_epoch_executed='1630597048.97' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1141'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/68086

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/68086/ft1_4FGL_J1040.5+0617_daily_bin1141.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/68086/ft2_4FGL_J1040.5+0617_daily_bin1141.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/68086/ft1_4FGL_J1040.5+0617_daily_bin1141.fits outfile=/scratch/kocevski/68086/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1141.fits ra=160.15 dec=6.2848 rad=12.0 tmin=535075201.0 tmax=535334401.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 4.98
user 4.69
sys 0.26

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/68086/ft1_filtered_4FGL_J1040.5+0617_daily_bin1141.fits" evtable="EVENTS" scfile=/scratch/kocevski/68086/ft2_4FGL_J1040.5+0617_daily_bin1141.fits sctable="SC_DATA" outfile=/scratch/kocevski/68086/ltcube_535075201_535334401_4FGL_J1040.5+0617_daily_bin1141.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/68086/ft2_4FGL_J1040.5+0617_daily_bin1141.fits
.....................!
real 15.76
user 15.34
sys 0.38

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/68086/ft1_filtered_4FGL_J1040.5+0617_daily_bin1141.fits evtable="EVENTS" scfile=/scratch/kocevski/68086/ft2_4FGL_J1040.5+0617_daily_bin1141.fits sctable="SC_DATA" expcube=/scratch/kocevski/68086/ltcube_535075201_535334401_4FGL_J1040.5+0617_daily_bin1141.fits outfile=/scratch/kocevski/68086/expmap_535075201_535334401_4FGL_J1040.5+0617_daily_bin1141.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/68086/ltcube_535075201_535334401_4FGL_J1040.5+0617_daily_bin1141.fits
.....................!
real 192.10
user 186.72
sys 4.94

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/68086/ft1_filtered_4FGL_J1040.5+0617_daily_bin1141.fits scfile=/scratch/kocevski/68086/ft2_4FGL_J1040.5+0617_daily_bin1141.fits outfile=/scratch/kocevski/68086/cmap_535075201_535334401_4FGL_J1040.5+0617_daily_bin1141.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.57
user 0.38
sys 0.15

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

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

This is gtbin version HEAD
real 0.56
user 0.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10085E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    31.701       1.0000         .10000E-03   10000.    
     3 'norm      '    8.1687       1.0000         .10000E-03   10000.    
     4 'Prefactor '    5.2445       1.0000         .10000E-03   10000.    
     5 'Prefactor '    61.860       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .20820E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    3.1479       1.0000         .10000E-03   10000.    
     8 'norm      '    3.7835       1.0000         .10000E-03   10000.    
     9 'Prefactor '    7.6611       1.0000         .10000E-03   10000.    
    10 'Prefactor '    14.565       1.0000         .10000E-03   10000.    
    11 'Prefactor '    19.496       1.0000         .10000E-03   10000.    
    12 'Prefactor '    6.6834       1.0000         .10000E-03   10000.    
    13 'norm      '    .72270       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    2.9876       1.0000         .10000E-03   10000.    
    16 'Prefactor '    12.366       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .51274       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.3287       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=   6053.879     FROM MIGRAD    STATUS=CONVERGED    378 CALLS     1892 TOTAL
                     EDM=   .13E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    7.0885       -.19708E-06** at limit **
   2  Prefactor     31.696        47.889       -.10928E-05   -.30687E-04
   3  norm          8.1712        12.774       -.44556E-07   -.44994E-04
   4  Prefactor     5.2474        7.7424       -.71460E-06   -.19953E-03
   5  Prefactor     61.848        52.346       -.97034E-06   -.74299E-04
   6  Prefactor     .10000E-03    60.861       -.18222E-06** at limit **
   7  Prefactor     3.1113        16.714        .26785E-05    .10808E-03
   8  norm          3.7834        1.8000       -.94707E-07   -.66672E-04
   9  Prefactor     7.6606        7.3236        .21195E-05   -.12623E-03
  10  Prefactor     14.565        4.5190       -.17010E-06   -.40628E-03
  11  Prefactor     19.497        8.6732        .99993E-07    .48829E-04
  12  Prefactor     6.6845        8.9859        .34339E-07   -.66411E-04
  13  norm          .72274        .51467        .11876E-07   -.41935E-04
  14  Prefactor     .10000E-03    15.298       -.41792E-07** at limit **
  15  norm          2.9876        1.7290        .39496E-07   -.26907E-04
  16  Prefactor     12.365        17.905        .74143E-08   -.15279E-04
  17  norm          .10000E-03    2.9819        .16231E-07** at limit **
  18  Normalizat    .51266        .21165        .89158E-07   -.18695E-04
  19  Prefactor     1.3288        .17332       -.34211E-06    .70213E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 31.6959
  norm       = 8.17121
  Prefactor  = 5.24741
  Prefactor  = 61.848
  Prefactor  = 0.000100001
  Prefactor  = 3.11132
  norm       = 3.78343
  Prefactor  = 7.66058
  Prefactor  = 14.5647
  Prefactor  = 19.4968
  Prefactor  = 6.68449
  norm       = 0.722737
  Prefactor  = 0.0001
  norm       = 2.98756
  Prefactor  = 12.3648
  norm       = 0.0001
  Normalizat = 0.512664
  Prefactor  = 1.32879
 **********
 **   18 **HESSE 
 **********

 FCN=   6053.879     FROM HESSE     STATUS=OK           276 CALLS     2168 TOTAL
                     EDM=   .25E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    7.1579        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     31.696        47.943        .71165E-04   -1.4581    
   3  norm          8.1712        12.759        .14028E-03   -1.5136    
   4  Prefactor     5.2474        7.8572        .17552E-03   -1.5250    
   5  Prefactor     61.848        52.651        .51017E-04   -1.4133    
   6  Prefactor     .10000E-03    61.242        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     3.1113        17.658        .22846E-03   -1.5355    
   8  norm          3.7834        1.7973        .67734E-04   -1.5319    
   9  Prefactor     7.6606        7.4206        .72441E-03   -1.5154    
  10  Prefactor     14.565        4.5363        .86215E-04   -1.4945    
  11  Prefactor     19.497        8.6863        .90709E-04   -1.4825    
  12  Prefactor     6.6845        8.9456        .15522E-03   -1.5191    
  13  norm          .72274        .49714        .44584E-04   -1.5538    
  14  Prefactor     .10000E-03    15.710        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          2.9876        1.7228        .71828E-04   -1.5362    
  16  Prefactor     12.365        17.896        .11391E-03   -1.5005    
  17  norm          .10000E-03    2.9832        .13122E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .51266        .23189        .36733E-03   -1.1183    
  19  Prefactor     1.3288        .19329        .21392E-03   -.82455    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.52294e-10
Minuit parameter uncertainties:
  1  9.86881e-06
  2  48.0015
  3  12.7628
  4  7.85872
  5  52.6909
  6  0.000420684
  7  14.8306
  8  1.79736
  9  7.42153
  10  4.53645
  11  8.68688
  12  8.94737
  13  0.497142
  14  1.34813e-06
  15  1.72279
  16  17.9038
  17  1.00306e-07
  18  0.232325
  19  0.193392
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.456e+01  4.536e+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:  1.329e+00  1.934e-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:  5.127e-01  2.323e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 28.34
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.76e-07 +/- 5.48e-08
Energy Flux (Fixed Index): 6.02e-05 +/- 1.88e-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) = 6053.47732197
delta logL = 0.401632916865

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6053.47725674
delta logL = 0.401698145296

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    16.877       1.0000         .10000E-03   10000.    
     2 'Index     '    2.0909       1.0000          .0000       10.000    
     3 'Normalizat'    .55748       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3040       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=   6053.477     FROM MIGRAD    STATUS=CONVERGED     59 CALLS      270 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     16.872        79.265        .24373E-02    .22669E-04
   2  Index         2.0906        3.1668        .11601        .54794E-04
   3  Normalizat    .55761        .46055        .79780E-01    .36007E-04
   4  Prefactor     1.3040        .29163        .48795E-01   -.77164E-06
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 16.872
  Index      = 2.09063
  Normalizat = 0.557609
  Prefactor  = 1.30398
 **********
 **   18 **HESSE 
 **********

 FCN=   6053.477     FROM HESSE     STATUS=OK            33 CALLS      303 TOTAL
                     EDM=   .46E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     16.872        5.6522        .97493E-04   -1.4886    
   2  Index         2.0906        .30171        .46934E-02   -.62103    
   3  Normalizat    .55761        .21568        .35331E-03   -1.0982    
   4  Prefactor     1.3040        .19052        .21569E-03   -.83189    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.62566e-13
Minuit parameter uncertainties:
  1  5.65237
  2  0.301988
  3  0.216007
  4  0.190622
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/68086': 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) = 6053.47725557
delta logL = 0.401699307827

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.687e+01  5.652e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.091e+00  3.020e-01  0.000e+00  1.000e+01 (-1.000e+00)
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  1.304e+00  1.906e-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:  5.576e-01  2.160e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 28.92
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.09 +/- 0.30
Photon Flux (Free Index): 1.40e-07 +/- 5.98e-08
Energy Flux (Free Index): 7.87e-05 +/- 3.91e-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/68086/cmap_HighResolution_535075201_535334401_4FGL_J1040.5+0617_daily_bin1141.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.76e-07', energy_flux2='7.87e-05', photon_flux_error='5.48e-08', dlogl='4.02e-01', energy_flux='6.02e-05', photon_flux2='1.40e-07', job_status='DONE', time_completed='2021-09-02 08:46:35.460170', photon_index_error2='0.30', photon_index2='2.09', ts='28.34', fit_tolerance='1e-08', GAL='1.33', photon_index_error='0.00', energy_flux_error2='3.91e-05', EG='0.51', time_epoch_completed='1630597595.46', return_code='0', job_id='68086', GAL2='1.30', EG2='0.56', return_code2='0', energy_flux_error='1.88e-05', photon_flux_error2='5.98e-08', ts2='28.92', photon_index='2.37' WHERE bin_id='1141' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:46:35 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0270>
Subject: Job 68086: <4FGL_J1040.5+0617_daily_bin1141> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1141> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Thu Sep  2 08:31:35 2021
Job was executed on host(s) <bullet0270>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:33:27 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:33:27 2021
Terminated at Thu Sep  2 08:46:36 2021
Results reported at Thu Sep  2 08:46:36 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1141 160.15 6.2848 535075201 535334401 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 :                                   540.39 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             292.85 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   788 sec.
    Turnaround time :                            901 sec.

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

