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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin312
RA = 160.15, Dec = 6.2848
tmin = 320198401, tmax = 320457601
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='62889', job_status='RUN', time_executed='2021-09-02 08:15:45.486946', time_epoch_executed='1630595745.49' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='312'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62889

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

Retrieving the FT1 file...

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

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

Retrieving 44 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62889/ft1_4FGL_J1040.5+0617_daily_bin312.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62889/ft2_4FGL_J1040.5+0617_daily_bin312.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62889/ft1_4FGL_J1040.5+0617_daily_bin312.fits outfile=/scratch/kocevski/62889/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin312.fits ra=160.15 dec=6.2848 rad=12.0 tmin=320198401.0 tmax=320457601.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.34
user 3.14
sys 0.18

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/62889/ft1_filtered_4FGL_J1040.5+0617_daily_bin312.fits" evtable="EVENTS" scfile=/scratch/kocevski/62889/ft2_4FGL_J1040.5+0617_daily_bin312.fits sctable="SC_DATA" outfile=/scratch/kocevski/62889/ltcube_320198401_320457601_4FGL_J1040.5+0617_daily_bin312.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/62889/ft2_4FGL_J1040.5+0617_daily_bin312.fits
.....................!
real 15.26
user 14.83
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62889/ft1_filtered_4FGL_J1040.5+0617_daily_bin312.fits evtable="EVENTS" scfile=/scratch/kocevski/62889/ft2_4FGL_J1040.5+0617_daily_bin312.fits sctable="SC_DATA" expcube=/scratch/kocevski/62889/ltcube_320198401_320457601_4FGL_J1040.5+0617_daily_bin312.fits outfile=/scratch/kocevski/62889/expmap_320198401_320457601_4FGL_J1040.5+0617_daily_bin312.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/62889/ltcube_320198401_320457601_4FGL_J1040.5+0617_daily_bin312.fits
.....................!
real 192.84
user 188.02
sys 4.27

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/62889/ft1_filtered_4FGL_J1040.5+0617_daily_bin312.fits scfile=/scratch/kocevski/62889/ft2_4FGL_J1040.5+0617_daily_bin312.fits outfile=/scratch/kocevski/62889/cmap_320198401_320457601_4FGL_J1040.5+0617_daily_bin312.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.40
sys 0.14

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    21.564       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10027E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10609E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    34.736       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .19697E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .11822E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .20391       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .96149       1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.0041       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10190E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    18.590       1.0000         .10000E-03   10000.    
    13 'norm      '    1.4793       1.0000         .10000E-03   10000.    
    14 'Prefactor '    13.654       1.0000         .10000E-03   10000.    
    15 'norm      '    .34182       1.0000         .10000E-03   10000.    
    16 'Prefactor '    19.163       1.0000         .10000E-03   10000.    
    17 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .45860       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.4801       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=   5774.035     FROM MIGRAD    STATUS=CONVERGED    407 CALLS     1924 TOTAL
                     EDM=   .87E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     21.572        16.326        .21564E-02   -.59178E-03
   2  Prefactor     .10000E-03    24.581        .90712E-02** at limit **
   3  norm          .10000E-03    9.6891        .90712E-02** at limit **
   4  Prefactor     .10000E-03    6.3208        .90712E-02** at limit **
   5  Prefactor     34.455        69.522        .16999E-02   -.58467E-04
   6  Prefactor     .10000E-03    47.875        .90712E-02** at limit **
   7  Prefactor     .10000E-03    16.063        .90712E-02** at limit **
   8  norm          .20394        .88700        .25799E-01    .15595E-02
   9  Prefactor     .95973        6.2899        .13029E-01    .11360E-02
  10  Prefactor     2.0052        3.2176        .73127E-02    .59033E-03
  11  Prefactor     .10000E-03    7.8754        .90712E-02** at limit **
  12  Prefactor     18.590        10.538        .23223E-02    .52965E-03
  13  norm          1.4790        .67443        .84750E-02    .22373E-03
  14  Prefactor     13.654        9.4525        .27100E-02   -.88329E-04
  15  norm          .34176        .63839        .10607E-02    .54574E-02
  16  Prefactor     19.159        21.648        .22873E-02    .55369E-03
  17  norm          .10000E-03    3.8399        .90712E-02** at limit **
  18  Normalizat    .45837        .21540        .87206E-01    .41210E-04
  19  Prefactor     1.4804        .18076        .45943E-01   -.71480E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 21.5723
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 34.4547
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.203944
  Prefactor  = 0.959732
  Prefactor  = 2.0052
  Prefactor  = 0.0001
  Prefactor  = 18.5895
  norm       = 1.47903
  Prefactor  = 13.6537
  norm       = 0.341765
  Prefactor  = 19.1593
  norm       = 0.0001
  Normalizat = 0.458368
  Prefactor  = 1.48041
 **********
 **   18 **HESSE 
 **********

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

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     21.572        16.302        .86255E-04   -1.4779    
   2  Prefactor     .10000E-03    24.606        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    9.6968        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    6.3511        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     34.455        69.479        .67994E-04   -1.4533    
   6  Prefactor     .10000E-03    47.940        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    16.134        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .20394        1.3929        .13429E-02   -1.5618    
   9  Prefactor     .95973        6.1550        .35939E-03   -1.5512    
  10  Prefactor     2.0052        3.1818        .16186E-03   -1.5425    
  11  Prefactor     .10000E-03    8.0238        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     18.590        10.495        .92893E-04   -1.4845    
  13  norm          1.4790        .67718        .37663E-04   -1.5465    
  14  Prefactor     13.654        9.5603        .10840E-03   -1.4969    
  15  norm          .34176        .63754        .21214E-03   -1.5591    
  16  Prefactor     19.159        21.609        .91493E-04   -1.4832    
  17  norm          .10000E-03    3.8502        .14542E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .45837        .23315        .38637E-03   -1.1439    
  19  Prefactor     1.4804        .20088        .20307E-03   -.78090    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.26123e-09
Minuit parameter uncertainties:
  1  16.3056
  2  3.23686e-06
  3  5.3773e-07
  4  1.5493e-06
  5  69.6425
  6  4.02884e-05
  7  4.24456e-07
  8  1.06576
  9  4.86141
  10  3.18211
  11  5.99461e-07
  12  10.4963
  13  0.67718
  14  9.56141
  15  0.637554
  16  21.6183
  17  3.69545e-08
  18  0.233643
  19  0.200988
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.005e+00  3.182e+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.480e+00  2.010e-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:  4.584e-01  2.336e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/62889/likelihoodResults_320198401_320457601_4FGL_J1040.5+0617_daily_bin312.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) = 5773.99573064
delta logL = 0.0389978340963

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5773.9941605
delta logL = 0.0405679699143

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.9754       1.0000         .10000E-03   10000.    
     2 'Index     '    1.9085       1.0000          .0000       10.000    
     3 'Normalizat'    .47263       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.4730       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=   5773.994     FROM MIGRAD    STATUS=CONVERGED     95 CALLS      291 TOTAL
                     EDM=   .69E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.9750        3.3983        .16524E-03    .87376E-05
   2  Index         1.9081        1.2625        .15842E-01   -.25329E-03
   3  Normalizat    .47281        .22157        .38067E-03    .15619E-04
   4  Prefactor     1.4728        .19898        .20350E-03    .45139E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.97498
  Index      = 1.90811
  Normalizat = 0.472811
  Prefactor  = 1.47283
 **********
 **   18 **HESSE 
 **********

 FCN=   5773.994     FROM HESSE     STATUS=OK            25 CALLS      316 TOTAL
                     EDM=   .12E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.9750        3.4896        .66097E-05   -1.5427    
   2  Index         1.9081        1.2957        .31684E-02   -.66668    
   3  Normalizat    .47281        .22170        .15227E-04   -1.1369    
   4  Prefactor     1.4728        .19905        .81401E-05   -.78303    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.23666e-11
Minuit parameter uncertainties:
  1  3.48998
  2  1.32046
  3  0.222112
  4  0.199159
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62889': 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) = 5773.99416013
delta logL = 0.0405683443869

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.975e+00  3.490e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.908e+00  1.320e+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:  1.473e+00  1.992e-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:  4.728e-01  2.221e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.52
Ra Dec: 160.150 6.285

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/62889/cmap_HighResolution_320198401_320457601_4FGL_J1040.5+0617_daily_bin312.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.98e-03', job_status='DONE', photon_flux_upper_limit='1.16e-07', time_completed='2021-09-02 08:25:08.088482', job_id='62889', GAL2='1.47', fit_tolerance='1e-08', EG2='0.47', EG='0.46', time_epoch_completed='1630596308.09', return_code2='0', ts='0.52', comment='SUCCESS', return_code='0', GAL='1.48', dlogl='4.06e-02', ts2='0.60', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='312' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:25:08 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0154>
Subject: Job 62889: <4FGL_J1040.5+0617_daily_bin312> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin312 160.15 6.2848 320198401 320457601 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 :                                   561.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             293.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   703 sec.
    Turnaround time :                            827 sec.

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

