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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin801
RA = 160.15, Dec = 6.2848
tmin = 446947201, tmax = 447206401
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='66701', job_status='RUN', time_executed='2021-09-02 08:28:47.307182', time_epoch_executed='1630596527.31' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='801'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/66701

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/66701/ft1_4FGL_J1040.5+0617_daily_bin801.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/66701/ft2_4FGL_J1040.5+0617_daily_bin801.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/66701/ft1_4FGL_J1040.5+0617_daily_bin801.fits outfile=/scratch/kocevski/66701/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin801.fits ra=160.15 dec=6.2848 rad=12.0 tmin=446947201.0 tmax=447206401.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.42
user 3.19
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/66701/ft1_filtered_4FGL_J1040.5+0617_daily_bin801.fits" evtable="EVENTS" scfile=/scratch/kocevski/66701/ft2_4FGL_J1040.5+0617_daily_bin801.fits sctable="SC_DATA" outfile=/scratch/kocevski/66701/ltcube_446947201_447206401_4FGL_J1040.5+0617_daily_bin801.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/66701/ft2_4FGL_J1040.5+0617_daily_bin801.fits
.....................!
real 15.40
user 14.98
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/66701/ft1_filtered_4FGL_J1040.5+0617_daily_bin801.fits evtable="EVENTS" scfile=/scratch/kocevski/66701/ft2_4FGL_J1040.5+0617_daily_bin801.fits sctable="SC_DATA" expcube=/scratch/kocevski/66701/ltcube_446947201_447206401_4FGL_J1040.5+0617_daily_bin801.fits outfile=/scratch/kocevski/66701/expmap_446947201_447206401_4FGL_J1040.5+0617_daily_bin801.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/66701/ltcube_446947201_447206401_4FGL_J1040.5+0617_daily_bin801.fits
.....................!
real 192.24
user 186.69
sys 4.87

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/66701/ft1_filtered_4FGL_J1040.5+0617_daily_bin801.fits scfile=/scratch/kocevski/66701/ft2_4FGL_J1040.5+0617_daily_bin801.fits outfile=/scratch/kocevski/66701/cmap_446947201_447206401_4FGL_J1040.5+0617_daily_bin801.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.83
user 0.39
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/66701/ft1_filtered_4FGL_J1040.5+0617_daily_bin801.fits scfile=/scratch/kocevski/66701/ft2_4FGL_J1040.5+0617_daily_bin801.fits outfile=/scratch/kocevski/66701/cmap_HighResolution_446947201_447206401_4FGL_J1040.5+0617_daily_bin801.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.60
user 0.38
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    7.6124       1.0000         .10000E-03   10000.    
     2 'Prefactor '    36.223       1.0000         .10000E-03   10000.    
     3 'norm      '    8.8970       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    16.275       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    11.122       1.0000         .10000E-03   10000.    
     8 'norm      '    3.1890       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10113E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.1086       1.0000         .10000E-03   10000.    
    11 'Prefactor '    8.6422       1.0000         .10000E-03   10000.    
    12 'Prefactor '    4.9477       1.0000         .10000E-03   10000.    
    13 'norm      '    3.2911       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    5.1899       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .33066E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .70848       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2179       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=   5416.269     FROM MIGRAD    STATUS=CONVERGED    385 CALLS     1626 TOTAL
                     EDM=   .27E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     7.6121        10.390       -.39307E-06    .30727E-04
   2  Prefactor     36.200        37.335        .47038E-05    .28219E-03
   3  norm          8.8970        9.8111        .15078E-06    .76958E-05
   4  Prefactor     .10000E-03    3.0852        .99915E-07** at limit **
   5  Prefactor     16.273        55.003       -.79533E-06    .21648E-04
   6  Prefactor     .10000E-03    15.470       -.19150E-05** at limit **
   7  Prefactor     11.122        11.032        .25882E-06    .23472E-04
   8  norm          3.1888        1.7209       -.19482E-05    .65234E-03
   9  Prefactor     .10000E-03    9.1335        .95988E-06** at limit **
  10  Prefactor     2.1087        2.4552       -.47212E-06    .90498E-04
  11  Prefactor     8.6422        6.7875       -.43378E-06    .63517E-04
  12  Prefactor     4.9482        6.5630       -.86284E-06    .68046E-04
  13  norm          3.2913        .87086        .68120E-08    .28201E-03
  14  Prefactor     .10000E-03    3.1958       -.15424E-06** at limit **
  15  norm          5.1900        1.9077        .10959E-06    .33549E-03
  16  Prefactor     .10000E-03    12.849        .12055E-05** at limit **
  17  norm          .10000E-03    80.906       -.30068E-04** at limit **
  18  Normalizat    .70860        .21216        .11030E-05    .12624E-03
  19  Prefactor     1.2177        .17861        .13575E-05    .58276E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 7.61211
  Prefactor  = 36.1999
  norm       = 8.89702
  Prefactor  = 0.0001
  Prefactor  = 16.2733
  Prefactor  = 0.000100001
  Prefactor  = 11.1221
  norm       = 3.18878
  Prefactor  = 0.0001
  Prefactor  = 2.1087
  Prefactor  = 8.64217
  Prefactor  = 4.94817
  norm       = 3.29128
  Prefactor  = 0.0001
  norm       = 5.19004
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 0.7086
  Prefactor  = 1.21774
 **********
 **   18 **HESSE 
 **********

 FCN=   5416.269     FROM HESSE     STATUS=OK           272 CALLS     1898 TOTAL
                     EDM=   .47E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     7.6121        10.381        .14535E-03   -1.5156    
   2  Prefactor     36.200        37.668        .66588E-04   -1.4504    
   3  norm          8.8970        9.8082        .13438E-03   -1.5111    
   4  Prefactor     .10000E-03    3.0874        .12623E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     16.273        55.206        .99280E-04   -1.4901    
   6  Prefactor     .10000E-03    15.505        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     11.122        11.032        .12013E-03   -1.5041    
   8  norm          3.1888        1.7211        .34037E-03   -1.5351    
   9  Prefactor     .10000E-03    9.3738        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     2.1087        2.4387        .11989E-03   -1.5418    
  11  Prefactor     8.6422        6.7949        .13635E-03   -1.5120    
  12  Prefactor     4.9482        6.5484        .18081E-03   -1.5263    
  13  norm          3.2913        .87033        .33566E-04   -1.5345    
  14  Prefactor     .10000E-03    3.2003        .12844E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          5.1900        1.9067        .57408E-04   -1.5252    
  16  Prefactor     .10000E-03    12.906        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    79.086        .40144E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .70860        .24562        .31599E-03   -1.0355    
  19  Prefactor     1.2177        .20895        .22140E-03   -.85787    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.69577e-10
Minuit parameter uncertainties:
  1  10.3831
  2  37.6923
  3  9.81
  4  4.43974e-06
  5  55.38
  6  0.000182566
  7  11.0339
  8  1.72115
  9  1.3699e-05
  10  2.43886
  11  6.79553
  12  6.54937
  13  0.870334
  14  3.34808e-06
  15  1.90668
  16  0.000124427
  17  0.000383679
  18  0.245998
  19  0.209094
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.109e+00  2.439e+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.218e+00  2.091e-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:  7.086e-01  2.460e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.22
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 2.55e-08 +/- 2.94e-08
Energy Flux (Fixed Index): 8.72e-06 +/- 1.01e-05

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

Saving results to:
/scratch/kocevski/66701/likelihoodResults_446947201_447206401_4FGL_J1040.5+0617_daily_bin801.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5415.94748169
delta logL = 0.321323214956

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5415.90642447
delta logL = 0.362380440581

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.5006       1.0000         .10000E-03   10000.    
     2 'Index     '    1.8334       1.0000          .0000       10.000    
     3 'Normalizat'    .72028       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2068       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=   5415.906     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      247 TOTAL
                     EDM=   .47E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.5011        176.66        .54023E-02    .23724E-03
   2  Index         1.8333        5.1041        .22253       -.27961E-05
   3  Normalizat    .72029        .16180        .70840E-01    .21060E-04
   4  Prefactor     1.2068        .16205        .50248E-01    .28763E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.50111
  Index      = 1.83335
  Normalizat = 0.720285
  Prefactor  = 1.20684
 **********
 **   18 **HESSE 
 **********

 FCN=   5415.906     FROM HESSE     STATUS=OK            33 CALLS      280 TOTAL
                     EDM=   .70E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.5011        3.4280        .13016E-03   -1.5334    
   2  Index         1.8333        .53346        .83757E-02   -.68585    
   3  Normalizat    .72029        .22778        .31351E-03   -1.0310    
   4  Prefactor     1.2068        .20549        .22213E-03   -.86121    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.95679e-12
Minuit parameter uncertainties:
  1  3.42819
  2  0.535164
  3  0.228076
  4  0.205631
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/66701': 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) = 5415.90642446
delta logL = 0.362380451573

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.501e+00  3.428e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.833e+00  5.352e-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.207e+00  2.056e-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:  7.203e-01  2.281e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.94
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.83 +/- 0.54
Photon Flux (Free Index): 2.18e-08 +/- 2.31e-08
Energy Flux (Free Index): 2.37e-05 +/- 3.58e-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/66701/cmap_HighResolution_446947201_447206401_4FGL_J1040.5+0617_daily_bin801.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.86e-03', comment='SUCCESS', photon_flux='2.55e-08', energy_flux2='2.37e-05', photon_flux_error='2.94e-08', dlogl='3.62e-01', energy_flux='8.72e-06', photon_flux2='2.18e-08', job_status='DONE', time_completed='2021-09-02 08:37:42.853188', photon_index_error2='0.54', photon_index2='1.83', ts='1.22', fit_tolerance='1e-08', GAL='1.22', photon_index_error='0.00', photon_flux_upper_limit='1.02e-07', energy_flux_error2='3.58e-05', EG='0.71', time_epoch_completed='1630597062.85', return_code='0', job_id='66701', GAL2='1.21', EG2='0.72', return_code2='0', energy_flux_error='1.01e-05', photon_flux_error2='2.31e-08', ts2='1.94', photon_index='2.37' WHERE bin_id='801' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:37:42 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0124>
Subject: Job 66701: <4FGL_J1040.5+0617_daily_bin801> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin801> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Thu Sep  2 08:26:06 2021
Job was executed on host(s) <bullet0124>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:26: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:26:10 2021
Terminated at Thu Sep  2 08:37:43 2021
Results reported at Thu Sep  2 08:37:43 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin801 160.15 6.2848 446947201 447206401 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 :                                   532.07 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             325.81 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   693 sec.
    Turnaround time :                            697 sec.

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

