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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin303
RA = 160.15, Dec = 6.2848
tmin = 317865601, tmax = 318124801
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='62878', job_status='RUN', time_executed='2021-09-02 08:15:14.387387', time_epoch_executed='1630595714.39' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='303'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62878

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62878/ft1_4FGL_J1040.5+0617_daily_bin303.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62878/ft2_4FGL_J1040.5+0617_daily_bin303.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62878/ft1_4FGL_J1040.5+0617_daily_bin303.fits outfile=/scratch/kocevski/62878/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin303.fits ra=160.15 dec=6.2848 rad=12.0 tmin=317865601.0 tmax=318124801.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.36
user 3.15
sys 0.18

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/62878/ft2_4FGL_J1040.5+0617_daily_bin303.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/62878/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin303.fits evtable="EVENTS" outfile="/scratch/kocevski/62878/ft1_filtered_4FGL_J1040.5+0617_daily_bin303.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.54
user 0.37
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/62878/ft1_filtered_4FGL_J1040.5+0617_daily_bin303.fits" evtable="EVENTS" scfile=/scratch/kocevski/62878/ft2_4FGL_J1040.5+0617_daily_bin303.fits sctable="SC_DATA" outfile=/scratch/kocevski/62878/ltcube_317865601_318124801_4FGL_J1040.5+0617_daily_bin303.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/62878/ft2_4FGL_J1040.5+0617_daily_bin303.fits
.....................!
real 15.68
user 15.29
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62878/ft1_filtered_4FGL_J1040.5+0617_daily_bin303.fits evtable="EVENTS" scfile=/scratch/kocevski/62878/ft2_4FGL_J1040.5+0617_daily_bin303.fits sctable="SC_DATA" expcube=/scratch/kocevski/62878/ltcube_317865601_318124801_4FGL_J1040.5+0617_daily_bin303.fits outfile=/scratch/kocevski/62878/expmap_317865601_318124801_4FGL_J1040.5+0617_daily_bin303.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/62878/ltcube_317865601_318124801_4FGL_J1040.5+0617_daily_bin303.fits
.....................!
real 192.00
user 186.59
sys 4.83

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/62878/ft1_filtered_4FGL_J1040.5+0617_daily_bin303.fits scfile=/scratch/kocevski/62878/ft2_4FGL_J1040.5+0617_daily_bin303.fits outfile=/scratch/kocevski/62878/cmap_317865601_318124801_4FGL_J1040.5+0617_daily_bin303.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.55
user 0.39
sys 0.15

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .62334       1.0000         .10000E-03   10000.    
     2 'Prefactor '    89.262       1.0000         .10000E-03   10000.    
     3 'norm      '    .10971E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10099E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .40710E-02   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .11715E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    18.214       1.0000         .10000E-03   10000.    
     8 'norm      '    1.2117       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10040E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.6270       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10353E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .76675       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .41685E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10012E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    9.1265       1.0000         .10000E-03   10000.    
    17 'norm      '    .11561E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0869       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .88252       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=   5073.265     FROM MIGRAD    STATUS=CONVERGED    732 CALLS     2327 TOTAL
                     EDM=   .81E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .60534        44.605        .43082E-02    .56149E-04
   2  Prefactor     89.276        57.607        .42529E-04   -.39563E-05
   3  norm          .10000E-03    26.519        .36285E-03** at limit **
   4  Prefactor     .10000E-03    4.6642        .15002E-02** at limit **
   5  Prefactor     .10000E-03    49.404        .13798    ** at limit **
   6  Prefactor     .10000E-03    31.661        .18142E-02** at limit **
   7  Prefactor     18.216        14.423        .93846E-04    .25852E-04
   8  norm          1.2128        1.6004        .99265E-04    .97693E-04
   9  Prefactor     .10000E-03    8.8066        .36285E-03** at limit **
  10  Prefactor     3.6276        2.9829        .10721E-03    .24708E-04
  11  Prefactor     .10000E-03    6.9946        .35925E-03** at limit **
  12  Prefactor     .10000E-03    2.0693        .99964E-03** at limit **
  13  norm          .76653        .56905        .41576E-04   -.12770E-03
  14  Prefactor     .10000E-03    9.7587        .51118E-01** at limit **
  15  norm          .10000E-03    .56341        .10215E-03** at limit **
  16  Prefactor     9.1296        16.140        .13267E-03   -.20909E-04
  17  norm          .10000E-03    14.373        .36285E-02** at limit **
  18  Normalizat    1.0866        .22336        .24408E-03    .43783E-04
  19  Prefactor     .88250        .19163        .23079E-03    .36846E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.605342
  Prefactor  = 89.2759
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 18.2163
  norm       = 1.21278
  Prefactor  = 0.0001
  Prefactor  = 3.62764
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.766531
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 9.12962
  norm       = 0.0001
  Normalizat = 1.08661
  Prefactor  = 0.882498
 **********
 **   18 **HESSE 
 **********

 FCN=   5073.265     FROM HESSE     STATUS=OK           270 CALLS     2597 TOTAL
                     EDM=   .29E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .60534        44.656        .17233E-03   -1.5552    
   2  Prefactor     89.276        57.607        .85057E-05   -1.3815    
   3  norm          .10000E-03    26.520        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    4.6644        .30005E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    48.892        .13857       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    31.661        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     18.216        14.420        .18769E-04   -1.4854    
   8  norm          1.2128        1.6002        .39706E-05   -1.5488    
   9  Prefactor     .10000E-03    8.8072        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     3.6276        2.9827        .42884E-05   -1.5327    
  11  Prefactor     .10000E-03    6.9951        .71849E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    2.0693        .19993E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .76653        .56799        .16631E-05   -1.5533    
  14  Prefactor     .10000E-03    8.3471        .57145E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    .56341        .20430E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     9.1296        16.139        .53067E-05   -1.5104    
  17  norm          .10000E-03    14.488        .72569E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.0866        .22359        .97633E-05   -.90183    
  19  Prefactor     .88250        .19177        .92317E-05   -.96755    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.89024e-11
Minuit parameter uncertainties:
  1  10.4057
  2  57.6428
  3  3.20275e-05
  4  9.63858e-06
  5  0.000107007
  6  0.000107451
  7  14.4224
  8  1.60025
  9  7.1082e-05
  10  2.98285
  11  7.01377e-06
  12  2.58436e-06
  13  0.567991
  14  3.24154e-06
  15  2.08538e-07
  16  16.1463
  17  3.8503e-06
  18  0.223782
  19  0.191917
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.628e+00  2.983e+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:  8.825e-01  1.919e-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.087e+00  2.238e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.69
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 4.38e-08 +/- 3.60e-08
Energy Flux (Fixed Index): 1.50e-05 +/- 1.23e-05

TS (Fixed Index): 2.69
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.28e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.89e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/62878/likelihoodResults_317865601_318124801_4FGL_J1040.5+0617_daily_bin303.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) = 5072.79853219
delta logL = 0.466652845682

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5072.78860837
delta logL = 0.476576665064

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.9065       1.0000         .10000E-03   10000.    
     2 'Index     '    1.7108       1.0000          .0000       10.000    
     3 'Normalizat'    1.1165       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .86610       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=   5072.789     FROM MIGRAD    STATUS=CONVERGED     48 CALLS      199 TOTAL
                     EDM=   .46E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.9065        3.4596        .51032E-02   -.39683E-02
   2  Index         1.7108        .49051        .22605       -.32843E-04
   3  Normalizat    1.1165        .18738        .54549E-01    .64216E-05
   4  Prefactor     .86611        .16145        .44571E-01    .93412E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.90654
  Index      = 1.71081
  Normalizat = 1.11647
  Prefactor  = 0.866106
 **********
 **   18 **HESSE 
 **********

 FCN=   5072.789     FROM HESSE     STATUS=OK            31 CALLS      230 TOTAL
                     EDM=   .67E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.9065        3.4540        .11269E-03   -1.5313    
   2  Index         1.7108        .58229        .83671E-02   -.71794    
   3  Normalizat    1.1165        .21917        .24120E-03   -.89225    
   4  Prefactor     .86611        .18909        .23260E-03   -.97336    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.7274e-09
Minuit parameter uncertainties:
  1  3.45418
  2  0.584631
  3  0.219352
  4  0.189235
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62878': 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) = 5072.78860834
delta logL = 0.476576691433

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.907e+00  3.454e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.711e+00  5.846e-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:  8.661e-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.116e+00  2.194e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.65
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.71 +/- 0.58
Photon Flux (Free Index): 2.18e-08 +/- 2.49e-08
Energy Flux (Free Index): 3.45e-05 +/- 4.64e-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/62878/cmap_HighResolution_317865601_318124801_4FGL_J1040.5+0617_daily_bin303.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.89e-03', comment='SUCCESS', photon_flux='4.38e-08', energy_flux2='3.45e-05', photon_flux_error='3.60e-08', dlogl='4.77e-01', energy_flux='1.50e-05', photon_flux2='2.18e-08', job_status='DONE', time_completed='2021-09-02 08:24:37.676868', photon_index_error2='0.58', photon_index2='1.71', ts='2.69', fit_tolerance='1e-08', GAL='0.88', photon_index_error='0.00', photon_flux_upper_limit='1.28e-07', energy_flux_error2='4.64e-05', EG='1.09', time_epoch_completed='1630596277.68', return_code='0', job_id='62878', GAL2='0.87', EG2='1.12', return_code2='0', energy_flux_error='1.23e-05', photon_flux_error2='2.49e-08', ts2='3.65', photon_index='2.37' WHERE bin_id='303' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:24:37 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0144>
Subject: Job 62878: <4FGL_J1040.5+0617_daily_bin303> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin303> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:11:20 2021
Job was executed on host(s) <bullet0144>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:13:14 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:13:14 2021
Terminated at Thu Sep  2 08:24:38 2021
Results reported at Thu Sep  2 08:24:38 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin303 160.15 6.2848 317865601 318124801 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 :                                   559.46 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             292.91 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   685 sec.
    Turnaround time :                            798 sec.

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

