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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin551
RA = 160.15, Dec = 6.2848
tmin = 382147201, tmax = 382406401
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='65433', job_status='RUN', time_executed='2021-09-02 08:23:47.014784', time_epoch_executed='1630596227.01' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='551'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65433

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65433/ft1_4FGL_J1040.5+0617_daily_bin551.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65433/ft2_4FGL_J1040.5+0617_daily_bin551.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65433/ft1_4FGL_J1040.5+0617_daily_bin551.fits outfile=/scratch/kocevski/65433/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin551.fits ra=160.15 dec=6.2848 rad=12.0 tmin=382147201.0 tmax=382406401.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.83
user 2.62
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65433/ft1_filtered_4FGL_J1040.5+0617_daily_bin551.fits" evtable="EVENTS" scfile=/scratch/kocevski/65433/ft2_4FGL_J1040.5+0617_daily_bin551.fits sctable="SC_DATA" outfile=/scratch/kocevski/65433/ltcube_382147201_382406401_4FGL_J1040.5+0617_daily_bin551.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/65433/ft2_4FGL_J1040.5+0617_daily_bin551.fits
.....................!
real 10.87
user 10.54
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65433/ft1_filtered_4FGL_J1040.5+0617_daily_bin551.fits evtable="EVENTS" scfile=/scratch/kocevski/65433/ft2_4FGL_J1040.5+0617_daily_bin551.fits sctable="SC_DATA" expcube=/scratch/kocevski/65433/ltcube_382147201_382406401_4FGL_J1040.5+0617_daily_bin551.fits outfile=/scratch/kocevski/65433/expmap_382147201_382406401_4FGL_J1040.5+0617_daily_bin551.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/65433/ltcube_382147201_382406401_4FGL_J1040.5+0617_daily_bin551.fits
.....................!
real 155.50
user 151.65
sys 3.54

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/65433/ft1_filtered_4FGL_J1040.5+0617_daily_bin551.fits scfile=/scratch/kocevski/65433/ft2_4FGL_J1040.5+0617_daily_bin551.fits outfile=/scratch/kocevski/65433/cmap_382147201_382406401_4FGL_J1040.5+0617_daily_bin551.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.47
user 0.32
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65433/ft1_filtered_4FGL_J1040.5+0617_daily_bin551.fits scfile=/scratch/kocevski/65433/ft2_4FGL_J1040.5+0617_daily_bin551.fits outfile=/scratch/kocevski/65433/cmap_HighResolution_382147201_382406401_4FGL_J1040.5+0617_daily_bin551.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.48
user 0.32
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .79785E-02   1.0000         .10000E-03   10000.    
     2 'Prefactor '    38.193       1.0000         .10000E-03   10000.    
     3 'norm      '    31.372       1.0000         .10000E-03   10000.    
     4 'Prefactor '    3.6599       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10092E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    11.441       1.0000         .10000E-03   10000.    
     8 'norm      '    .10055E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .63089       1.0000         .10000E-03   10000.    
    10 'Prefactor '    8.5798       1.0000         .10000E-03   10000.    
    11 'Prefactor '    7.2834       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    1.1888       1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    43.612       1.0000         .10000E-03   10000.    
    17 'norm      '    .14943E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .98474       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1286       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=   5751.675     FROM MIGRAD    STATUS=CONVERGED    412 CALLS     1952 TOTAL
                     EDM=   .35E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    16.021        .15270E-05** at limit **
   2  Prefactor     38.165        41.937       -.22948E-04   -.92822E-04
   3  norm          31.396        22.567       -.17022E-05   -.27043E-03
   4  Prefactor     3.6603        10.037        .32880E-06   -.10914E-03
   5  Prefactor     .10000E-03    28.615        .24156E-05** at limit **
   6  Prefactor     .10000E-03    24.165       -.32243E-05** at limit **
   7  Prefactor     11.441        12.196        .37822E-07   -.60484E-04
   8  norm          .10000E-03    .78429        .23484E-06** at limit **
   9  Prefactor     .59495        5.0861        .18476E-05   -.17990E-03
  10  Prefactor     8.5792        3.9078       -.14769E-07   -.76196E-04
  11  Prefactor     7.2794        8.8022        .38873E-05    .17691E-05
  12  Prefactor     .10000E-03    6.6172       -.59255E-07** at limit **
  13  norm          .10000E-03    .23371       -.20456E-06** at limit **
  14  Prefactor     1.1997        1.3688        .16858E-06   -.12694E-02
  15  norm          .10000E-03    .39981       -.34997E-07** at limit **
  16  Prefactor     43.605        25.702       -.13255E-05    .48297E-05
  17  norm          .10000E-03    15.805        .75887E-06** at limit **
  18  Normalizat    .98494        .21740       -.31593E-06   -.29438E-03
  19  Prefactor     1.1286        .17667        .75842E-06   -.35848E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100003
  Prefactor  = 38.1648
  norm       = 31.3956
  Prefactor  = 3.66031
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 11.4414
  norm       = 0.0001
  Prefactor  = 0.594953
  Prefactor  = 8.57917
  Prefactor  = 7.27943
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 1.19974
  norm       = 0.0001
  Prefactor  = 43.6053
  norm       = 0.0001
  Normalizat = 0.984937
  Prefactor  = 1.12857
 **********
 **   18 **HESSE 
 **********

 FCN=   5751.675     FROM HESSE     STATUS=OK           272 CALLS     2224 TOTAL
                     EDM=   .52E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    110.53        .52615E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     38.165        41.983        .64854E-04   -1.4472    
   3  norm          31.396        20.983        .71537E-04   -1.4587    
   4  Prefactor     3.6603        9.9163        .21114E-03   -1.5325    
   5  Prefactor     .10000E-03    28.631        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    24.164        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     11.441        12.177        .11844E-03   -1.5031    
   8  norm          .10000E-03    1.6407        .12912E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .59495        30.824        .31113E-02   -1.5554    
  10  Prefactor     8.5792        3.9117        .96640E-04   -1.5122    
  11  Prefactor     7.2794        8.8472        .14862E-03   -1.5168    
  12  Prefactor     .10000E-03    6.6941        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .32096        .70823E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     1.1997        8.1161        .20649E-02   -1.5489    
  15  norm          .10000E-03    .40364        .46795E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     43.605        25.700        .60706E-04   -1.4386    
  17  norm          .10000E-03    16.555        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .98494        .24910        .28199E-03   -.93537    
  19  Prefactor     1.1286        .20284        .22855E-03   -.88559    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.20416e-09
Minuit parameter uncertainties:
  1  0.00105631
  2  42.0158
  3  20.9878
  4  9.92075
  5  1.61754e-05
  6  9.08702e-06
  7  12.1795
  8  2.37583e-05
  9  8.56872
  10  3.91184
  11  8.84876
  12  2.62362e-06
  13  3.53119e-06
  14  6.24187
  15  2.32275e-06
  16  25.7068
  17  3.84534e-05
  18  0.24939
  19  0.202981
Done.

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

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  1.129e+00  2.030e-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.849e-01  2.494e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 12.80
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.04e-07 +/- 4.72e-08
Energy Flux (Fixed Index): 3.55e-05 +/- 1.62e-05

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) = 5751.67407591
delta logL = 0.000942558333008

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5751.67369411
delta logL = 0.00132436574677

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    8.6951       1.0000         .10000E-03   10000.    
     2 'Index     '    2.3475       1.0000          .0000       10.000    
     3 'Normalizat'    .98666       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1276       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=   5751.674     FROM MIGRAD    STATUS=CONVERGED     46 CALLS      191 TOTAL
                     EDM=   .22E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.6951        80.145        .33984E-02    .15361E-03
   2  Index         2.3475        3.5133        .13260        .76439E-04
   3  Normalizat    .98666        .15077        .46000E-01    .13532E-04
   4  Prefactor     1.1277        .10133        .36620E-01    .40934E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.69511
  Index      = 2.34751
  Normalizat = 0.986662
  Prefactor  = 1.12766
 **********
 **   18 **HESSE 
 **********

 FCN=   5751.674     FROM HESSE     STATUS=OK            33 CALLS      224 TOTAL
                     EDM=   .81E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.6951        4.6250        .97633E-04   -1.5118    
   2  Index         2.3475        .40303        .52745E-02   -.55919    
   3  Normalizat    .98666        .23751        .28178E-03   -.93479    
   4  Prefactor     1.1277        .20283        .22863E-03   -.88587    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.07492e-10
Minuit parameter uncertainties:
  1  4.62516
  2  0.403639
  3  0.237763
  4  0.202972
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65433': 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) = 5751.67369408
delta logL = 0.00132439114168

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  8.695e+00  4.625e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.348e+00  4.036e-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:  1.128e+00  2.030e-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.867e-01  2.378e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 12.78
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.35 +/- 0.40
Photon Flux (Free Index): 1.02e-07 +/- 5.56e-08
Energy Flux (Free Index): 3.60e-05 +/- 1.94e-05

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/65433/cmap_HighResolution_382147201_382406401_4FGL_J1040.5+0617_daily_bin551.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.04e-07', energy_flux2='3.60e-05', photon_flux_error='4.72e-08', dlogl='1.32e-03', energy_flux='3.55e-05', photon_flux2='1.02e-07', job_status='DONE', time_completed='2021-09-02 08:30:51.580342', photon_index_error2='0.40', photon_index2='2.35', ts='12.80', fit_tolerance='1e-08', GAL='1.13', photon_index_error='0.00', energy_flux_error2='1.94e-05', EG='0.98', time_epoch_completed='1630596651.58', return_code='0', job_id='65433', GAL2='1.13', EG2='0.99', return_code2='0', energy_flux_error='1.62e-05', photon_flux_error2='5.56e-08', ts2='12.78', photon_index='2.37' WHERE bin_id='551' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:30:51 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0071>
Subject: Job 65433: <4FGL_J1040.5+0617_daily_bin551> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin551> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:21:00 2021
Job was executed on host(s) <bullet0071>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:21:17 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:21:17 2021
Terminated at Thu Sep  2 08:30:52 2021
Results reported at Thu Sep  2 08:30:52 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin551 160.15 6.2848 382147201 382406401 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 :                                   421.42 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             285.75 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   574 sec.
    Turnaround time :                            592 sec.

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

