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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1061
RA = 160.15, Dec = 6.2848
tmin = 514339201, tmax = 514598401
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='67971', job_status='RUN', time_executed='2021-09-02 08:35:55.580621', time_epoch_executed='1630596955.58' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1061'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/67971

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

Retrieving the FT1 file...

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

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

Retrieving 48 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/67971/ft1_4FGL_J1040.5+0617_daily_bin1061.fits


Retrieving the FT1 file...

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

Retrieving 48 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/67971/ft2_4FGL_J1040.5+0617_daily_bin1061.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/67971/ft1_4FGL_J1040.5+0617_daily_bin1061.fits outfile=/scratch/kocevski/67971/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1061.fits ra=160.15 dec=6.2848 rad=12.0 tmin=514339201.0 tmax=514598401.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 4.20
user 3.91
sys 0.22

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/67971/ft1_filtered_4FGL_J1040.5+0617_daily_bin1061.fits evtable="EVENTS" scfile=/scratch/kocevski/67971/ft2_4FGL_J1040.5+0617_daily_bin1061.fits sctable="SC_DATA" expcube=/scratch/kocevski/67971/ltcube_514339201_514598401_4FGL_J1040.5+0617_daily_bin1061.fits outfile=/scratch/kocevski/67971/expmap_514339201_514598401_4FGL_J1040.5+0617_daily_bin1061.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/67971/ltcube_514339201_514598401_4FGL_J1040.5+0617_daily_bin1061.fits
.....................!
real 193.93
user 187.75
sys 5.60

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/67971/ft1_filtered_4FGL_J1040.5+0617_daily_bin1061.fits scfile=/scratch/kocevski/67971/ft2_4FGL_J1040.5+0617_daily_bin1061.fits outfile=/scratch/kocevski/67971/cmap_514339201_514598401_4FGL_J1040.5+0617_daily_bin1061.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.56
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/67971/ft1_filtered_4FGL_J1040.5+0617_daily_bin1061.fits scfile=/scratch/kocevski/67971/ft2_4FGL_J1040.5+0617_daily_bin1061.fits outfile=/scratch/kocevski/67971/cmap_HighResolution_514339201_514598401_4FGL_J1040.5+0617_daily_bin1061.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=160.15 yref=6.2848 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.56
user 0.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10121E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .15891E-01   1.0000         .10000E-03   10000.    
     3 'norm      '    28.474       1.0000         .10000E-03   10000.    
     4 'Prefactor '    7.9252       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .17415E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10035E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    4.4710       1.0000         .10000E-03   10000.    
     9 'Prefactor '    3.8943       1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.5281       1.0000         .10000E-03   10000.    
    11 'Prefactor '    18.962       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .17080E-02   1.0000         .10000E-03   10000.    
    13 'norm      '    .85203       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .26531       1.0000         .10000E-03   10000.    
    15 'norm      '    1.0287       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10036E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    1.4526       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0909       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .91857       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=   6464.821     FROM MIGRAD    STATUS=CONVERGED    753 CALLS     2056 TOTAL
                     EDM=   .43E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    11.240        .18142E-02** at limit **
   2  Prefactor     .10003E-03    24.111        .12163    ** at limit **
   3  norm          28.458        17.292        .75080E-04   -.91337E-04
   4  Prefactor     7.9381        10.458        .14243E-03   -.26181E-04
   5  Prefactor     .10006E-03    534.66        .36285E-03** at limit **
   6  Prefactor     .10000E-03    28.155        .18142E-02** at limit **
   7  Prefactor     .10000E-03    5.4040        .18142E-02** at limit **
   8  norm          4.4714        1.6898        .60742E-04    .28449E-03
   9  Prefactor     3.8924        6.0437        .10223E-02   -.96073E-04
  10  Prefactor     3.5279        2.8976        .11747E-03    .10404E-03
  11  Prefactor     18.971        9.4130        .91978E-04    .22879E-03
  12  Prefactor     .20805E-01    8.7093        .55082E-01    .14988E-03
  13  norm          .85065        .68809        .42420E-04    .96453E-03
  14  Prefactor     .30328        77.611        .38421E-02   -.12262E-03
  15  norm          1.0277        1.5574        .11567E-03    .42419E-04
  16  Prefactor     .10000E-03    18.635        .18142E-02** at limit **
  17  norm          1.4582        30.069        .35738E-03   -.44345E-04
  18  Normalizat    1.0906        .22545        .26252E-03   -.66344E-04
  19  Prefactor     .91871        .17748        .23827E-03    .78092E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100002
  Prefactor  = 0.000100028
  norm       = 28.4575
  Prefactor  = 7.93806
  Prefactor  = 0.000100058
  Prefactor  = 0.000100004
  Prefactor  = 0.0001
  norm       = 4.47135
  Prefactor  = 3.89239
  Prefactor  = 3.52785
  Prefactor  = 18.9714
  Prefactor  = 0.0208055
  norm       = 0.850655
  Prefactor  = 0.303278
  norm       = 1.02771
  Prefactor  = 0.0001
  norm       = 1.45815
  Normalizat = 1.09063
  Prefactor  = 0.918711
 **********
 **   18 **HESSE 
 **********

 FCN=   6464.821     FROM HESSE     STATUS=OK           274 CALLS     2330 TOTAL
                     EDM=   .47E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    11.246        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10003E-03    23.776        .12302       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          28.458        17.291        .15016E-04   -1.4641    
   4  Prefactor     7.9381        10.456        .56972E-05   -1.5144    
   5  Prefactor     .10006E-03    534.68        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    28.155        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    5.4041        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          4.4714        1.6895        .24297E-05   -1.5285    
   9  Prefactor     3.8924        6.0395        .40892E-04   -1.5313    
  10  Prefactor     3.5279        2.8968        .46986E-05   -1.5332    
  11  Prefactor     18.971        9.4125        .36791E-05   -1.4837    
  12  Prefactor     .20805E-01    7.9612        .58068E-01   -1.5679    
  13  norm          .85065        .62582        .16968E-05   -1.5524    
  14  Prefactor     .30328        64.543        .15369E-03   -1.5598    
  15  norm          1.0277        1.5569        .23135E-04   -1.5505    
  16  Prefactor     .10000E-03    18.641        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          1.4582        30.046        .14295E-04   -1.5466    
  18  Normalizat    1.0906        .22558        .10501E-04   -.90053    
  19  Prefactor     .91871        .17759        .47653E-04   -.95490    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.71096e-09
Minuit parameter uncertainties:
  1  0.00028565
  2  0.00164203
  3  17.2941
  4  10.4587
  5  0.0112802
  6  0.000654824
  7  8.9202e-05
  8  1.68952
  9  6.04047
  10  2.89696
  11  9.41326
  12  0.812121
  13  0.625825
  14  8.85682
  15  1.55696
  16  0.000135656
  17  13.2453
  18  0.225776
  19  0.177701
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.528e+00  2.897e+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:  9.187e-01  1.777e-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.091e+00  2.258e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.87
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 4.26e-08 +/- 3.50e-08
Energy Flux (Fixed Index): 1.46e-05 +/- 1.20e-05

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

Saving results to:
/scratch/kocevski/67971/likelihoodResults_514339201_514598401_4FGL_J1040.5+0617_daily_bin1061.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) = 6464.81202159
delta logL = 0.00883338603944

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6464.81039559
delta logL = 0.0104593812093

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.6897       1.0000         .10000E-03   10000.    
     2 'Index     '    2.2612       1.0000          .0000       10.000    
     3 'Normalizat'    1.0962       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .91568       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=   6464.810     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      203 TOTAL
                     EDM=   .48E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.6902        75.373        .52564E-02    .18150E-03
   2  Index         2.2611        6.0554        .24475        .24494E-04
   3  Normalizat    1.0963        .86557E-01    .59226E-01    .10754E-04
   4  Prefactor     .91563        .53651E-01    .45205E-01    .10667E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.69022
  Index      = 2.26112
  Normalizat = 1.09631
  Prefactor  = 0.915629
 **********
 **   18 **HESSE 
 **********

 FCN=   6464.810     FROM HESSE     STATUS=OK            33 CALLS      236 TOTAL
                     EDM=   .48E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.6902        3.1949        .12209E-03   -1.5324    
   2  Index         2.2611        .73221        .86449E-02   -.57970    
   3  Normalizat    1.0963        .21205        .26193E-03   -.89871    
   4  Prefactor     .91563        .17661        .23861E-03   -.95597    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.84963e-13
Minuit parameter uncertainties:
  1  3.1951
  2  0.736002
  3  0.212217
  4  0.176721
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/67971': 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) = 6464.81039551
delta logL = 0.0104594660097

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.690e+00  3.195e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.261e+00  7.360e-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:  9.156e-01  1.767e-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.096e+00  2.122e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.88
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.26 +/- 0.74
Photon Flux (Free Index): 3.84e-08 +/- 4.22e-08
Energy Flux (Free Index): 1.55e-05 +/- 1.49e-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/67971/cmap_HighResolution_514339201_514598401_4FGL_J1040.5+0617_daily_bin1061.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.44e-03', comment='SUCCESS', photon_flux='4.26e-08', energy_flux2='1.55e-05', photon_flux_error='3.50e-08', dlogl='1.05e-02', energy_flux='1.46e-05', photon_flux2='3.84e-08', job_status='DONE', time_completed='2021-09-02 08:46:36.085444', photon_index_error2='0.74', photon_index2='2.26', ts='2.87', fit_tolerance='1e-08', GAL='0.92', photon_index_error='0.00', photon_flux_upper_limit='1.22e-07', energy_flux_error2='1.49e-05', EG='1.09', time_epoch_completed='1630597596.09', return_code='0', job_id='67971', GAL2='0.92', EG2='1.10', return_code2='0', energy_flux_error='1.20e-05', photon_flux_error2='4.22e-08', ts2='2.88', photon_index='2.37' WHERE bin_id='1061' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:46:36 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0268>
Subject: Job 67971: <4FGL_J1040.5+0617_daily_bin1061> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1061> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Thu Sep  2 08:31:27 2021
Job was executed on host(s) <bullet0268>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:32:32 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:32:32 2021
Terminated at Thu Sep  2 08:46:36 2021
Results reported at Thu Sep  2 08:46:36 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1061 160.15 6.2848 514339201 514598401 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 :                                   613.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             240.58 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   844 sec.
    Turnaround time :                            909 sec.

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

