/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 4 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 = 7389
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin76
RA = 160.15, Dec = 6.2848
tmin = 259027201, tmax = 259286401
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='58349', job_status='RUN', time_executed='2021-09-02 08:02:54.108591', time_epoch_executed='1630594974.11' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='76'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/58349

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/58349/ft1_4FGL_J1040.5+0617_daily_bin76.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/58349/ft2_4FGL_J1040.5+0617_daily_bin76.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/58349/ft1_4FGL_J1040.5+0617_daily_bin76.fits outfile=/scratch/kocevski/58349/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin76.fits ra=160.15 dec=6.2848 rad=12.0 tmin=259027201.0 tmax=259286401.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 1.47
user 1.27
sys 0.18

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/58349/ft1_filtered_4FGL_J1040.5+0617_daily_bin76.fits" evtable="EVENTS" scfile=/scratch/kocevski/58349/ft2_4FGL_J1040.5+0617_daily_bin76.fits sctable="SC_DATA" outfile=/scratch/kocevski/58349/ltcube_259027201_259286401_4FGL_J1040.5+0617_daily_bin76.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/58349/ft2_4FGL_J1040.5+0617_daily_bin76.fits
.....................!
real 19.19
user 18.71
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/58349/ft1_filtered_4FGL_J1040.5+0617_daily_bin76.fits evtable="EVENTS" scfile=/scratch/kocevski/58349/ft2_4FGL_J1040.5+0617_daily_bin76.fits sctable="SC_DATA" expcube=/scratch/kocevski/58349/ltcube_259027201_259286401_4FGL_J1040.5+0617_daily_bin76.fits outfile=/scratch/kocevski/58349/expmap_259027201_259286401_4FGL_J1040.5+0617_daily_bin76.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/58349/ltcube_259027201_259286401_4FGL_J1040.5+0617_daily_bin76.fits
.....................!
real 191.46
user 186.31
sys 4.22

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/58349/ft1_filtered_4FGL_J1040.5+0617_daily_bin76.fits scfile=/scratch/kocevski/58349/ft2_4FGL_J1040.5+0617_daily_bin76.fits outfile=/scratch/kocevski/58349/cmap_259027201_259286401_4FGL_J1040.5+0617_daily_bin76.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.58
user 0.39
sys 0.14

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    30.226       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10057E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .11696E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    25.432       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10117E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10146E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    16.942       1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    9.1365       1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.0917       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    2.7412       1.0000         .10000E-03   10000.    
    14 'Prefactor '    17.137       1.0000         .10000E-03   10000.    
    15 'norm      '    1.4206       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .57975       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2439       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=   5615.509     FROM MIGRAD    STATUS=CONVERGED    371 CALLS     1579 TOTAL
                     EDM=   .20E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     30.217        17.159       -.24057E-05    .12883E-04
   2  Prefactor     .10000E-03    33.194       -.50795E-05** at limit **
   3  norm          .10000E-03    13.981       -.18873E-05** at limit **
   4  Prefactor     25.431        12.856        .66733E-06    .97849E-05
   5  Prefactor     .10000E-03    23.892        .43247E-05** at limit **
   6  Prefactor     .10000E-03    23.187        .10341E-05** at limit **
   7  Prefactor     16.943        16.001        .24518E-06   -.21298E-05
   8  norm          .10000E-03    .40814       -.46232E-07** at limit **
   9  Prefactor     9.1371        7.8336       -.22729E-06   -.97447E-04
  10  Prefactor     2.0916        2.1148        .27673E-08    .12464E-03
  11  Prefactor     .10000E-03    6.2204        .30926E-05** at limit **
  12  Prefactor     .10000E-03    6.7750       -.90962E-05** at limit **
  13  norm          2.7411        .85276        .58417E-07    .78245E-03
  14  Prefactor     17.136        11.260       -.57450E-06   -.58889E-03
  15  norm          1.4206        1.2446       -.85903E-07   -.43961E-03
  16  Prefactor     .10000E-03    7.1572        .60945E-05** at limit **
  17  norm          .10000E-03    4.7011       -.99883E-08** at limit **
  18  Normalizat    .57978        .20041        .59924E-06    .39877E-04
  19  Prefactor     1.2439        .17233        .23868E-06    .10120E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 30.2167
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 25.4308
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 16.9427
  norm       = 0.0001
  Prefactor  = 9.13708
  Prefactor  = 2.0916
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.74107
  Prefactor  = 17.136
  norm       = 1.4206
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 0.579781
  Prefactor  = 1.24392
 **********
 **   18 **HESSE 
 **********

 FCN=   5615.509     FROM HESSE     STATUS=OK           266 CALLS     1845 TOTAL
                     EDM=   .41E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     30.217        17.149        .72876E-04   -1.4608    
   2  Prefactor     .10000E-03    33.322        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    13.984        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     25.431        12.854        .79435E-04   -1.4699    
   5  Prefactor     .10000E-03    23.923        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    23.189        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     16.943        15.997        .97304E-04   -1.4885    
   8  norm          .10000E-03    .41517        .46711E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     9.1371        7.8357        .13259E-03   -1.5103    
  10  Prefactor     2.0916        2.1080        .10588E-03   -1.5419    
  11  Prefactor     .10000E-03    6.3157        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    6.7433        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          2.7411        .86616        .33239E-04   -1.5377    
  14  Prefactor     17.136        11.516        .48376E-03   -1.4880    
  15  norm          1.4206        1.2397        .74248E-04   -1.5470    
  16  Prefactor     .10000E-03    7.1541        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    4.7164        .15867E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .57978        .22244        .32893E-03   -1.0885    
  19  Prefactor     1.2439        .19286        .20842E-03   -.84990    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.14045e-10
Minuit parameter uncertainties:
  1  17.1522
  2  6.24819e-06
  3  6.851e-05
  4  12.8554
  5  1.57877e-05
  6  2.97228e-06
  7  16.0015
  8  9.19075e-08
  9  7.83657
  10  2.10809
  11  2.34761e-05
  12  2.3582e-05
  13  0.866168
  14  11.5173
  15  1.23969
  16  2.80315e-06
  17  1.56698e-06
  18  0.22278
  19  0.192968
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.092e+00  2.108e+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.244e+00  1.930e-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.798e-01  2.228e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.19
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 2.53e-08 +/- 2.55e-08
Energy Flux (Fixed Index): 8.65e-06 +/- 8.72e-06

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

Saving results to:
/scratch/kocevski/58349/likelihoodResults_259027201_259286401_4FGL_J1040.5+0617_daily_bin76.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) = 5614.38672246
delta logL = 1.12240160514

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5614.36076811
delta logL = 1.14835594957

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.5608       1.0000         .10000E-03   10000.    
     2 'Index     '    1.3055       1.0000          .0000       10.000    
     3 'Normalizat'    .59812       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2367       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=   5614.361     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      205 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.5671        1.6404        .85148E-02   -.46613E-03
   2  Index         1.3065        .41549        .22216       -.33990E-04
   3  Normalizat    .59774        .18970        .73220E-01    .13001E-04
   4  Prefactor     1.2369        .17129        .33816E-01   -.11587E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.56708
  Index      = 1.30653
  Normalizat = 0.597735
  Prefactor  = 1.23692
 **********
 **   18 **HESSE 
 **********

 FCN=   5614.361     FROM HESSE     STATUS=OK            31 CALLS      236 TOTAL
                     EDM=   .37E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.5671        2.3573        .93154E-04   -1.5458    
   2  Index         1.3065        .65940        .87891E-02   -.83113    
   3  Normalizat    .59774        .21234        .32414E-03   -1.0808    
   4  Prefactor     1.2369        .19222        .20887E-03   -.85203    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.71299e-11
Minuit parameter uncertainties:
  1  2.35744
  2  0.66368
  3  0.212627
  4  0.192329
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/58349': 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) = 5614.36076279
delta logL = 1.14836127176

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.567e+00  2.357e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.307e+00  6.637e-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:  1.237e+00  1.923e-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.977e-01  2.126e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.48
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.31 +/- 0.66
Photon Flux (Free Index): 7.53e-09 +/- 1.08e-08
Energy Flux (Free Index): 4.52e-05 +/- 6.92e-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/58349/cmap_HighResolution_259027201_259286401_4FGL_J1040.5+0617_daily_bin76.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.27e-03', comment='SUCCESS', photon_flux='2.53e-08', energy_flux2='4.52e-05', photon_flux_error='2.55e-08', dlogl='1.15e+00', energy_flux='8.65e-06', photon_flux2='7.53e-09', job_status='DONE', time_completed='2021-09-02 08:11:46.673701', photon_index_error2='0.66', photon_index2='1.31', ts='2.19', fit_tolerance='1e-08', GAL='1.24', photon_index_error='0.00', photon_flux_upper_limit='9.43e-08', energy_flux_error2='6.92e-05', EG='0.58', time_epoch_completed='1630595506.67', return_code='0', job_id='58349', GAL2='1.24', EG2='0.60', return_code2='0', energy_flux_error='8.72e-06', photon_flux_error2='1.08e-08', ts2='4.48', photon_index='2.37' WHERE bin_id='76' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:11:46 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0250>
Subject: Job 58349: <4FGL_J1040.5+0617_daily_bin76> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin76> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Thu Sep  2 08:02:37 2021
Job was executed on host(s) <bullet0250>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:02:39 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:02:39 2021
Terminated at Thu Sep  2 08:11:47 2021
Results reported at Thu Sep  2 08:11:47 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin76 160.15 6.2848 259027201 259286401 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 :                                   527.64 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             336.05 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   547 sec.
    Turnaround time :                            550 sec.

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

