/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 139 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 = 7383
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin276
RA = 160.15, Dec = 6.2848
tmin = 310867201, tmax = 311126401
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='62845', job_status='RUN', time_executed='2021-09-02 08:15:15.654951', time_epoch_executed='1630595715.65' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='276'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62845

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62845/ft1_4FGL_J1040.5+0617_daily_bin276.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62845/ft2_4FGL_J1040.5+0617_daily_bin276.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62845/ft1_4FGL_J1040.5+0617_daily_bin276.fits outfile=/scratch/kocevski/62845/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin276.fits ra=160.15 dec=6.2848 rad=12.0 tmin=310867201.0 tmax=311126401.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.57
user 3.34
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/62845/ft2_4FGL_J1040.5+0617_daily_bin276.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/62845/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin276.fits evtable="EVENTS" outfile="/scratch/kocevski/62845/ft1_filtered_4FGL_J1040.5+0617_daily_bin276.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.52
user 0.38
sys 0.13

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/62845/ft1_filtered_4FGL_J1040.5+0617_daily_bin276.fits" evtable="EVENTS" scfile=/scratch/kocevski/62845/ft2_4FGL_J1040.5+0617_daily_bin276.fits sctable="SC_DATA" outfile=/scratch/kocevski/62845/ltcube_310867201_311126401_4FGL_J1040.5+0617_daily_bin276.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/62845/ft2_4FGL_J1040.5+0617_daily_bin276.fits
.....................!
real 17.43
user 16.96
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62845/ft1_filtered_4FGL_J1040.5+0617_daily_bin276.fits evtable="EVENTS" scfile=/scratch/kocevski/62845/ft2_4FGL_J1040.5+0617_daily_bin276.fits sctable="SC_DATA" expcube=/scratch/kocevski/62845/ltcube_310867201_311126401_4FGL_J1040.5+0617_daily_bin276.fits outfile=/scratch/kocevski/62845/expmap_310867201_311126401_4FGL_J1040.5+0617_daily_bin276.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/62845/ltcube_310867201_311126401_4FGL_J1040.5+0617_daily_bin276.fits
.....................!
real 193.09
user 186.96
sys 5.12

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/62845/ft1_filtered_4FGL_J1040.5+0617_daily_bin276.fits scfile=/scratch/kocevski/62845/ft2_4FGL_J1040.5+0617_daily_bin276.fits outfile=/scratch/kocevski/62845/cmap_310867201_311126401_4FGL_J1040.5+0617_daily_bin276.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.41
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/62845/ft1_filtered_4FGL_J1040.5+0617_daily_bin276.fits scfile=/scratch/kocevski/62845/ft2_4FGL_J1040.5+0617_daily_bin276.fits outfile=/scratch/kocevski/62845/cmap_HighResolution_310867201_311126401_4FGL_J1040.5+0617_daily_bin276.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.57
user 0.42
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    24.189       1.0000         .10000E-03   10000.    
     2 'Prefactor '    26.060       1.0000         .10000E-03   10000.    
     3 'norm      '    20.570       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .12090E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    14.678       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .19604E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .11404E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    6.1652       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    14.749       1.0000         .10000E-03   10000.    
    12 'Prefactor '    5.9557       1.0000         .10000E-03   10000.    
    13 'norm      '    1.8161       1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.1555       1.0000         .10000E-03   10000.    
    15 'norm      '    .10083E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    17.193       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .98848       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .98741       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=   5776.911     FROM MIGRAD    STATUS=CONVERGED    387 CALLS     1660 TOTAL
                     EDM=   .27E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     24.201        12.925       -.14281E-06   -.26876E-05
   2  Prefactor     26.099        29.708       -.33811E-06    .33104E-04
   3  norm          20.576        14.616        .17586E-06    .10871E-03
   4  Prefactor     .10000E-03    8.0435       -.32086E-05** at limit **
   5  Prefactor     14.540        54.502       -.15754E-05   -.49094E-04
   6  Prefactor     .10000E-03    115.11       -.13641E-04** at limit **
   7  Prefactor     .10000E-03    18.270       -.38178E-05** at limit **
   8  norm          .10000E-03    .72076        .15003E-06** at limit **
   9  Prefactor     6.1623        6.1465        .27806E-05    .35218E-03
  10  Prefactor     .10000E-03    .77123       -.16270E-06** at limit **
  11  Prefactor     14.761        8.9916       -.37800E-06   -.89375E-04
  12  Prefactor     5.9615        5.9128       -.15275E-06   -.54866E-04
  13  norm          1.8161        .95799       -.29625E-07   -.10573E-03
  14  Prefactor     4.1570        13.329        .71149E-06    .56940E-06
  15  norm          .10000E-03    .83305        .39738E-06** at limit **
  16  Prefactor     .10000E-03    10.219        .31777E-06** at limit **
  17  norm          17.197        17.253       -.49142E-06   -.10293E-03
  18  Normalizat    .98777        .21587        .49031E-05   -.21135E-03
  19  Prefactor     .98798        .17482       -.49685E-05    .68179E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 24.2006
  Prefactor  = 26.0987
  norm       = 20.5758
  Prefactor  = 0.0001
  Prefactor  = 14.5399
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 6.16233
  Prefactor  = 0.0001
  Prefactor  = 14.7605
  Prefactor  = 5.96147
  norm       = 1.81606
  Prefactor  = 4.15701
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 17.197
  Normalizat = 0.98777
  Prefactor  = 0.987983
 **********
 **   18 **HESSE 
 **********

 FCN=   5776.911     FROM HESSE     STATUS=OK           274 CALLS     1934 TOTAL
                     EDM=   .73E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     24.201        12.922        .81447E-04   -1.4724    
   2  Prefactor     26.099        29.699        .39237E-03   -1.4686    
   3  norm          20.576        14.613        .88311E-04   -1.4800    
   4  Prefactor     .10000E-03    8.1505        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     14.540        54.662        .10454E-03   -1.4945    
   6  Prefactor     .10000E-03    116.56        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    18.419        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    1.1440        .12420E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     6.1623        6.2332        .80842E-03   -1.5211    
  10  Prefactor     .10000E-03    .77519        .65178E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     14.761        9.0171        .10429E-03   -1.4939    
  12  Prefactor     5.9615        5.9044        .16454E-03   -1.5220    
  13  norm          1.8161        .97390        .39738E-04   -1.5438    
  14  Prefactor     4.1570        13.595        .19772E-03   -1.5300    
  15  norm          .10000E-03    1.7788        .13238E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    10.242        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          17.197        17.227        .96593E-04   -1.4878    
  18  Normalizat    .98777        .23738        .27482E-03   -.93441    
  19  Prefactor     .98798        .19025        .23254E-03   -.93131    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.3293e-10
Minuit parameter uncertainties:
  1  12.9231
  2  29.7157
  3  14.6158
  4  4.5224e-05
  5  54.8514
  6  0.000632944
  7  8.47234e-05
  8  1.74714e-05
  9  6.23388
  10  1.83605e-06
  11  9.01793
  12  5.90494
  13  0.973905
  14  13.6056
  15  4.17954e-05
  16  1.06331e-05
  17  17.2317
  18  0.237637
  19  0.190378
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  1.836e-06  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:  9.880e-01  1.904e-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:  9.878e-01  2.376e-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: 4.94e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.81e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/62845/likelihoodResults_310867201_311126401_4FGL_J1040.5+0617_daily_bin276.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) = 5776.91732021
delta logL = -0.00592162452449

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5776.91140123
delta logL = -2.64675782091e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10078E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3584       1.0000          .0000       10.000    
     3 'Normalizat'    .98732       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .98838       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5360E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5776.911     FROM MIGRAD    STATUS=CONVERGED     93 CALLS      238 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    9.7246        .65438E-02** at limit **
   2  Index         1.9749        5.3123        .50000       -.10787E-06
   3  Normalizat    .98777        .16859E-01    .27481E-03   -.34684E-03
   4  Prefactor     .98798        .14342E-01    .23255E-03   -.41115E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.97491
  Normalizat = 0.987775
  Prefactor  = 0.987979
 **********
 **   18 **HESSE 
 **********

 FCN=   5776.911     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      267 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    103.94        .68191E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.9749        8.5252        .50000       -.64979    
   3  Normalizat    .98777        .65524E-01    .54961E-04   -.93441    
   4  Prefactor     .98798        .55731E-01    .46509E-04   -.93131    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.47135e-09
Minuit parameter uncertainties:
  1  2.94514e-05
  2  739.044
  3  0.0655297
  4  0.0557346
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62845': 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) = 5776.91139328
delta logL = 5.30498800799e-06

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  2.945e-05  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.975e+00  7.390e+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:  9.880e-01  5.573e-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:  9.878e-01  6.553e-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/62845/cmap_HighResolution_310867201_311126401_4FGL_J1040.5+0617_daily_bin276.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.81e-03', job_status='DONE', photon_flux_upper_limit='4.94e-08', time_completed='2021-09-02 08:24:27.911988', job_id='62845', GAL2='0.99', fit_tolerance='1e-08', EG2='0.99', EG='0.99', time_epoch_completed='1630596267.91', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.99', dlogl='5.30e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='276' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:24:27 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0194>
Subject: Job 62845: <4FGL_J1040.5+0617_daily_bin276> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin276> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:11:18 2021
Job was executed on host(s) <bullet0194>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:12:46 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:12:46 2021
Terminated at Thu Sep  2 08:24:28 2021
Results reported at Thu Sep  2 08:24:28 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin276 160.15 6.2848 310867201 311126401 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 :                                   547.32 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             303.13 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   702 sec.
    Turnaround time :                            790 sec.

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

