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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin698
RA = 160.15, Dec = 6.2848
tmin = 420249601, tmax = 420508801
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='65641', job_status='RUN', time_executed='2021-09-02 08:27:39.772366', time_epoch_executed='1630596459.77' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='698'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65641

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65641/ft1_4FGL_J1040.5+0617_daily_bin698.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65641/ft2_4FGL_J1040.5+0617_daily_bin698.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65641/ft1_4FGL_J1040.5+0617_daily_bin698.fits outfile=/scratch/kocevski/65641/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin698.fits ra=160.15 dec=6.2848 rad=12.0 tmin=420249601.0 tmax=420508801.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.41
user 3.16
sys 0.20

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65641/ft1_filtered_4FGL_J1040.5+0617_daily_bin698.fits evtable="EVENTS" scfile=/scratch/kocevski/65641/ft2_4FGL_J1040.5+0617_daily_bin698.fits sctable="SC_DATA" expcube=/scratch/kocevski/65641/ltcube_420249601_420508801_4FGL_J1040.5+0617_daily_bin698.fits outfile=/scratch/kocevski/65641/expmap_420249601_420508801_4FGL_J1040.5+0617_daily_bin698.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/65641/ltcube_420249601_420508801_4FGL_J1040.5+0617_daily_bin698.fits
.....................!
real 192.15
user 185.96
sys 5.43

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/65641/ft1_filtered_4FGL_J1040.5+0617_daily_bin698.fits scfile=/scratch/kocevski/65641/ft2_4FGL_J1040.5+0617_daily_bin698.fits outfile=/scratch/kocevski/65641/cmap_420249601_420508801_4FGL_J1040.5+0617_daily_bin698.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.38
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65641/ft1_filtered_4FGL_J1040.5+0617_daily_bin698.fits scfile=/scratch/kocevski/65641/ft2_4FGL_J1040.5+0617_daily_bin698.fits outfile=/scratch/kocevski/65641/cmap_HighResolution_420249601_420508801_4FGL_J1040.5+0617_daily_bin698.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=160.15 yref=6.2848 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.57
user 0.37
sys 0.18

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    18.758       1.0000         .10000E-03   10000.    
     2 'Prefactor '    17.776       1.0000         .10000E-03   10000.    
     3 'norm      '    .10118E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .27735E-02   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    72.278       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10168E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    3.4777       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    12.027       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10053E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .16133       1.0000         .10000E-03   10000.    
    13 'norm      '    .55421       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    2.9298       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    7.7735       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .84827       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0626       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=   5149.409     FROM MIGRAD    STATUS=CONVERGED    401 CALLS     1884 TOTAL
                     EDM=   .74E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  8.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     18.762        14.480       -.88148E-06    .23750E-04
   2  Prefactor     17.724        45.794        .14402E-05   -.56917E-04
   3  norm          .10000E-03    14.593        .84624E-07** at limit **
   4  Prefactor     .10005E-03    39.268       -.10824E-04** at limit **
   5  Prefactor     .10000E-03    19.923        .20442E-06** at limit **
   6  Prefactor     72.268        48.357       -.49743E-05   -.13919E-03
   7  Prefactor     .10000E-03    9.0319        .45952E-06** at limit **
   8  norm          3.4782        1.6190       -.44272E-07   -.71608E-03
   9  Prefactor     .10000E-03    6.7744        .35802E-06** at limit **
  10  Prefactor     12.023        4.3433        .14545E-06   -.97477E-03
  11  Prefactor     .10000E-03    5.5267       -.21162E-06** at limit **
  12  Prefactor     .23517        26.035       -.10344E-04   -.14959E-03
  13  norm          .55392        .48638        .28173E-07   -.25396E-03
  14  Prefactor     .10000E-03    4.1784       -.96445E-07** at limit **
  15  norm          2.9301        1.4744        .17091E-07    .66435E-04
  16  Prefactor     .10000E-03    20.979       -.30545E-06** at limit **
  17  norm          7.7749        11.848       -.53887E-07    .76802E-04
  18  Normalizat    .84823        .20609       -.46385E-06   -.41081E-03
  19  Prefactor     1.0625        .17847        .39463E-06   -.44750E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 18.7624
  Prefactor  = 17.7243
  norm       = 0.000100002
  Prefactor  = 0.000100052
  Prefactor  = 0.0001
  Prefactor  = 72.2676
  Prefactor  = 0.0001
  norm       = 3.47818
  Prefactor  = 0.000100002
  Prefactor  = 12.0227
  Prefactor  = 0.0001
  Prefactor  = 0.235169
  norm       = 0.553922
  Prefactor  = 0.0001
  norm       = 2.93007
  Prefactor  = 0.0001
  norm       = 7.77488
  Normalizat = 0.848233
  Prefactor  = 1.06246
 **********
 **   18 **HESSE 
 **********

 FCN=   5149.409     FROM HESSE     STATUS=OK           266 CALLS     2150 TOTAL
                     EDM=   .19E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     18.762        14.445        .92476E-04   -1.4841    
   2  Prefactor     17.724        45.884        .94994E-04   -1.4866    
   3  norm          .10000E-03    14.712        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10005E-03    64.980        .36037E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    19.942        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     72.268        48.752        .47222E-04   -1.4006    
   7  Prefactor     .10000E-03    9.0598        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          3.4782        1.6186        .60012E-04   -1.5335    
   9  Prefactor     .10000E-03    6.8146        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     12.023        4.3214        .84592E-04   -1.5014    
  11  Prefactor     .10000E-03    5.6057        .16438E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .23517        48.151        .35717E-02   -1.5611    
  13  norm          .55392        .46932        .44660E-03   -1.5559    
  14  Prefactor     .10000E-03    4.1879        .14311E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          2.9301        1.4713        .58991E-04   -1.5366    
  16  Prefactor     .10000E-03    21.166        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          7.7749        11.852        .14382E-03   -1.5150    
  18  Normalizat    .84823        .23446        .27775E-03   -.98304    
  19  Prefactor     1.0625        .20462        .22422E-03   -.90675    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.87757e-09
Minuit parameter uncertainties:
  1  14.4473
  2  45.975
  3  0.000316252
  4  0.00367526
  5  5.04761e-05
  6  48.7794
  7  1.70025e-06
  8  1.61857
  9  0.000244736
  10  4.32151
  11  9.45483e-05
  12  6.73415
  13  0.46932
  14  1.61088e-05
  15  1.47131
  16  0.000194498
  17  11.8551
  18  0.234745
  19  0.204773
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.202e+01  4.322e+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.062e+00  2.048e-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:  8.482e-01  2.347e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 23.91
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.45e-07 +/- 5.22e-08
Energy Flux (Fixed Index): 4.97e-05 +/- 1.79e-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) = 5146.43537341
delta logL = 2.9737529955

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5146.19791314
delta logL = 3.21121326003

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    16.414       1.0000         .10000E-03   10000.    
     2 'Index     '    1.6973       1.0000          .0000       10.000    
     3 'Normalizat'    .91183       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0261       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=   5146.198     FROM MIGRAD    STATUS=CONVERGED     43 CALLS      203 TOTAL
                     EDM=   .94E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     16.414        6.2696        .24715E-02   -.62650E-02
   2  Index         1.6973        .23102        .99232E-01   -.46072E-04
   3  Normalizat    .91185        .19712        .45053E-01    .45605E-05
   4  Prefactor     1.0261        .17623        .41578E-01    .14346E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 16.4135
  Index      = 1.69727
  Normalizat = 0.911854
  Prefactor  = 1.02612
 **********
 **   18 **HESSE 
 **********

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

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     16.414        6.3464        .98860E-04   -1.4897    
   2  Index         1.6973        .24261        .42282E-02   -.72155    
   3  Normalizat    .91185        .22712        .26903E-03   -.96045    
   4  Prefactor     1.0261        .20308        .22763E-03   -.91864    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.75314e-09
Minuit parameter uncertainties:
  1  6.34669
  2  0.24278
  3  0.227359
  4  0.203234
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65641': 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) = 5146.19791309
delta logL = 3.21121331013

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.641e+01  6.347e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.697e+00  2.428e-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.026e+00  2.032e-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.119e-01  2.274e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 30.26
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.70 +/- 0.24
Photon Flux (Free Index): 9.08e-08 +/- 4.22e-08
Energy Flux (Free Index): 1.50e-04 +/- 9.43e-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/65641/cmap_HighResolution_420249601_420508801_4FGL_J1040.5+0617_daily_bin698.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.45e-07', energy_flux2='1.50e-04', photon_flux_error='5.22e-08', dlogl='3.21e+00', energy_flux='4.97e-05', photon_flux2='9.08e-08', job_status='DONE', time_completed='2021-09-02 08:36:01.965618', photon_index_error2='0.24', photon_index2='1.70', ts='23.91', fit_tolerance='1e-08', GAL='1.06', photon_index_error='0.00', energy_flux_error2='9.43e-05', EG='0.85', time_epoch_completed='1630596961.97', return_code='0', job_id='65641', GAL2='1.03', EG2='0.91', return_code2='0', energy_flux_error='1.79e-05', photon_flux_error2='4.22e-08', ts2='30.26', photon_index='2.37' WHERE bin_id='698' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:36:01 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0014>
Subject: Job 65641: <4FGL_J1040.5+0617_daily_bin698> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin698 160.15 6.2848 420249601 420508801 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 :                                   500.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             218.83 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   730 sec.
    Turnaround time :                            887 sec.

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

