/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 75 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 = 7477
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin392
RA = 160.15, Dec = 6.2848
tmin = 340934401, tmax = 341193601
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='64259', job_status='RUN', time_executed='2021-09-02 08:18:17.598531', time_epoch_executed='1630595897.6' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='392'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64259

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64259/ft1_4FGL_J1040.5+0617_daily_bin392.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64259/ft2_4FGL_J1040.5+0617_daily_bin392.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64259/ft1_4FGL_J1040.5+0617_daily_bin392.fits outfile=/scratch/kocevski/64259/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin392.fits ra=160.15 dec=6.2848 rad=12.0 tmin=340934401.0 tmax=341193601.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.44
user 3.23
sys 0.19

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/64259/ft1_filtered_4FGL_J1040.5+0617_daily_bin392.fits" evtable="EVENTS" scfile=/scratch/kocevski/64259/ft2_4FGL_J1040.5+0617_daily_bin392.fits sctable="SC_DATA" outfile=/scratch/kocevski/64259/ltcube_340934401_341193601_4FGL_J1040.5+0617_daily_bin392.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/64259/ft2_4FGL_J1040.5+0617_daily_bin392.fits
.....................!
real 13.95
user 13.60
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64259/ft1_filtered_4FGL_J1040.5+0617_daily_bin392.fits evtable="EVENTS" scfile=/scratch/kocevski/64259/ft2_4FGL_J1040.5+0617_daily_bin392.fits sctable="SC_DATA" expcube=/scratch/kocevski/64259/ltcube_340934401_341193601_4FGL_J1040.5+0617_daily_bin392.fits outfile=/scratch/kocevski/64259/expmap_340934401_341193601_4FGL_J1040.5+0617_daily_bin392.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/64259/ltcube_340934401_341193601_4FGL_J1040.5+0617_daily_bin392.fits
.....................!
real 191.57
user 186.26
sys 4.81

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/64259/ft1_filtered_4FGL_J1040.5+0617_daily_bin392.fits scfile=/scratch/kocevski/64259/ft2_4FGL_J1040.5+0617_daily_bin392.fits outfile=/scratch/kocevski/64259/cmap_340934401_341193601_4FGL_J1040.5+0617_daily_bin392.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.57
user 0.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/64259/ft1_filtered_4FGL_J1040.5+0617_daily_bin392.fits scfile=/scratch/kocevski/64259/ft2_4FGL_J1040.5+0617_daily_bin392.fits outfile=/scratch/kocevski/64259/cmap_HighResolution_340934401_341193601_4FGL_J1040.5+0617_daily_bin392.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.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10543E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10789E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10059E-02   1.0000         .10000E-03   10000.    
     5 'Prefactor '    31.422       1.0000         .10000E-03   10000.    
     6 'Prefactor '    130.42       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .22586E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.3605       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    10.642       1.0000         .10000E-03   10000.    
    13 'norm      '    3.3959       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .41853E-01   1.0000         .10000E-03   10000.    
    15 'norm      '    3.5634       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10779E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    1.5501       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.8131       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .57525       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.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7054.379     FROM MIGRAD    STATUS=CONVERGED    706 CALLS     2567 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    30.931        .36285E-03** at limit **
   2  Prefactor     .10000E-03    17.502        .18142E-02** at limit **
   3  norm          .10000E-03    6.1885        .18142E-02** at limit **
   4  Prefactor     .10017E-03    38.477        .70154E-01** at limit **
   5  Prefactor     31.429        40.284        .71480E-04    .39921E-04
   6  Prefactor     130.34        111.95        .17628E-03   -.74165E-05
   7  Prefactor     .10000E-03    32.717        .18142E-02** at limit **
   8  norm          .10000E-03    .50474        .11486E-03** at limit **
   9  Prefactor     .10000E-03    5.8324        .36285E-03** at limit **
  10  Prefactor     3.3601        3.5994        .15475E-03   -.94037E-04
  11  Prefactor     .10000E-03    2.7883        .13638E-02** at limit **
  12  Prefactor     10.646        8.7645        .12282E-03    .26168E-03
  13  norm          3.3987        .98451        .36929E-04    .13056E-02
  14  Prefactor     .12484E-03    15.014        .63139E-01** at limit **
  15  norm          3.5639        1.5134        .64185E-04   -.22796E-03
  16  Prefactor     .10000E-03    15.934        .18142E-02** at limit **
  17  norm          1.5427        19.940        .34212E-03   -.66193E-04
  18  Normalizat    1.8130        .24180        .24090E-03    .19493E-03
  19  Prefactor     .57536        .18582        .32478E-03    .11849E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100003
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100172
  Prefactor  = 31.429
  Prefactor  = 130.34
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.36007
  Prefactor  = 0.0001
  Prefactor  = 10.6458
  norm       = 3.39874
  Prefactor  = 0.000124839
  norm       = 3.56386
  Prefactor  = 0.0001
  norm       = 1.54267
  Normalizat = 1.81295
  Prefactor  = 0.575362
 **********
 **   18 **HESSE 
 **********

 FCN=   7054.379     FROM HESSE     STATUS=OK           268 CALLS     2835 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    30.932        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    17.502        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    6.1886        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10017E-03    28.467        .81911E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     31.429        40.280        .14296E-04   -1.4586    
   6  Prefactor     130.34        109.23        .70513E-05   -1.3420    
   7  Prefactor     .10000E-03    32.718        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .50475        .22972E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    5.8326        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     3.3601        3.5989        .61899E-05   -1.5341    
  11  Prefactor     .10000E-03    2.7888        .27275E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     10.646        8.7656        .49128E-05   -1.5055    
  13  norm          3.3987        .98202        .14772E-05   -1.5339    
  14  Prefactor     .12484E-03    12.356        .71696E-01   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          3.5639        1.5134        .25674E-05   -1.5330    
  16  Prefactor     .10000E-03    15.940        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          1.5427        19.933        .13685E-04   -1.5460    
  18  Normalizat    1.8130        .24204        .48181E-04   -.69326    
  19  Prefactor     .57536        .18595        .12991E-04   -1.0863    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.27989e-09
Minuit parameter uncertainties:
  1  0.000588491
  2  6.48482e-05
  3  3.50624e-05
  4  0.00442743
  5  40.3151
  6  109.399
  7  0.000224169
  8  4.39158e-06
  9  5.29202e-05
  10  3.59912
  11  1.64979e-05
  12  8.76661
  13  0.982026
  14  0.0350445
  15  1.51341
  16  9.00608e-05
  17  11.0947
  18  0.242197
  19  0.186148
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.360e+00  3.599e+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:  5.754e-01  1.861e-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.813e+00  2.422e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.16
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 4.06e-08 +/- 4.35e-08
Energy Flux (Fixed Index): 1.39e-05 +/- 1.49e-05

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

Saving results to:
/scratch/kocevski/64259/likelihoodResults_340934401_341193601_4FGL_J1040.5+0617_daily_bin392.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) = 7053.88263122
delta logL = 0.496265070515

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7053.87783067
delta logL = 0.501065618289

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.6570       1.0000         .10000E-03   10000.    
     2 'Index     '    3.3153       1.0000          .0000       10.000    
     3 'Normalizat'    1.7510       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .60857       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=   7053.878     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      252 TOTAL
                     EDM=   .39E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.6567        21.749        .81958E-02    .67650E-03
   2  Index         3.3154        3.3682        .12231        .15769E-03
   3  Normalizat    1.7510        .61897E-01    .55185E-01   -.24193E-05
   4  Prefactor     .60856        .48154E-01    .71493E-01    .31708E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.65666
  Index      = 3.3154
  Normalizat = 1.75105
  Prefactor  = 0.608557
 **********
 **   18 **HESSE 
 **********

 FCN=   7053.878     FROM HESSE     STATUS=OK            33 CALLS      285 TOTAL
                     EDM=   .33E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.6567        5.6897        .76177E-04   -1.5451    
   2  Index         3.3154        2.1409        .64992E-02   -.34364    
   3  Normalizat    1.7510        .24996        .24398E-03   -.70948    
   4  Prefactor     .60856        .19689        .31646E-03   -1.0723    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.34666e-10
Minuit parameter uncertainties:
  1  5.69159
  2  2.22257
  3  0.250139
  4  0.197116
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64259': 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) = 7053.87783066
delta logL = 0.501065634569

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.657e+00  5.692e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.315e+00  2.223e+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:  6.086e-01  1.971e-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.751e+00  2.501e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.23
Ra Dec: 160.150 6.285
Photon Index (Free Index): 3.32 +/- 2.22
Photon Flux (Free Index): 9.14e-08 +/- 8.22e-08
Energy Flux (Free Index): 1.61e-05 +/- 1.28e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/64259/cmap_HighResolution_340934401_341193601_4FGL_J1040.5+0617_daily_bin392.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.02e-02', comment='SUCCESS', photon_flux='4.06e-08', energy_flux2='1.61e-05', photon_flux_error='4.35e-08', dlogl='5.01e-01', energy_flux='1.39e-05', photon_flux2='9.14e-08', job_status='DONE', time_completed='2021-09-02 08:29:44.097029', photon_index_error2='2.22', photon_index2='3.32', ts='1.16', fit_tolerance='1e-08', GAL='0.58', photon_index_error='0.00', photon_flux_upper_limit='1.33e-07', energy_flux_error2='1.28e-05', EG='1.81', time_epoch_completed='1630596584.1', return_code='0', job_id='64259', GAL2='0.61', EG2='1.75', return_code2='0', energy_flux_error='1.49e-05', photon_flux_error2='8.22e-08', ts2='2.23', photon_index='2.37' WHERE bin_id='392' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:29:44 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0142>
Subject: Job 64259: <4FGL_J1040.5+0617_daily_bin392> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin392 160.15 6.2848 340934401 341193601 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 :                                   684.44 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             363.52 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   772 sec.
    Turnaround time :                            807 sec.

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

