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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1242
RA = 160.15, Dec = 6.2848
tmin = 561254401, tmax = 561513601
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='69198', job_status='RUN', time_executed='2021-09-02 08:40:42.964176', time_epoch_executed='1630597242.96' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1242'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/69198

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

Retrieving the FT1 file...

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

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

Retrieving 48 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/69198/ft1_4FGL_J1040.5+0617_daily_bin1242.fits


Retrieving the FT1 file...

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

Retrieving 48 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/69198/ft2_4FGL_J1040.5+0617_daily_bin1242.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/69198/ft1_4FGL_J1040.5+0617_daily_bin1242.fits outfile=/scratch/kocevski/69198/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1242.fits ra=160.15 dec=6.2848 rad=12.0 tmin=561254401.0 tmax=561513601.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.87
user 3.64
sys 0.19

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/69198/ft1_filtered_4FGL_J1040.5+0617_daily_bin1242.fits evtable="EVENTS" scfile=/scratch/kocevski/69198/ft2_4FGL_J1040.5+0617_daily_bin1242.fits sctable="SC_DATA" expcube=/scratch/kocevski/69198/ltcube_561254401_561513601_4FGL_J1040.5+0617_daily_bin1242.fits outfile=/scratch/kocevski/69198/expmap_561254401_561513601_4FGL_J1040.5+0617_daily_bin1242.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/69198/ltcube_561254401_561513601_4FGL_J1040.5+0617_daily_bin1242.fits
.....................!
real 192.03
user 186.01
sys 5.60

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/69198/ft1_filtered_4FGL_J1040.5+0617_daily_bin1242.fits scfile=/scratch/kocevski/69198/ft2_4FGL_J1040.5+0617_daily_bin1242.fits outfile=/scratch/kocevski/69198/cmap_561254401_561513601_4FGL_J1040.5+0617_daily_bin1242.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.53
user 0.36
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/69198/ft1_filtered_4FGL_J1040.5+0617_daily_bin1242.fits scfile=/scratch/kocevski/69198/ft2_4FGL_J1040.5+0617_daily_bin1242.fits outfile=/scratch/kocevski/69198/cmap_HighResolution_561254401_561513601_4FGL_J1040.5+0617_daily_bin1242.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.15

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/69198/ft1_filtered_4FGL_J1040.5+0617_daily_bin1242.fits', '/scratch/kocevski/69198/ft2_4FGL_J1040.5+0617_daily_bin1242.fits', expMap='/scratch/kocevski/69198/expmap_561254401_561513601_4FGL_J1040.5+0617_daily_bin1242.fits', expCube='/scratch/kocevski/69198/ltcube_561254401_561513601_4FGL_J1040.5+0617_daily_bin1242.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/69198/Model_4FGL_J1040.5+0617_daily_bin1242.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/69198/ft1_filtered_4FGL_J1040.5+0617_daily_bin1242.fits
Spacecraft file(s): /scratch/kocevski/69198/ft2_4FGL_J1040.5+0617_daily_bin1242.fits
Exposure map: /scratch/kocevski/69198/expmap_561254401_561513601_4FGL_J1040.5+0617_daily_bin1242.fits
Exposure cube: /scratch/kocevski/69198/ltcube_561254401_561513601_4FGL_J1040.5+0617_daily_bin1242.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/69198/Model_4FGL_J1040.5+0617_daily_bin1242.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 101
logL (Fixed Index) = 402.103960835

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 101
logL (Fixed Index) = 401.319761289

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .62006E-01   1.0000         .10000E-03   10000.    
     2 'Prefactor '    6.8396       1.0000         .10000E-03   10000.    
     3 'norm      '    .84653E-01   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .42728E-02   1.0000         .10000E-03   10000.    
     5 'Prefactor '    9.7328       1.0000         .10000E-03   10000.    
     6 'Prefactor '    4.1304       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .93407E-02   1.0000         .10000E-03   10000.    
     8 'norm      '    9.2941       1.0000         .10000E-03   10000.    
     9 'Prefactor '    7.2242       1.0000         .10000E-03   10000.    
    10 'Prefactor '    21.659       1.0000         .10000E-03   10000.    
    11 'Prefactor '    4.0911       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .48961E-01   1.0000         .10000E-03   10000.    
    13 'norm      '    1.2856       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .16496E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .35994E-01   1.0000         .10000E-03   10000.    
    16 'Prefactor '    1.5295       1.0000         .10000E-03   10000.    
    17 'norm      '    3.7926       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .32681       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .65662       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5360E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   401.2757     FROM MIGRAD    STATUS=CONVERGED    195 CALLS      475 TOTAL
                     EDM=   .11E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    41.325        .28112E-05** at limit **
   2  Prefactor     .10000E-03    618.21        .19586E-05** at limit **
   3  norm          .10000E-03    41.308       -.20005E-06** at limit **
   4  Prefactor     .10000E-03    22.204        .49081E-05** at limit **
   5  Prefactor     56.413        334.99        .19490E-05   -.28164E-06
   6  Prefactor     .10000E-03    148.36       -.46261E-05** at limit **
   7  Prefactor     .10000E-03    44.386        .23945E-05** at limit **
   8  norm          9.3533        6.1830        .34341E-06    .17444E-06
   9  Prefactor     7.9742        28.743       -.54618E-06    .29130E-06
  10  Prefactor     20.792        31.924        .54909E-06    .14837E-05
  11  Prefactor     4.0911        1.0077         .0000         .0000    
  12  Prefactor     .10000E-03    24.762        .31458E-06** at limit **
  13  norm          1.2838        1.3905        .93249E-07    .17745E-04
  14  Prefactor     .10000E-03    15.092        .11784E-06** at limit **
  15  norm          .10000E-03    135.27       -.25719E-05** at limit **
  16  Prefactor     .10000E-03    181.78       -.69295E-05** at limit **
  17  norm          3.7926        1.0090         .0000         .0000    
  18  Normalizat    .29045        .78208       -.18363E-04    .92334E-06
  19  Prefactor     .67555        .53758        .10229E-04    .25754E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 56.4132
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 9.35325
  Prefactor  = 7.97424
  Prefactor  = 20.7921
  Prefactor  = 4.09108
  Prefactor  = 0.0001
  norm       = 1.2838
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 3.79258
  Normalizat = 0.290452
  Prefactor  = 0.675551
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   401.2757     FROM HESSE     STATUS=FAILED        51 CALLS      526 TOTAL
                     EDM=   .11E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    39.263        .93285E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    617.83        .38354E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    39.969        .94378E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    21.810        .97056E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     56.413        271.77        .32112E-02   -1.4204    
   6  Prefactor     .10000E-03    139.86        .49585E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    43.468        .91003E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          9.3533        5.6202        .32865E-02   -1.5096    
   9  Prefactor     7.9742        21.263        .37309E-02   -1.5143    
  10  Prefactor     20.792        30.250        .21517E-02   -1.4796    
  11  Prefactor     541.13        536.98         .0000       -1.5303    
  12  Prefactor     .10000E-03    .21460        .31458E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.2838        1.1075        .93249E-07   -1.5481    
  14  Prefactor     .10000E-03    .20571        .11784E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    .21167       -.25719E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    .18613       -.69295E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          3.7926        1.0090         .0000       -1.5318    
  18  Normalizat    .29045        .59761       -.18363E-04   -1.2341    
  19  Prefactor     .67555        1.0193        .10229E-04   -1.0449    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 1.09424e-12
Minuit parameter uncertainties:
  1  4.6102e-05
  2  7.64128e-05
  3  1.88888e-05
  4  1.6404e-05
  5  249.496
  6  0.000194077
  7  4.97958e-05
  8  5.62051
  9  21.2834
  10  30.2718
  11  1.00767
  12  4.37922e-07
  13  1.1075
  14  1.33555e-07
  15  3.49846e-06
  16  6.79624e-06
  17  1.00896
  18  0.611509
  19  1.04962
Done.

MINUIT Return Code (Fixed Index): 101
logL (Fixed Index) = 401.275658323

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.079e+01  3.027e+01  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:  6.756e-01  1.050e+00  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:  2.905e-01  6.115e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.67
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.35e-06 ph cm-2 s-1
Energy Flux Upper Limit: 1.04e-01 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/69198/likelihoodResults_561254401_561513601_4FGL_J1040.5+0617_daily_bin1242.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) = 401.125476675
delta logL = 0.150181647926

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 401.092756499
delta logL = 0.182901823423

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    29.936       1.0000         .10000E-03   10000.    
     2 'Index     '    1.7971       1.0000          .0000       10.000    
     3 'Normalizat'    .33427       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .63732       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=   401.0928     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      203 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     29.943        38.384        .11320E-04   -.18334E-03
   2  Index         1.7982        .74447       -.93176E-05   -.22795E-03
   3  Normalizat    .33403        .62201        .21706E-05   -.18769E-04
   4  Prefactor     .63798        .46768       -.29870E-05   -.43629E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 29.9425
  Index      = 1.79824
  Normalizat = 0.334027
  Prefactor  = 0.637979
 **********
 **   18 **HESSE 
 **********

 FCN=   401.0928     FROM HESSE     STATUS=OK            31 CALLS      234 TOTAL
                     EDM=   .26E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     29.943        38.669        .73227E-04   -1.4613    
   2  Index         1.7982        .81275        .40652E-02   -.69496    
   3  Normalizat    .33403        .67928        .35856E-03   -1.2086    
   4  Prefactor     .63798        .51399        .19053E-03   -1.0601    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.56238e-09
Minuit parameter uncertainties:
  1  38.701
  2  0.818942
  3  0.697174
  4  0.517855
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/69198': 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) = 401.092753117
delta logL = 0.182905205886

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.994e+01  3.870e+01  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.798e+00  8.189e-01  0.000e+00  1.000e+01 (-1.000e+00)
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  6.380e-01  5.179e-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:  3.340e-01  6.972e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.04
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.80 +/- 0.82
Photon Flux (Free Index): 1.81e-07 +/- 2.72e-07
Energy Flux (Free Index): 2.17e-04 +/- 4.62e-04

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/69198/cmap_HighResolution_561254401_561513601_4FGL_J1040.5+0617_daily_bin1242.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.04e-01', comment='SUCCESS', energy_flux2='2.17e-04', dlogl='1.83e-01', photon_flux2='1.81e-07', job_status='DONE', time_completed='2021-09-02 08:46:38.824996', photon_index_error2='0.82', photon_index2='1.80', ts='0.67', fit_tolerance='1e-08', GAL='0.68', photon_index_error='0.00', photon_flux_upper_limit='1.35e-06', energy_flux_error2='4.62e-04', EG='0.29', time_epoch_completed='1630597598.83', return_code='101', job_id='69198', GAL2='0.64', EG2='0.33', return_code2='0', photon_flux_error2='2.72e-07', ts2='1.04', photon_index='2.37' WHERE bin_id='1242' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:46:38 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0231>
Subject: Job 69198: <4FGL_J1040.5+0617_daily_bin1242> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1242> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Thu Sep  2 08:36:35 2021
Job was executed on host(s) <bullet0231>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:36: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:36:45 2021
Terminated at Thu Sep  2 08:46:39 2021
Results reported at Thu Sep  2 08:46:39 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1242 160.15 6.2848 561254401 561513601 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 :                                   328.03 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             331.28 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   594 sec.
    Turnaround time :                            604 sec.

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

