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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1579
RA = 160.15, Dec = 6.2848
tmin = 648604801, tmax = 648864001
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='70544', job_status='RUN', time_executed='2021-09-02 08:44:31.934326', time_epoch_executed='1630597471.93' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1579'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/70544

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/70544/ft1_4FGL_J1040.5+0617_daily_bin1579.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/70544/ft2_4FGL_J1040.5+0617_daily_bin1579.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/70544/ft1_4FGL_J1040.5+0617_daily_bin1579.fits outfile=/scratch/kocevski/70544/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1579.fits ra=160.15 dec=6.2848 rad=12.0 tmin=648604801.0 tmax=648864001.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 2.97
user 2.77
sys 0.18

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/70544/ft2_4FGL_J1040.5+0617_daily_bin1579.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/70544/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1579.fits evtable="EVENTS" outfile="/scratch/kocevski/70544/ft1_filtered_4FGL_J1040.5+0617_daily_bin1579.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.51
user 0.37
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/70544/ft1_filtered_4FGL_J1040.5+0617_daily_bin1579.fits" evtable="EVENTS" scfile=/scratch/kocevski/70544/ft2_4FGL_J1040.5+0617_daily_bin1579.fits sctable="SC_DATA" outfile=/scratch/kocevski/70544/ltcube_648604801_648864001_4FGL_J1040.5+0617_daily_bin1579.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/70544/ft2_4FGL_J1040.5+0617_daily_bin1579.fits
.....................!
real 16.70
user 16.22
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/70544/ft1_filtered_4FGL_J1040.5+0617_daily_bin1579.fits evtable="EVENTS" scfile=/scratch/kocevski/70544/ft2_4FGL_J1040.5+0617_daily_bin1579.fits sctable="SC_DATA" expcube=/scratch/kocevski/70544/ltcube_648604801_648864001_4FGL_J1040.5+0617_daily_bin1579.fits outfile=/scratch/kocevski/70544/expmap_648604801_648864001_4FGL_J1040.5+0617_daily_bin1579.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/70544/ltcube_648604801_648864001_4FGL_J1040.5+0617_daily_bin1579.fits
.....................!
real 192.27
user 186.38
sys 5.23

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/70544/ft1_filtered_4FGL_J1040.5+0617_daily_bin1579.fits scfile=/scratch/kocevski/70544/ft2_4FGL_J1040.5+0617_daily_bin1579.fits outfile=/scratch/kocevski/70544/cmap_648604801_648864001_4FGL_J1040.5+0617_daily_bin1579.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.60
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/70544/ft1_filtered_4FGL_J1040.5+0617_daily_bin1579.fits scfile=/scratch/kocevski/70544/ft2_4FGL_J1040.5+0617_daily_bin1579.fits outfile=/scratch/kocevski/70544/cmap_HighResolution_648604801_648864001_4FGL_J1040.5+0617_daily_bin1579.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.65
user 0.39
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    32.937       1.0000         .10000E-03   10000.    
     3 'norm      '    34.706       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10061E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    8.2785       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10048E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10331E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    7.6310       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .74202       1.0000         .10000E-03   10000.    
    13 'norm      '    .10166E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    3.4643       1.0000         .10000E-03   10000.    
    15 'norm      '    .10036E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    5.9505       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2049       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1810       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=   4558.482     FROM MIGRAD    STATUS=CONVERGED    410 CALLS     1887 TOTAL
                     EDM=   .59E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    18.017        .55296E-07** at limit **
   2  Prefactor     32.911        51.375       -.72630E-05   -.27438E-03
   3  norm          34.701        27.868       -.18929E-06   -.48183E-04
   4  Prefactor     .10000E-03    5.4586        .40001E-07** at limit **
   5  Prefactor     .10000E-03    102.77        .73655E-07** at limit **
   6  Prefactor     .10000E-03    35.690       -.13555E-06** at limit **
   7  Prefactor     .10000E-03    12.480       -.59168E-07** at limit **
   8  norm          8.2786        2.6922        .93963E-07   -.36517E-04
   9  Prefactor     .10000E-03    5.6403        .28988E-07** at limit **
  10  Prefactor     .10000E-03    3.2008        .18927E-06** at limit **
  11  Prefactor     7.6316        10.949        .22357E-05   -.38736E-03
  12  Prefactor     .74662        6.5962        .22662E-06   -.90082E-04
  13  norm          .10000E-03    .27657       -.70943E-07** at limit **
  14  Prefactor     3.4537        11.295        .36418E-06   -.66857E-04
  15  norm          .10000E-03    .82339       -.16365E-06** at limit **
  16  Prefactor     .10000E-03    11.521        .22847E-07** at limit **
  17  norm          5.9512        14.104        .35404E-05   -.28257E-03
  18  Normalizat    1.2047        .25024       -.64467E-06    .15161E-04
  19  Prefactor     1.1811        .20065       -.27018E-06   -.28951E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 32.9112
  norm       = 34.7007
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 8.27859
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 7.63159
  Prefactor  = 0.746622
  norm       = 0.0001
  Prefactor  = 3.45368
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 5.95123
  Normalizat = 1.20474
  Prefactor  = 1.18107
 **********
 **   18 **HESSE 
 **********

 FCN=   4558.482     FROM HESSE     STATUS=OK           270 CALLS     2157 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    18.067        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     32.911        56.282        .69821E-04   -1.4560    
   3  norm          34.701        27.897        .68023E-04   -1.4529    
   4  Prefactor     .10000E-03    5.4618        .15404E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    102.92        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    35.707        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    12.502        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          8.2786        2.6910        .60382E-04   -1.5132    
   9  Prefactor     .10000E-03    5.6789        .15656E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    6.2455        .23019E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     7.6316        11.487        .72585E-03   -1.5155    
  12  Prefactor     .74662        28.386        .30875E-02   -1.5535    
  13  norm          .10000E-03    .29495        .65429E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     3.4537        10.721        .21727E-03   -1.5336    
  15  norm          .10000E-03    1.4206        .11759E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    11.541        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          5.9512        14.717        .82307E-03   -1.5220    
  18  Normalizat    1.2047        .29605        .28559E-03   -.86456    
  19  Prefactor     1.1811        .23778        .24538E-03   -.86916    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.52785e-09
Minuit parameter uncertainties:
  1  1.76964e-05
  2  56.3733
  3  27.907
  4  5.50639e-06
  5  4.22284e-05
  6  2.31319e-05
  7  6.40076e-06
  8  2.69107
  9  1.84452e-05
  10  3.49347e-05
  11  11.4908
  12  9.21142
  13  1.19247e-06
  14  10.7267
  15  1.89288e-05
  16  2.66263e-06
  17  14.7256
  18  0.296466
  19  0.237994
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  3.493e-05  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.181e+00  2.380e-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.205e+00  2.965e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/70544/likelihoodResults_648604801_648864001_4FGL_J1040.5+0617_daily_bin1579.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) = 4558.482741
delta logL = -0.000762272239626

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4558.48197924
delta logL = -5.14785824635e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10301E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3591       1.0000          .0000       10.000    
     3 'Normalizat'    1.2046       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1812       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=   4558.482     FROM MIGRAD    STATUS=CONVERGED     60 CALLS      233 TOTAL
                     EDM=   .67E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .35024        .40007E-01** at limit **
   2  Index         2.3512        5.3068        .50000        .99157E-05
   3  Normalizat    1.2047        .21179E-02    .64560E-01    .10327E-03
   4  Prefactor     1.1811        .18117E-02    .55495E-01    .12069E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.35118
  Normalizat = 1.20474
  Prefactor  = 1.18107
 **********
 **   18 **HESSE 
 **********

 FCN=   4558.482     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      266 TOTAL
                     EDM=   .76E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    83.072        .23123E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.3512        7.7621        .50000       -.55832    
   3  Normalizat    1.2047        .23138E-01    .28559E-03   -.86456    
   4  Prefactor     1.1811        .19803E-01    .24538E-03   -.86916    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 7.60932e-07
Minuit parameter uncertainties:
  1  0.000398895
  2  386.587
  3  0.0231383
  4  0.0198028
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/70544': 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) = 4558.48197868
delta logL = 4.30673026131e-08

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  3.989e-04  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.351e+00  3.866e+02  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.181e+00  1.980e-02  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.205e+00  2.314e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 160.150 6.285

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/70544/cmap_HighResolution_648604801_648864001_4FGL_J1040.5+0617_daily_bin1579.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.95e-03', job_status='DONE', photon_flux_upper_limit='1.16e-07', time_completed='2021-09-02 08:53:15.201641', job_id='70544', GAL2='1.18', fit_tolerance='1e-08', EG2='1.20', EG='1.20', time_epoch_completed='1630597995.2', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.18', dlogl='4.31e-08', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='1579' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:53:15 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0064>
Subject: Job 70544: <4FGL_J1040.5+0617_daily_bin1579> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1579> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:41:12 2021
Job was executed on host(s) <bullet0064>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:41:45 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:41:45 2021
Terminated at Thu Sep  2 08:53:15 2021
Results reported at Thu Sep  2 08:53:15 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1579 160.15 6.2848 648604801 648864001 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 :                                   510.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             259.04 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   690 sec.
    Turnaround time :                            723 sec.

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

