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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin975
RA = 160.15, Dec = 6.2848
tmin = 492048001, tmax = 492307201
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='67000', job_status='RUN', time_executed='2021-09-02 08:30:08.417715', time_epoch_executed='1630596608.42' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='975'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/67000

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/67000/ft1_4FGL_J1040.5+0617_daily_bin975.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/67000/ft2_4FGL_J1040.5+0617_daily_bin975.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/67000/ft1_4FGL_J1040.5+0617_daily_bin975.fits outfile=/scratch/kocevski/67000/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin975.fits ra=160.15 dec=6.2848 rad=12.0 tmin=492048001.0 tmax=492307201.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.74
user 3.50
sys 0.22

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/67000/ft1_filtered_4FGL_J1040.5+0617_daily_bin975.fits" evtable="EVENTS" scfile=/scratch/kocevski/67000/ft2_4FGL_J1040.5+0617_daily_bin975.fits sctable="SC_DATA" outfile=/scratch/kocevski/67000/ltcube_492048001_492307201_4FGL_J1040.5+0617_daily_bin975.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/67000/ft2_4FGL_J1040.5+0617_daily_bin975.fits
.....................!
real 16.46
user 16.00
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/67000/ft1_filtered_4FGL_J1040.5+0617_daily_bin975.fits evtable="EVENTS" scfile=/scratch/kocevski/67000/ft2_4FGL_J1040.5+0617_daily_bin975.fits sctable="SC_DATA" expcube=/scratch/kocevski/67000/ltcube_492048001_492307201_4FGL_J1040.5+0617_daily_bin975.fits outfile=/scratch/kocevski/67000/expmap_492048001_492307201_4FGL_J1040.5+0617_daily_bin975.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/67000/ltcube_492048001_492307201_4FGL_J1040.5+0617_daily_bin975.fits
.....................!
real 193.41
user 187.29
sys 5.66

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/67000/ft1_filtered_4FGL_J1040.5+0617_daily_bin975.fits scfile=/scratch/kocevski/67000/ft2_4FGL_J1040.5+0617_daily_bin975.fits outfile=/scratch/kocevski/67000/cmap_492048001_492307201_4FGL_J1040.5+0617_daily_bin975.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 1.96
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/67000/ft1_filtered_4FGL_J1040.5+0617_daily_bin975.fits scfile=/scratch/kocevski/67000/ft2_4FGL_J1040.5+0617_daily_bin975.fits outfile=/scratch/kocevski/67000/cmap_HighResolution_492048001_492307201_4FGL_J1040.5+0617_daily_bin975.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.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.2365       1.0000         .10000E-03   10000.    
     2 'Prefactor '    22.525       1.0000         .10000E-03   10000.    
     3 'norm      '    .27894E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    113.23       1.0000         .10000E-03   10000.    
     6 'Prefactor '    33.395       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10619E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.6813       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    6.9268       1.0000         .10000E-03   10000.    
    11 'Prefactor '    27.164       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.8930       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .78647E-01   1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    38.646       1.0000         .10000E-03   10000.    
    17 'norm      '    5.4075       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.7201       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .69167       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=   5491.036     FROM MIGRAD    STATUS=CONVERGED    711 CALLS     2556 TOTAL
                     EDM=   .21E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.2454        29.236        .40373E-03    .12086E-04
   2  Prefactor     22.483        28.918        .84397E-04   -.94293E-05
   3  norm          .10000E-03    109.16        .55733E-02** at limit **
   4  Prefactor     .10000E-03    5.8363        .17441E-02** at limit **
   5  Prefactor     113.20        87.487        .37806E-04    .27425E-04
   6  Prefactor     33.318        56.605        .69341E-04   -.31053E-04
   7  Prefactor     .10000E-03    16.856        .18142E-02** at limit **
   8  norm          2.6815        1.4302        .61805E-04   -.14844E-03
   9  Prefactor     .10000E-03    3.6788        .13754E-02** at limit **
  10  Prefactor     6.9259        5.7942        .15181E-03   -.49127E-04
  11  Prefactor     27.153        17.461        .76865E-04   -.23221E-04
  12  Prefactor     .10000E-03    7.4386        .18142E-02** at limit **
  13  norm          1.8954        1.0553        .39787E-04    .68692E-03
  14  Prefactor     .23949E-01    38.029        .60800E-01    .11244E-03
  15  norm          .10000E-03    1.0199        .14364E-03** at limit **
  16  Prefactor     38.677        45.503        .64474E-04    .70531E-07
  17  norm          5.4181        21.007        .17281E-03   -.10066E-04
  18  Normalizat    1.7208        .31082        .26472E-03   -.65674E-04
  19  Prefactor     .69102        .22599        .30683E-03    .66322E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.24537
  Prefactor  = 22.4827
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 113.203
  Prefactor  = 33.3183
  Prefactor  = 0.0001
  norm       = 2.68152
  Prefactor  = 0.0001
  Prefactor  = 6.92589
  Prefactor  = 27.1533
  Prefactor  = 0.0001
  norm       = 1.89543
  Prefactor  = 0.0239486
  norm       = 0.0001
  Prefactor  = 38.6774
  norm       = 5.41809
  Normalizat = 1.72078
  Prefactor  = 0.691017
 **********
 **   18 **HESSE 
 **********

 FCN=   5491.036     FROM HESSE     STATUS=OK           260 CALLS     2816 TOTAL
                     EDM=   .12E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.2454        29.115        .80746E-04   -1.5485    
   2  Prefactor     22.483        28.917        .33759E-05   -1.4759    
   3  norm          .10000E-03    111.04        .22293E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    5.8363        .34883E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     113.20        87.309        .75611E-05   -1.3576    
   6  Prefactor     33.318        56.588        .13868E-04   -1.4553    
   7  Prefactor     .10000E-03    16.857        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.6815        1.4301        .24722E-05   -1.5380    
   9  Prefactor     .10000E-03    3.6802        .27509E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     6.9259        5.7938        .60723E-05   -1.5182    
  11  Prefactor     27.153        17.460        .30746E-05   -1.4665    
  12  Prefactor     .10000E-03    7.4399        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.8954        1.0093        .15915E-05   -1.5433    
  14  Prefactor     .23949E-01    24.547        .74442E-01   -1.5677    
  15  norm          .10000E-03    1.0199        .28728E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     38.677        45.481        .12895E-04   -1.4463    
  17  norm          5.4181        21.007        .69123E-05   -1.5242    
  18  Normalizat    1.7208        .31101        .52943E-04   -.71750    
  19  Prefactor     .69102        .22617        .12273E-04   -1.0388    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.19372e-10
Minuit parameter uncertainties:
  1  12.0493
  2  28.935
  3  0.000137912
  4  1.86199e-05
  5  87.408
  6  56.679
  7  7.89006e-05
  8  1.43014
  9  2.06289e-06
  10  5.79431
  11  17.4629
  12  1.49155e-05
  13  1.00932
  14  1.53088
  15  2.53693e-06
  16  45.5217
  17  21.0354
  18  0.311362
  19  0.22647
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  6.926e+00  5.794e+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:  6.910e-01  2.265e-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.721e+00  3.114e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.88
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 8.37e-08 +/- 7.00e-08
Energy Flux (Fixed Index): 2.86e-05 +/- 2.40e-05

TS (Fixed Index): 1.88
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 2.21e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.71e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/67000/likelihoodResults_492048001_492307201_4FGL_J1040.5+0617_daily_bin975.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) = 5490.67854213
delta logL = 0.357138197032

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5490.66016559
delta logL = 0.375514728937

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.5509       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0531       1.0000          .0000       10.000    
     3 'Normalizat'    1.6624       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .72848       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=   5490.660     FROM MIGRAD    STATUS=CONVERGED     55 CALLS      248 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.5457        46.408        .53623E-02    .34021E-03
   2  Index         3.0539        3.2472        .14689        .10097E-03
   3  Normalizat    1.6626        .81415E-01    .60646E-01   -.10123E-05
   4  Prefactor     .72837        .63093E-01    .67693E-01   -.71616E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.54566
  Index      = 3.05392
  Normalizat = 1.66256
  Prefactor  = 0.72837
 **********
 **   18 **HESSE 
 **********

 FCN=   5490.660     FROM HESSE     STATUS=OK            33 CALLS      281 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.5457        6.8652        .91835E-04   -1.5331    
   2  Index         3.0539        1.1863        .52655E-02   -.39978    
   3  Normalizat    1.6626        .30129        .26819E-03   -.73307    
   4  Prefactor     .72837        .23049        .29952E-03   -1.0243    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.18508e-08
Minuit parameter uncertainties:
  1  6.86673
  2  1.19978
  3  0.301618
  4  0.230795
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/67000': 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) = 5490.66016488
delta logL = 0.375515439701

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.546e+00  6.867e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.054e+00  1.200e+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:  7.284e-01  2.308e-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.663e+00  3.016e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.70
Ra Dec: 160.150 6.285
Photon Index (Free Index): 3.05 +/- 1.20
Photon Flux (Free Index): 1.25e-07 +/- 9.27e-08
Energy Flux (Free Index): 2.44e-05 +/- 1.93e-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/67000/cmap_HighResolution_492048001_492307201_4FGL_J1040.5+0617_daily_bin975.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.71e-02', comment='SUCCESS', photon_flux='8.37e-08', energy_flux2='2.44e-05', photon_flux_error='7.00e-08', dlogl='3.76e-01', energy_flux='2.86e-05', photon_flux2='1.25e-07', job_status='DONE', time_completed='2021-09-02 08:40:07.747739', photon_index_error2='1.20', photon_index2='3.05', ts='1.88', fit_tolerance='1e-08', GAL='0.69', photon_index_error='0.00', photon_flux_upper_limit='2.21e-07', energy_flux_error2='1.93e-05', EG='1.72', time_epoch_completed='1630597207.75', return_code='0', job_id='67000', GAL2='0.73', EG2='1.66', return_code2='0', energy_flux_error='2.40e-05', photon_flux_error2='9.27e-08', ts2='2.70', photon_index='2.37' WHERE bin_id='975' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:40:07 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0024>
Subject: Job 67000: <4FGL_J1040.5+0617_daily_bin975> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin975> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Thu Sep  2 08:26:42 2021
Job was executed on host(s) <bullet0024>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:26:52 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:26:52 2021
Terminated at Thu Sep  2 08:40:08 2021
Results reported at Thu Sep  2 08:40:08 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin975 160.15 6.2848 492048001 492307201 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 :                                   595.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             309.72 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   796 sec.
    Turnaround time :                            806 sec.

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

