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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin518
RA = 160.15, Dec = 6.2848
tmin = 373593601, tmax = 373852801
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='64439', job_status='RUN', time_executed='2021-09-02 08:21:37.393120', time_epoch_executed='1630596097.39' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='518'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64439

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64439/ft1_4FGL_J1040.5+0617_daily_bin518.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64439/ft2_4FGL_J1040.5+0617_daily_bin518.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64439/ft1_4FGL_J1040.5+0617_daily_bin518.fits outfile=/scratch/kocevski/64439/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin518.fits ra=160.15 dec=6.2848 rad=12.0 tmin=373593601.0 tmax=373852801.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.50
user 3.29
sys 0.18

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/64439/ft1_filtered_4FGL_J1040.5+0617_daily_bin518.fits" evtable="EVENTS" scfile=/scratch/kocevski/64439/ft2_4FGL_J1040.5+0617_daily_bin518.fits sctable="SC_DATA" outfile=/scratch/kocevski/64439/ltcube_373593601_373852801_4FGL_J1040.5+0617_daily_bin518.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/64439/ft2_4FGL_J1040.5+0617_daily_bin518.fits
.....................!
real 12.31
user 11.95
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64439/ft1_filtered_4FGL_J1040.5+0617_daily_bin518.fits evtable="EVENTS" scfile=/scratch/kocevski/64439/ft2_4FGL_J1040.5+0617_daily_bin518.fits sctable="SC_DATA" expcube=/scratch/kocevski/64439/ltcube_373593601_373852801_4FGL_J1040.5+0617_daily_bin518.fits outfile=/scratch/kocevski/64439/expmap_373593601_373852801_4FGL_J1040.5+0617_daily_bin518.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/64439/ltcube_373593601_373852801_4FGL_J1040.5+0617_daily_bin518.fits
.....................!
real 190.32
user 185.14
sys 4.80

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/64439/ft1_filtered_4FGL_J1040.5+0617_daily_bin518.fits scfile=/scratch/kocevski/64439/ft2_4FGL_J1040.5+0617_daily_bin518.fits outfile=/scratch/kocevski/64439/cmap_373593601_373852801_4FGL_J1040.5+0617_daily_bin518.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.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/64439/ft1_filtered_4FGL_J1040.5+0617_daily_bin518.fits scfile=/scratch/kocevski/64439/ft2_4FGL_J1040.5+0617_daily_bin518.fits outfile=/scratch/kocevski/64439/cmap_HighResolution_373593601_373852801_4FGL_J1040.5+0617_daily_bin518.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.37
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.4334       1.0000         .10000E-03   10000.    
     2 'Prefactor '    26.189       1.0000         .10000E-03   10000.    
     3 'norm      '    2.9345       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    14.914       1.0000         .10000E-03   10000.    
     6 'Prefactor '    13.500       1.0000         .10000E-03   10000.    
     7 'Prefactor '    18.992       1.0000         .10000E-03   10000.    
     8 'norm      '    .59708       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.6184       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10344E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    2.7863       1.0000         .10000E-03   10000.    
    13 'norm      '    2.4165       1.0000         .10000E-03   10000.    
    14 'Prefactor '    18.910       1.0000         .10000E-03   10000.    
    15 'norm      '    .10314E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    14.707       1.0000         .10000E-03   10000.    
    17 'norm      '    .10020E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .90292       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1720       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=   5933.013     FROM MIGRAD    STATUS=CONVERGED    380 CALLS     1914 TOTAL
                     EDM=   .71E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.4335        6.1204        .40533E-06   -.52680E-04
   2  Prefactor     26.173        41.812       -.18388E-06   -.28026E-04
   3  norm          2.9347        14.898        .31645E-05   -.65964E-04
   4  Prefactor     .10000E-03    8.3542        .54270E-05** at limit **
   5  Prefactor     14.866        45.543        .15693E-05   -.54166E-04
   6  Prefactor     13.682        214.46       -.16601E-04   -.58078E-04
   7  Prefactor     18.939        35.002        .26378E-05   -.18036E-03
   8  norm          .59667        1.4270        .58090E-06   -.55802E-05
   9  Prefactor     .10000E-03    2.7867       -.61521E-07** at limit **
  10  Prefactor     3.6188        2.3993       -.20505E-07   -.49708E-04
  11  Prefactor     .10000E-03    4.1536       -.22239E-06** at limit **
  12  Prefactor     2.7866        7.8105        .87678E-06   -.17580E-04
  13  norm          2.4163        .95486       -.18849E-07   -.81032E-04
  14  Prefactor     18.913        15.845        .62982E-07   -.21331E-04
  15  norm          .10000E-03    .87105        .83012E-07** at limit **
  16  Prefactor     14.702        19.491        .25351E-07   -.17377E-04
  17  norm          .10000E-03    13.511        .15511E-06** at limit **
  18  Normalizat    .90267        .19932       -.48272E-06   -.97940E-04
  19  Prefactor     1.1722        .17194       -.20460E-06   -.11736E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.43347
  Prefactor  = 26.1727
  norm       = 2.93469
  Prefactor  = 0.0001
  Prefactor  = 14.8661
  Prefactor  = 13.6824
  Prefactor  = 18.9393
  norm       = 0.596667
  Prefactor  = 0.0001
  Prefactor  = 3.61875
  Prefactor  = 0.000100001
  Prefactor  = 2.78664
  norm       = 2.41631
  Prefactor  = 18.9126
  norm       = 0.0001
  Prefactor  = 14.7022
  norm       = 0.0001
  Normalizat = 0.902672
  Prefactor  = 1.17218
 **********
 **   18 **HESSE 
 **********

 FCN=   5933.013     FROM HESSE     STATUS=OK           276 CALLS     2190 TOTAL
                     EDM=   .19E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.4335        6.0683        .26232E-03   -1.5396    
   2  Prefactor     26.173        41.748        .78279E-04   -1.4684    
   3  norm          2.9347        14.442        .23712E-03   -1.5365    
   4  Prefactor     .10000E-03    8.3808        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     14.866        45.371        .10371E-03   -1.4937    
   6  Prefactor     13.682        214.18        .10902E-03   -1.4968    
   7  Prefactor     18.939        34.861        .91905E-04   -1.4837    
   8  norm          .59667        1.4096        .13383E-03   -1.5553    
   9  Prefactor     .10000E-03    2.8024        .12554E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     3.6188        2.4002        .93246E-04   -1.5327    
  11  Prefactor     .10000E-03    9.9813        .29924E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     2.7866        7.7513        .24377E-03   -1.5374    
  13  norm          2.4163        .97482        .37172E-04   -1.5397    
  14  Prefactor     18.913        16.156        .92105E-04   -1.4838    
  15  norm          .10000E-03    1.5774        .13740E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     14.702        19.475        .10444E-03   -1.4941    
  17  norm          .10000E-03    13.687        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .90267        .22800        .28236E-03   -.96366    
  19  Prefactor     1.1722        .20121        .22546E-03   -.87192    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.94183e-10
Minuit parameter uncertainties:
  1  6.06986
  2  41.7946
  3  13.025
  4  2.97495e-07
  5  45.4765
  6  108.735
  7  34.8983
  8  1.40968
  9  6.33246e-07
  10  2.40024
  11  0.000201578
  12  7.75408
  13  0.974823
  14  16.1601
  15  5.36958e-06
  16  19.4831
  17  1.05037e-05
  18  0.228242
  19  0.201346
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.619e+00  2.400e+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.172e+00  2.013e-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.027e-01  2.282e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 10.09
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 4.37e-08 +/- 2.90e-08
Energy Flux (Fixed Index): 1.50e-05 +/- 9.93e-06

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) = 5931.23504035
delta logL = 1.77827055523

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5931.05151342
delta logL = 1.96179749332

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.0174       1.0000         .10000E-03   10000.    
     2 'Index     '    1.2150       1.0000          .0000       10.000    
     3 'Normalizat'    .94841       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1492       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=   5931.052     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      212 TOTAL
                     EDM=   .79E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.0183        1.6195        .72850E-02   -.17772E-03
   2  Index         1.2153        .33856        .17383       -.76121E-04
   3  Normalizat    .94856        .18682        .45517E-01   -.28598E-05
   4  Prefactor     1.1490        .16829        .51438E-01    .11404E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.01832
  Index      = 1.21532
  Normalizat = 0.948559
  Prefactor  = 1.14903
 **********
 **   18 **HESSE 
 **********

 FCN=   5931.052     FROM HESSE     STATUS=OK            33 CALLS      245 TOTAL
                     EDM=   .93E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.0183        2.1079        .79487E-04   -1.5424    
   2  Index         1.2153        .46565        .72368E-02   -.85861    
   3  Normalizat    .94856        .21838        .27620E-03   -.94774    
   4  Prefactor     1.1490        .19676        .22741E-03   -.87914    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.31177e-12
Minuit parameter uncertainties:
  1  2.10796
  2  0.467244
  3  0.218583
  4  0.196882
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64439': 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) = 5931.05151294
delta logL = 1.96179796557

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.018e+00  2.108e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.215e+00  4.672e-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.149e+00  1.969e-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.486e-01  2.186e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 13.98
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.22 +/- 0.47
Photon Flux (Free Index): 9.98e-09 +/- 9.03e-09
Energy Flux (Free Index): 7.96e-05 +/- 9.37e-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/64439/cmap_HighResolution_373593601_373852801_4FGL_J1040.5+0617_daily_bin518.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='4.37e-08', energy_flux2='7.96e-05', photon_flux_error='2.90e-08', dlogl='1.96e+00', energy_flux='1.50e-05', photon_flux2='9.98e-09', job_status='DONE', time_completed='2021-09-02 08:30:26.112016', photon_index_error2='0.47', photon_index2='1.22', ts='10.09', fit_tolerance='1e-08', GAL='1.17', photon_index_error='0.00', energy_flux_error2='9.37e-05', EG='0.90', time_epoch_completed='1630596626.11', return_code='0', job_id='64439', GAL2='1.15', EG2='0.95', return_code2='0', energy_flux_error='9.93e-06', photon_flux_error2='9.03e-09', ts2='13.98', photon_index='2.37' WHERE bin_id='518' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:30:26 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0199>
Subject: Job 64439: <4FGL_J1040.5+0617_daily_bin518> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin518> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Sep  2 08:16:33 2021
Job was executed on host(s) <bullet0199>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:19:00 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:19:00 2021
Terminated at Thu Sep  2 08:30:26 2021
Results reported at Thu Sep  2 08:30:26 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin518 160.15 6.2848 373593601 373852801 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 :                                   527.21 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             271.21 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   686 sec.
    Turnaround time :                            833 sec.

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

