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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1126
RA = 160.15, Dec = 6.2848
tmin = 531187201, tmax = 531446401
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='68068', job_status='RUN', time_executed='2021-09-02 08:37:20.781651', time_epoch_executed='1630597040.78' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1126'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/68068

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/68068/ft1_4FGL_J1040.5+0617_daily_bin1126.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/68068/ft2_4FGL_J1040.5+0617_daily_bin1126.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/68068/ft1_4FGL_J1040.5+0617_daily_bin1126.fits outfile=/scratch/kocevski/68068/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1126.fits ra=160.15 dec=6.2848 rad=12.0 tmin=531187201.0 tmax=531446401.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.00
user 3.77
sys 0.21

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

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

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/68068/ft1_filtered_4FGL_J1040.5+0617_daily_bin1126.fits evtable="EVENTS" scfile=/scratch/kocevski/68068/ft2_4FGL_J1040.5+0617_daily_bin1126.fits sctable="SC_DATA" expcube=/scratch/kocevski/68068/ltcube_531187201_531446401_4FGL_J1040.5+0617_daily_bin1126.fits outfile=/scratch/kocevski/68068/expmap_531187201_531446401_4FGL_J1040.5+0617_daily_bin1126.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/68068/ltcube_531187201_531446401_4FGL_J1040.5+0617_daily_bin1126.fits
.....................!
real 191.35
user 185.57
sys 5.19

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/68068/ft1_filtered_4FGL_J1040.5+0617_daily_bin1126.fits scfile=/scratch/kocevski/68068/ft2_4FGL_J1040.5+0617_daily_bin1126.fits outfile=/scratch/kocevski/68068/cmap_531187201_531446401_4FGL_J1040.5+0617_daily_bin1126.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.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/68068/ft1_filtered_4FGL_J1040.5+0617_daily_bin1126.fits scfile=/scratch/kocevski/68068/ft2_4FGL_J1040.5+0617_daily_bin1126.fits outfile=/scratch/kocevski/68068/cmap_HighResolution_531187201_531446401_4FGL_J1040.5+0617_daily_bin1126.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.54
user 0.38
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.9485       1.0000         .10000E-03   10000.    
     2 'Prefactor '    12.910       1.0000         .10000E-03   10000.    
     3 'norm      '    4.7487       1.0000         .10000E-03   10000.    
     4 'Prefactor '    5.7492       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10021E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .34813E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    28.410       1.0000         .10000E-03   10000.    
     8 'norm      '    3.1996       1.0000         .10000E-03   10000.    
     9 'Prefactor '    1.7127       1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.1428       1.0000         .10000E-03   10000.    
    11 'Prefactor '    1.2881       1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.0774       1.0000         .10000E-03   10000.    
    13 'norm      '    .25550       1.0000         .10000E-03   10000.    
    14 'Prefactor '    8.7700       1.0000         .10000E-03   10000.    
    15 'norm      '    .10049E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10015E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1392       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0699       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=   6790.235     FROM MIGRAD    STATUS=CONVERGED    385 CALLS     1648 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.9470        9.1945       -.40927E-05   -.20927E-03
   2  Prefactor     12.879        50.747       -.73612E-04   -.49614E-05
   3  norm          4.7392        14.258        .28952E-05   -.12795E-03
   4  Prefactor     5.7411        9.9557        .14976E-04   -.10411E-03
   5  Prefactor     .10000E-03    47.251        .50169E-05** at limit **
   6  Prefactor     .10001E-03    48.358        .36338E-04** at limit **
   7  Prefactor     28.366        21.718       -.27487E-04   -.22106E-03
   8  norm          3.1997        1.4712        .36169E-06    .30836E-03
   9  Prefactor     1.7144        5.6593        .28402E-05   -.77532E-03
  10  Prefactor     3.1437        3.3636        .74058E-08    .19606E-03
  11  Prefactor     1.2881        3.1815       -.11597E-05   -.84276E-03
  12  Prefactor     1.0773        8.0681       -.34955E-05   -.14594E-03
  13  norm          .25531        .37173        .17414E-07    .40698E-03
  14  Prefactor     8.7738        8.3567       -.42491E-06    .35876E-03
  15  norm          .10000E-03    .45596       -.23510E-06** at limit **
  16  Prefactor     .10000E-03    9.3240        .29829E-06** at limit **
  17  norm          .10000E-03    12.746       -.16157E-05** at limit **
  18  Normalizat    1.1389        .19495        .53099E-05    .18992E-03
  19  Prefactor     1.0702        .16007        .98853E-06    .45338E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.94704
  Prefactor  = 12.8792
  norm       = 4.73915
  Prefactor  = 5.74115
  Prefactor  = 0.000100001
  Prefactor  = 0.000100008
  Prefactor  = 28.3659
  norm       = 3.1997
  Prefactor  = 1.71436
  Prefactor  = 3.14365
  Prefactor  = 1.28805
  Prefactor  = 1.07731
  norm       = 0.255314
  Prefactor  = 8.77383
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 1.13885
  Prefactor  = 1.07017
 **********
 **   18 **HESSE 
 **********

 FCN=   6790.235     FROM HESSE     STATUS=OK           278 CALLS     1926 TOTAL
                     EDM=   .37E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.9470        9.1346        .20300E-03   -1.5311    
   2  Prefactor     12.879        50.654        .11148E-03   -1.4990    
   3  norm          4.7392        14.154        .18464E-03   -1.5273    
   4  Prefactor     5.7411        9.8983        .16751E-03   -1.5229    
   5  Prefactor     .10000E-03    47.339        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10001E-03    48.746        .21326E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     28.366        21.766        .75165E-04   -1.4642    
   8  norm          3.1997        1.4687        .64915E-04   -1.5350    
   9  Prefactor     1.7144        5.6320        .32116E-03   -1.5446    
  10  Prefactor     3.1437        3.3016        .14274E-03   -1.5353    
  11  Prefactor     1.2881        3.1303        .22440E-03   -1.5481    
  12  Prefactor     1.0773        17.870        .39561E-02   -1.5500    
  13  norm          .25531        .32149        .54125E-03   -1.5607    
  14  Prefactor     8.7738        8.0820        .13535E-03   -1.5115    
  15  norm          .10000E-03    .91489        .10808E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    9.3436        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    13.198        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.1389        .22670        .26861E-03   -.88514    
  19  Prefactor     1.0702        .18771        .23728E-03   -.90426    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.67915e-08
Minuit parameter uncertainties:
  1  9.13781
  2  50.8244
  3  14.1638
  4  9.90117
  5  0.000367016
  6  0.00123624
  7  21.772
  8  1.46869
  9  5.6337
  10  3.30177
  11  3.13068
  12  8.77809
  13  0.321496
  14  8.08299
  15  1.39748e-05
  16  2.94013e-05
  17  7.92158e-05
  18  0.226899
  19  0.187827
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.144e+00  3.302e+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.070e+00  1.878e-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.139e+00  2.269e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.27
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 3.80e-08 +/- 3.99e-08
Energy Flux (Fixed Index): 1.30e-05 +/- 1.37e-05

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

Saving results to:
/scratch/kocevski/68068/likelihoodResults_531187201_531446401_4FGL_J1040.5+0617_daily_bin1126.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): 102
logL (Free Index) = 6789.10623643
delta logL = 1.12865751411

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6788.93469065
delta logL = 1.3002032868

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .90438E-02   1.0000         .10000E-03   10000.    
     2 'Index     '    6.2752       1.0000          .0000       10.000    
     3 'Normalizat'    1.0018       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1631       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=   6788.935     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      303 TOTAL
                     EDM=   .37E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .89639E-02    .71750E-01    .91299E-03   -.25175E-01
   2  Index         6.2798        2.3736        .10479       -.14550E-03
   3  Normalizat    1.0015        .54071E-01    .46190E-01   -.14827E-03
   4  Prefactor     1.1634        .46631E-01    .51814E-01    .16078E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00896388
  Index      = 6.27979
  Normalizat = 1.00145
  Prefactor  = 1.16338
 **********
 **   18 **HESSE 
 **********

 FCN=   6788.935     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      336 TOTAL
                     EDM=   .50E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .89639E-02    .14521        .43402E-05   -1.5689    
   2  Index         6.2798        3.5745        .41574E-02    .25884    
   3  Normalizat    1.0015        .19694        .28357E-03   -.92982    
   4  Prefactor     1.1634        .16584        .22908E-03   -.87466    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.04898e-10
Minuit parameter uncertainties:
  1  0.0717523
  2  4.02329
  3  0.197086
  4  0.165914
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/68068': 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): 102
logL (Free Index) = 6788.93468827
delta logL = 1.30020566974

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  8.964e-03  7.175e-02  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  6.280e+00  4.023e+00  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.163e+00  1.659e-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.001e+00  1.971e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.34
Ra Dec: 160.150 6.285
Photon Index (Free Index): 6.28 +/- 4.02
Photon Flux (Free Index): 1.31e-07 +/- 7.48e-08
Energy Flux (Free Index): 1.61e-05 +/- 9.97e-06

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/68068/cmap_HighResolution_531187201_531446401_4FGL_J1040.5+0617_daily_bin1126.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.46e-03', comment='SUCCESS', photon_flux='3.80e-08', energy_flux2='1.61e-05', photon_flux_error='3.99e-08', dlogl='1.30e+00', energy_flux='1.30e-05', photon_flux2='1.31e-07', job_status='DONE', time_completed='2021-09-02 08:47:16.341632', photon_index_error2='4.02', photon_index2='6.28', ts='1.27', fit_tolerance='1e-08', GAL='1.07', photon_index_error='0.00', photon_flux_upper_limit='1.23e-07', energy_flux_error2='9.97e-06', EG='1.14', time_epoch_completed='1630597636.34', return_code='0', job_id='68068', GAL2='1.16', EG2='1.00', return_code2='102', energy_flux_error='1.37e-05', photon_flux_error2='7.48e-08', ts2='4.34', photon_index='2.37' WHERE bin_id='1126' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:47:16 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0098>
Subject: Job 68068: <4FGL_J1040.5+0617_daily_bin1126> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1126 160.15 6.2848 531187201 531446401 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 :                                   591.16 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             227.32 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   840 sec.
    Turnaround time :                            944 sec.

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

