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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin623
RA = 160.15, Dec = 6.2848
tmin = 400809601, tmax = 401068801
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='65533', job_status='RUN', time_executed='2021-09-02 08:26:40.581126', time_epoch_executed='1630596400.58' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='623'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65533

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

Retrieving the FT1 file...

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

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

Retrieving 48 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65533/ft1_4FGL_J1040.5+0617_daily_bin623.fits


Retrieving the FT1 file...

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

Retrieving 48 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65533/ft2_4FGL_J1040.5+0617_daily_bin623.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65533/ft1_4FGL_J1040.5+0617_daily_bin623.fits outfile=/scratch/kocevski/65533/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin623.fits ra=160.15 dec=6.2848 rad=12.0 tmin=400809601.0 tmax=401068801.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.22
sys 0.19

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65533/ft1_filtered_4FGL_J1040.5+0617_daily_bin623.fits" evtable="EVENTS" scfile=/scratch/kocevski/65533/ft2_4FGL_J1040.5+0617_daily_bin623.fits sctable="SC_DATA" outfile=/scratch/kocevski/65533/ltcube_400809601_401068801_4FGL_J1040.5+0617_daily_bin623.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/65533/ft2_4FGL_J1040.5+0617_daily_bin623.fits
.....................!
real 13.68
user 13.15
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65533/ft1_filtered_4FGL_J1040.5+0617_daily_bin623.fits evtable="EVENTS" scfile=/scratch/kocevski/65533/ft2_4FGL_J1040.5+0617_daily_bin623.fits sctable="SC_DATA" expcube=/scratch/kocevski/65533/ltcube_400809601_401068801_4FGL_J1040.5+0617_daily_bin623.fits outfile=/scratch/kocevski/65533/expmap_400809601_401068801_4FGL_J1040.5+0617_daily_bin623.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/65533/ltcube_400809601_401068801_4FGL_J1040.5+0617_daily_bin623.fits
.....................!
real 192.34
user 186.20
sys 5.59

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/65533/ft1_filtered_4FGL_J1040.5+0617_daily_bin623.fits scfile=/scratch/kocevski/65533/ft2_4FGL_J1040.5+0617_daily_bin623.fits outfile=/scratch/kocevski/65533/cmap_400809601_401068801_4FGL_J1040.5+0617_daily_bin623.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/65533/ft1_filtered_4FGL_J1040.5+0617_daily_bin623.fits scfile=/scratch/kocevski/65533/ft2_4FGL_J1040.5+0617_daily_bin623.fits outfile=/scratch/kocevski/65533/cmap_HighResolution_400809601_401068801_4FGL_J1040.5+0617_daily_bin623.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.38
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    11.853       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    7.6107       1.0000         .10000E-03   10000.    
     4 'Prefactor '    8.2219       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10131E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    9.8621       1.0000         .10000E-03   10000.    
     8 'norm      '    3.8428       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .11374E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .70551E-02   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    2.2806       1.0000         .10000E-03   10000.    
    13 'norm      '    .20723E-02   1.0000         .10000E-03   10000.    
    14 'Prefactor '    1.7237       1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10060E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .57495       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.6678       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=   6228.955     FROM MIGRAD    STATUS=CONVERGED    427 CALLS     1969 TOTAL
                     EDM=   .50E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     11.855        13.970       -.68932E-07    .62986E-04
   2  Prefactor     .10000E-03    14.499        .52479E-06** at limit **
   3  norm          7.6108        12.859       -.28576E-06    .96555E-04
   4  Prefactor     8.2206        12.217        .38155E-06    .77974E-04
   5  Prefactor     .10000E-03    21.060       -.40217E-06** at limit **
   6  Prefactor     .10001E-03    33.885       -.35207E-05** at limit **
   7  Prefactor     9.8679        19.351       -.15118E-05    .26715E-03
   8  norm          3.8430        1.6790        .36065E-07   -.31468E-03
   9  Prefactor     .10000E-03    3.1978        .16284E-07** at limit **
  10  Prefactor     .10003E-03    1.5955        .12785E-06** at limit **
  11  Prefactor     .10000E-03    2.1844       -.10993E-06** at limit **
  12  Prefactor     2.2748        .94083        .43338E-06   -.10084E-02
  13  norm          .10002E-03    .36371        .87801E-06** at limit **
  14  Prefactor     1.7720        14.672       -.99769E-05   -.14689E-03
  15  norm          .10000E-03    .47409       -.72132E-08** at limit **
  16  Prefactor     .10000E-03    48.224        .24489E-05** at limit **
  17  norm          .10000E-03    8.9394        .43762E-07** at limit **
  18  Normalizat    .57493        .19711       -.12576E-06   -.15524E-04
  19  Prefactor     1.6678        .17748        .92395E-07   -.15934E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 11.8553
  Prefactor  = 0.0001
  norm       = 7.61084
  Prefactor  = 8.22061
  Prefactor  = 0.0001
  Prefactor  = 0.000100012
  Prefactor  = 9.86785
  norm       = 3.84298
  Prefactor  = 0.0001
  Prefactor  = 0.000100028
  Prefactor  = 0.0001
  Prefactor  = 2.27484
  norm       = 0.000100023
  Prefactor  = 1.77204
  norm       = 0.0001
  Prefactor  = 0.000100004
  norm       = 0.0001
  Normalizat = 0.574928
  Prefactor  = 1.66777
 **********
 **   18 **HESSE 
 **********

 FCN=   6228.955     FROM HESSE     STATUS=OK           286 CALLS     2255 TOTAL
                     EDM=   .46E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     11.855        13.941        .11636E-03   -1.5019    
   2  Prefactor     .10000E-03    14.494        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          7.6108        12.825        .14536E-03   -1.5156    
   4  Prefactor     8.2206        12.139        .13982E-03   -1.5134    
   5  Prefactor     .10000E-03    21.066        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10001E-03    33.271        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     9.8679        19.158        .12760E-03   -1.5080    
   8  norm          3.8430        1.6761        .64922E-04   -1.5316    
   9  Prefactor     .10000E-03    7.9181        .27403E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10003E-03    4.4297        .32658E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    2.1916        .11387E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     2.2748        9.7706        .13594E-02   -1.5406    
  13  norm          .10002E-03    1.5221        .13394E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     1.7720        30.890        .31990E-03   -1.5442    
  15  norm          .10000E-03    .48339        .53006E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    48.913        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    9.0130        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .57493        .22314        .36270E-03   -1.0906    
  19  Prefactor     1.6678        .20135        .20885E-03   -.72943    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.60595e-09
Minuit parameter uncertainties:
  1  13.945
  2  0.000118137
  3  12.8298
  4  12.1427
  5  0.000119785
  6  0.0012632
  7  19.1697
  8  1.67611
  9  2.78387e-06
  10  0.000701389
  11  1.01886e-05
  12  9.43142
  13  0.000371843
  14  14.8057
  15  6.93208e-07
  16  0.000832476
  17  6.13125e-06
  18  0.223488
  19  0.20145
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  7.014e-04  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.668e+00  2.015e-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:  5.749e-01  2.235e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 9.56e-08 ph cm-2 s-1
Energy Flux Upper Limit: 7.37e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/65533/likelihoodResults_400809601_401068801_4FGL_J1040.5+0617_daily_bin623.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): 102
logL (Free Index) = 6228.95518013
delta logL = -2.67838513537e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6228.46430235
delta logL = 0.490850996935

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .53903E-01   1.0000         .10000E-03   10000.    
     2 'Index     '    4.9533       1.0000          .0000       10.000    
     3 'Normalizat'    .50130       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.7068       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=   6228.464     FROM MIGRAD    STATUS=CONVERGED     60 CALLS      406 TOTAL
                     EDM=   .94E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .54380E-01    .97907        .43001E-02    .14926E-02
   2  Index         4.9504        3.1163        .12452        .89205E-04
   3  Normalizat    .50142        .40221E-01    .87372E-01    .40568E-04
   4  Prefactor     1.7066        .37426E-01    .46801E-01    .22511E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0543795
  Index      = 4.95044
  Normalizat = 0.50142
  Prefactor  = 1.70664
 **********
 **   18 **HESSE 
 **********

 FCN=   6228.464     FROM HESSE     STATUS=NOT POSDEF    35 CALLS      441 TOTAL
                     EDM=   .19E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .54380E-01    3.0025        .19803E-03   -1.5661    
   2  Index         4.9504        7.4729        .67346E-02   -.99131E-02
   3  Normalizat    .50142        .15385        .38710E-03   -1.1235    
   4  Prefactor     1.7066        .14089        .20686E-03   -.71905    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.93125e-10
Minuit parameter uncertainties:
  1  0.807447
  2  7.5892
  3  0.153984
  4  0.140923
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65533': 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): 102
logL (Free Index) = 6228.46429681
delta logL = 0.490856533813

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.438e-02  8.074e-01  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  4.950e+00  7.589e+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.707e+00  1.409e-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:  5.014e-01  1.540e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.08
Ra Dec: 160.150 6.285
Photon Index (Free Index): 4.95 +/- 7.59
Photon Flux (Free Index): 6.00e-08 +/- 6.45e-08
Energy Flux (Free Index): 8.01e-06 +/- 1.15e-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/65533/cmap_HighResolution_400809601_401068801_4FGL_J1040.5+0617_daily_bin623.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.37e-03', comment='SUCCESS', energy_flux2='8.01e-06', dlogl='4.91e-01', photon_flux2='6.00e-08', job_status='DONE', time_completed='2021-09-02 08:36:32.587034', photon_index_error2='7.59', photon_index2='4.95', ts='-0.00', fit_tolerance='1e-08', GAL='1.67', photon_index_error='0.00', photon_flux_upper_limit='9.56e-08', energy_flux_error2='1.15e-05', EG='0.57', time_epoch_completed='1630596992.59', return_code='0', job_id='65533', GAL2='1.71', EG2='0.50', return_code2='102', photon_flux_error2='6.45e-08', ts2='1.08', photon_index='2.37' WHERE bin_id='623' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:36:32 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0169>
Subject: Job 65533: <4FGL_J1040.5+0617_daily_bin623> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin623 160.15 6.2848 400809601 401068801 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 :                                   589.16 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             308.96 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   801 sec.
    Turnaround time :                            926 sec.

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

