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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin709
RA = 160.15, Dec = 6.2848
tmin = 423100801, tmax = 423360001
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='65655', job_status='RUN', time_executed='2021-09-02 08:27:12.923779', time_epoch_executed='1630596432.92' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='709'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65655

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65655/ft1_4FGL_J1040.5+0617_daily_bin709.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65655/ft2_4FGL_J1040.5+0617_daily_bin709.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65655/ft1_4FGL_J1040.5+0617_daily_bin709.fits outfile=/scratch/kocevski/65655/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin709.fits ra=160.15 dec=6.2848 rad=12.0 tmin=423100801.0 tmax=423360001.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 5.11
user 4.77
sys 0.25

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/65655/ft2_4FGL_J1040.5+0617_daily_bin709.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/65655/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin709.fits evtable="EVENTS" outfile="/scratch/kocevski/65655/ft1_filtered_4FGL_J1040.5+0617_daily_bin709.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/65655/ft1_filtered_4FGL_J1040.5+0617_daily_bin709.fits" evtable="EVENTS" scfile=/scratch/kocevski/65655/ft2_4FGL_J1040.5+0617_daily_bin709.fits sctable="SC_DATA" outfile=/scratch/kocevski/65655/ltcube_423100801_423360001_4FGL_J1040.5+0617_daily_bin709.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/65655/ft2_4FGL_J1040.5+0617_daily_bin709.fits
.....................!
real 12.79
user 12.46
sys 0.28

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65655/ft1_filtered_4FGL_J1040.5+0617_daily_bin709.fits evtable="EVENTS" scfile=/scratch/kocevski/65655/ft2_4FGL_J1040.5+0617_daily_bin709.fits sctable="SC_DATA" expcube=/scratch/kocevski/65655/ltcube_423100801_423360001_4FGL_J1040.5+0617_daily_bin709.fits outfile=/scratch/kocevski/65655/expmap_423100801_423360001_4FGL_J1040.5+0617_daily_bin709.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/65655/ltcube_423100801_423360001_4FGL_J1040.5+0617_daily_bin709.fits
.....................!
real 190.50
user 185.96
sys 3.96

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/65655/ft1_filtered_4FGL_J1040.5+0617_daily_bin709.fits scfile=/scratch/kocevski/65655/ft2_4FGL_J1040.5+0617_daily_bin709.fits outfile=/scratch/kocevski/65655/cmap_423100801_423360001_4FGL_J1040.5+0617_daily_bin709.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.59
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65655/ft1_filtered_4FGL_J1040.5+0617_daily_bin709.fits scfile=/scratch/kocevski/65655/ft2_4FGL_J1040.5+0617_daily_bin709.fits outfile=/scratch/kocevski/65655/cmap_HighResolution_423100801_423360001_4FGL_J1040.5+0617_daily_bin709.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.56
user 0.39
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    11.394       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .18725E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10421E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10131E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .71639E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10443E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10065E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.4704       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    5.0818       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .32385E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.6390       1.0000         .10000E-03   10000.    
    13 'norm      '    .52281       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10008E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10101E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    11.137       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.5406       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .74311       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=   6091.831     FROM MIGRAD    STATUS=CONVERGED    391 CALLS     1628 TOTAL
                     EDM=   .66E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     11.391        12.606        .21959E-06    .10426E-03
   2  Prefactor     .10000E-03    72.606       -.62487E-05** at limit **
   3  norm          .10000E-03    9.9258        .25699E-05** at limit **
   4  Prefactor     .10000E-03    15.854       -.11860E-04** at limit **
   5  Prefactor     .10000E-03    100.45       -.63595E-05** at limit **
   6  Prefactor     .10000E-03    47.298        .65409E-05** at limit **
   7  Prefactor     .10000E-03    10.869       -.46334E-05** at limit **
   8  norm          2.4704        1.8221       -.71309E-07   -.22033E-03
   9  Prefactor     .10000E-03    4.6344        .11625E-07** at limit **
  10  Prefactor     5.0735        4.4986        .12518E-06   -.24465E-03
  11  Prefactor     .10001E-03    5.7154        .68857E-06** at limit **
  12  Prefactor     1.6693        12.195       -.29228E-05   -.45883E-03
  13  norm          .52223        .56811       -.19808E-07   -.85559E-03
  14  Prefactor     .10000E-03    6.6755        .50455E-07** at limit **
  15  norm          .10000E-03    .51878       -.52224E-08** at limit **
  16  Prefactor     .10000E-03    14.881        .13120E-04** at limit **
  17  norm          11.130        14.623       -.28755E-06   -.45453E-04
  18  Normalizat    1.5409        .20796        .47067E-06    .81871E-04
  19  Prefactor     .74298        .16254       -.24136E-07    .67948E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 11.3913
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.47041
  Prefactor  = 0.0001
  Prefactor  = 5.07346
  Prefactor  = 0.000100011
  Prefactor  = 1.66932
  norm       = 0.522228
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 11.1297
  Normalizat = 1.54088
  Prefactor  = 0.742977
 **********
 **   18 **HESSE 
 **********

 FCN=   6091.831     FROM HESSE     STATUS=OK           266 CALLS     1894 TOTAL
                     EDM=   .17E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     11.391        12.585        .11868E-03   -1.5033    
   2  Prefactor     .10000E-03    72.987        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    9.9359        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    15.985        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    102.70        .20967E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    47.485        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    10.851        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.4704        1.8119        .84578E-04   -1.5394    
   9  Prefactor     .10000E-03    4.7528        .32792E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     5.0735        4.4512        .14073E-03   -1.5257    
  11  Prefactor     .10001E-03    19.730        .35896E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     1.6693        12.342        .33008E-03   -1.5450    
  13  norm          .52223        .53472        .56683E-03   -1.5563    
  14  Prefactor     .10000E-03    6.7132        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    .52740        .54855E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    14.751        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          11.130        14.645        .12005E-03   -1.5041    
  18  Normalizat    1.5409        .24208        .24285E-03   -.76636    
  19  Prefactor     .74298        .18909        .26998E-03   -1.0187    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.65062e-09
Minuit parameter uncertainties:
  1  12.588
  2  2.34415e-05
  3  5.0961e-06
  4  0.000186173
  5  0.000234122
  6  0.000150543
  7  2.49321e-05
  8  1.81197
  9  1.51954e-07
  10  4.45148
  11  0.000920914
  12  9.0803
  13  0.534722
  14  1.52478e-05
  15  5.74056e-07
  16  1.30553e-05
  17  14.6497
  18  0.242265
  19  0.18925
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.073e+00  4.451e+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:  7.430e-01  1.892e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
532   Normalization:  1.541e+00  2.423e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.75
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 6.13e-08 +/- 5.37e-08
Energy Flux (Fixed Index): 2.10e-05 +/- 1.84e-05

TS (Fixed Index): 1.75
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.65e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.27e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/65655/likelihoodResults_423100801_423360001_4FGL_J1040.5+0617_daily_bin709.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) = 6091.42692405
delta logL = 0.40389191533

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6091.41446395
delta logL = 0.41635201469

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.9919       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0357       1.0000          .0000       10.000    
     3 'Normalizat'    1.4911       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .77077       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=   6091.414     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      244 TOTAL
                     EDM=   .32E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.9914        36.144        .58672E-02    .70457E-03
   2  Index         3.0359        3.0935        .15576        .10987E-03
   3  Normalizat    1.4911        .65449E-01    .55634E-01   -.16730E-05
   4  Prefactor     .77076        .51503E-01    .43336E-01    .15889E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.99138
  Index      = 3.03588
  Normalizat = 1.49112
  Prefactor  = 0.77076
 **********
 **   18 **HESSE 
 **********

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

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.9914        4.8417        .88079E-04   -1.5362    
   2  Index         3.0359        1.0118        .53959E-02   -.40370    
   3  Normalizat    1.4911        .24453        .24599E-03   -.78028    
   4  Prefactor     .77076        .19324        .26557E-03   -1.0082    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.2598e-12
Minuit parameter uncertainties:
  1  4.84237
  2  1.02019
  3  0.244725
  4  0.19341
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65655': 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) = 6091.41446392
delta logL = 0.416352038435

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  7.708e-01  1.934e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
532   Normalization:  1.491e+00  2.447e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.64
Ra Dec: 160.150 6.285
Photon Index (Free Index): 3.04 +/- 1.02
Photon Flux (Free Index): 1.03e-07 +/- 7.65e-08
Energy Flux (Free Index): 2.01e-05 +/- 1.50e-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/65655/cmap_HighResolution_423100801_423360001_4FGL_J1040.5+0617_daily_bin709.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.27e-02', comment='SUCCESS', photon_flux='6.13e-08', energy_flux2='2.01e-05', photon_flux_error='5.37e-08', dlogl='4.16e-01', energy_flux='2.10e-05', photon_flux2='1.03e-07', job_status='DONE', time_completed='2021-09-02 08:36:39.298729', photon_index_error2='1.02', photon_index2='3.04', ts='1.75', fit_tolerance='1e-08', GAL='0.74', photon_index_error='0.00', photon_flux_upper_limit='1.65e-07', energy_flux_error2='1.50e-05', EG='1.54', time_epoch_completed='1630596999.3', return_code='0', job_id='65655', GAL2='0.77', EG2='1.49', return_code2='0', energy_flux_error='1.84e-05', photon_flux_error2='7.65e-08', ts2='2.64', photon_index='2.37' WHERE bin_id='709' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:36:39 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0044>
Subject: Job 65655: <4FGL_J1040.5+0617_daily_bin709> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin709 160.15 6.2848 423100801 423360001 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 :                                   560.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             292.04 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   762 sec.
    Turnaround time :                            924 sec.

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

