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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin155
RA = 160.15, Dec = 6.2848
tmin = 279504001, tmax = 279763201
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='60801', job_status='RUN', time_executed='2021-09-02 08:09:38.834132', time_epoch_executed='1630595378.83' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='155'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/60801

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/60801/ft1_4FGL_J1040.5+0617_daily_bin155.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/60801/ft2_4FGL_J1040.5+0617_daily_bin155.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/60801/ft1_4FGL_J1040.5+0617_daily_bin155.fits outfile=/scratch/kocevski/60801/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin155.fits ra=160.15 dec=6.2848 rad=12.0 tmin=279504001.0 tmax=279763201.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.58
user 3.35
sys 0.19

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/60801/ft1_filtered_4FGL_J1040.5+0617_daily_bin155.fits evtable="EVENTS" scfile=/scratch/kocevski/60801/ft2_4FGL_J1040.5+0617_daily_bin155.fits sctable="SC_DATA" expcube=/scratch/kocevski/60801/ltcube_279504001_279763201_4FGL_J1040.5+0617_daily_bin155.fits outfile=/scratch/kocevski/60801/expmap_279504001_279763201_4FGL_J1040.5+0617_daily_bin155.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/60801/ltcube_279504001_279763201_4FGL_J1040.5+0617_daily_bin155.fits
.....................!
real 192.00
user 186.97
sys 4.44

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/60801/ft1_filtered_4FGL_J1040.5+0617_daily_bin155.fits scfile=/scratch/kocevski/60801/ft2_4FGL_J1040.5+0617_daily_bin155.fits outfile=/scratch/kocevski/60801/cmap_279504001_279763201_4FGL_J1040.5+0617_daily_bin155.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.39
sys 0.13

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    9.0282       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10356E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    1.8341       1.0000         .10000E-03   10000.    
     4 'Prefactor '    30.657       1.0000         .10000E-03   10000.    
     5 'Prefactor '    31.534       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10050E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.8629       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.7194       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    5.7924       1.0000         .10000E-03   10000.    
    13 'norm      '    .24300       1.0000         .10000E-03   10000.    
    14 'Prefactor '    22.249       1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .69045       1.0000         .10000E-03   10000.    
    17 'norm      '    .10006E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.4826       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .94087       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=   7543.674     FROM MIGRAD    STATUS=CONVERGED    670 CALLS     2149 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     9.0315        21.563        .13339E-03   -.13551E-03
   2  Prefactor     .10000E-03    37.478        .18142E-02** at limit **
   3  norm          1.8356        63.538        .30811E-03    .89145E-04
   4  Prefactor     30.658        13.245        .72364E-04   -.53573E-04
   5  Prefactor     31.497        74.769        .71353E-04    .30687E-04
   6  Prefactor     .10000E-03    44.318        .18142E-02** at limit **
   7  Prefactor     .10000E-03    6.4400        .18142E-02** at limit **
   8  norm          1.8629        1.2474        .76639E-04    .15086E-03
   9  Prefactor     .10000E-03    3.4987        .15773E-02** at limit **
  10  Prefactor     2.7198        3.8936        .18609E-03    .12939E-03
  11  Prefactor     .10000E-03    1.6957        .11032E-02** at limit **
  12  Prefactor     5.7903        11.122        .16688E-03    .11561E-03
  13  norm          .24413        .52324        .80563E-03    .12300E-02
  14  Prefactor     22.227        13.430        .84917E-04    .27539E-03
  15  norm          .10000E-03    .20939        .18142E-03** at limit **
  16  Prefactor     .61033        253.29        .72239E-02    .53573E-04
  17  norm          .10000E-03    7.0054        .18142E-02** at limit **
  18  Normalizat    1.4826        .24591        .26240E-03    .27789E-03
  19  Prefactor     .94087        .18985        .26861E-03   -.10708E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 9.03149
  Prefactor  = 0.000100001
  norm       = 1.83562
  Prefactor  = 30.6585
  Prefactor  = 31.497
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 1.86288
  Prefactor  = 0.0001
  Prefactor  = 2.71975
  Prefactor  = 0.0001
  Prefactor  = 5.79026
  norm       = 0.24413
  Prefactor  = 22.227
  norm       = 0.0001
  Prefactor  = 0.610332
  norm       = 0.0001
  Normalizat = 1.48263
  Prefactor  = 0.940873
 **********
 **   18 **HESSE 
 **********

 FCN=   7543.674     FROM HESSE     STATUS=OK           254 CALLS     2403 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     9.0315        21.494        .53357E-05   -1.5107    
   2  Prefactor     .10000E-03    37.486        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          1.8356        63.091        .12325E-04   -1.5437    
   4  Prefactor     30.658        13.243        .28946E-05   -1.4600    
   5  Prefactor     31.497        74.703        .14271E-04   -1.4585    
   6  Prefactor     .10000E-03    44.320        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    6.4401        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.8629        1.2470        .30655E-05   -1.5435    
   9  Prefactor     .10000E-03    3.4998        .31547E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     2.7198        3.8913        .74436E-05   -1.5378    
  11  Prefactor     .10000E-03    1.6957        .22063E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     5.7903        11.113        .66751E-05   -1.5227    
  13  norm          .24413        .51839        .32225E-04   -1.5609    
  14  Prefactor     22.227        13.331        .33967E-05   -1.4765    
  15  norm          .10000E-03    .20939        .36285E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .61033        256.05        .28895E-02   -1.5552    
  17  norm          .10000E-03    7.0093        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.4826        .24469        .52481E-04   -.78268    
  19  Prefactor     .94087        .18996        .10745E-04   -.94727    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.24816e-09
Minuit parameter uncertainties:
  1  21.5129
  2  0.000331528
  3  21.5472
  4  13.2445
  5  74.9256
  6  0.000421097
  7  1.3249e-05
  8  1.24706
  9  3.15554e-06
  10  3.89161
  11  8.80562e-07
  12  11.1172
  13  0.518403
  14  13.3324
  15  6.8337e-09
  16  25.1085
  17  1.21378e-05
  18  0.244889
  19  0.19009
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.720e+00  3.892e+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:  9.409e-01  1.901e-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.483e+00  2.449e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/60801/likelihoodResults_279504001_279763201_4FGL_J1040.5+0617_daily_bin155.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) = 7543.41801904
delta logL = 0.255562467334

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7543.40901752
delta logL = 0.26456398565

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.6284       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0777       1.0000          .0000       10.000    
     3 'Normalizat'    1.4503       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .95831       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=   7543.409     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      242 TOTAL
                     EDM=   .84E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.6286        35.811        .82860E-02    .84749E-03
   2  Index         3.0781        3.7172        .14617        .13871E-03
   3  Normalizat    1.4501        .54448E-01    .59856E-01    .45233E-05
   4  Prefactor     .95840        .45452E-01    .45744E-01    .19124E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.62858
  Index      = 3.07811
  Normalizat = 1.45013
  Prefactor  = 0.958395
 **********
 **   18 **HESSE 
 **********

 FCN=   7543.409     FROM HESSE     STATUS=OK            33 CALLS      275 TOTAL
                     EDM=   .30E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.6286        3.8623        .10566E-03   -1.5453    
   2  Index         3.0781        1.3778        .82551E-02   -.39453    
   3  Normalizat    1.4501        .22948        .26471E-03   -.79190    
   4  Prefactor     .95840        .18923        .26639E-03   -.94129    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.04257e-08
Minuit parameter uncertainties:
  1  3.86291
  2  1.39912
  3  0.229645
  4  0.189356
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/60801': 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) = 7543.40901708
delta logL = 0.264564419792

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.629e+00  3.863e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.078e+00  1.399e+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:  9.584e-01  1.894e-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.450e+00  2.296e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.20
Ra Dec: 160.150 6.285
Photon Index (Free Index): 3.08 +/- 1.40
Photon Flux (Free Index): 6.00e-08 +/- 6.26e-08
Energy Flux (Free Index): 1.15e-05 +/- 1.27e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/60801/cmap_HighResolution_279504001_279763201_4FGL_J1040.5+0617_daily_bin155.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.94e-03', comment='SUCCESS', energy_flux2='1.15e-05', dlogl='2.65e-01', photon_flux2='6.00e-08', job_status='DONE', time_completed='2021-09-02 08:20:46.711138', photon_index_error2='1.40', photon_index2='3.08', ts='0.64', fit_tolerance='1e-08', GAL='0.94', photon_index_error='0.00', photon_flux_upper_limit='1.29e-07', energy_flux_error2='1.27e-05', EG='1.48', time_epoch_completed='1630596046.71', return_code='0', job_id='60801', GAL2='0.96', EG2='1.45', return_code2='0', photon_flux_error2='6.26e-08', ts2='1.20', photon_index='2.37' WHERE bin_id='155' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:20:46 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0203>
Subject: Job 60801: <4FGL_J1040.5+0617_daily_bin155> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin155> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:06:18 2021
Job was executed on host(s) <bullet0203>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:07:23 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:07:23 2021
Terminated at Thu Sep  2 08:20:47 2021
Results reported at Thu Sep  2 08:20:47 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin155 160.15 6.2848 279504001 279763201 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 :                                   660.16 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             326.30 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   804 sec.
    Turnaround time :                            869 sec.

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

