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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin415
RA = 160.15, Dec = 6.2848
tmin = 346896001, tmax = 347155201
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='64291', job_status='RUN', time_executed='2021-09-02 08:17:45.121199', time_epoch_executed='1630595865.12' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='415'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64291

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64291/ft1_4FGL_J1040.5+0617_daily_bin415.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64291/ft2_4FGL_J1040.5+0617_daily_bin415.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64291/ft1_4FGL_J1040.5+0617_daily_bin415.fits outfile=/scratch/kocevski/64291/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin415.fits ra=160.15 dec=6.2848 rad=12.0 tmin=346896001.0 tmax=347155201.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.55
user 3.26
sys 0.23

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/64291/ft1_filtered_4FGL_J1040.5+0617_daily_bin415.fits" evtable="EVENTS" scfile=/scratch/kocevski/64291/ft2_4FGL_J1040.5+0617_daily_bin415.fits sctable="SC_DATA" outfile=/scratch/kocevski/64291/ltcube_346896001_347155201_4FGL_J1040.5+0617_daily_bin415.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/64291/ft2_4FGL_J1040.5+0617_daily_bin415.fits
.....................!
real 13.95
user 13.56
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64291/ft1_filtered_4FGL_J1040.5+0617_daily_bin415.fits evtable="EVENTS" scfile=/scratch/kocevski/64291/ft2_4FGL_J1040.5+0617_daily_bin415.fits sctable="SC_DATA" expcube=/scratch/kocevski/64291/ltcube_346896001_347155201_4FGL_J1040.5+0617_daily_bin415.fits outfile=/scratch/kocevski/64291/expmap_346896001_347155201_4FGL_J1040.5+0617_daily_bin415.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/64291/ltcube_346896001_347155201_4FGL_J1040.5+0617_daily_bin415.fits
.....................!
real 192.05
user 185.51
sys 6.03

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/64291/ft1_filtered_4FGL_J1040.5+0617_daily_bin415.fits scfile=/scratch/kocevski/64291/ft2_4FGL_J1040.5+0617_daily_bin415.fits outfile=/scratch/kocevski/64291/cmap_346896001_347155201_4FGL_J1040.5+0617_daily_bin415.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.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/64291/ft1_filtered_4FGL_J1040.5+0617_daily_bin415.fits scfile=/scratch/kocevski/64291/ft2_4FGL_J1040.5+0617_daily_bin415.fits outfile=/scratch/kocevski/64291/cmap_HighResolution_346896001_347155201_4FGL_J1040.5+0617_daily_bin415.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.39
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .31882E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10016E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    11.892       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .19369E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .46581E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    4.4555       1.0000         .10000E-03   10000.    
     8 'norm      '    .20336       1.0000         .10000E-03   10000.    
     9 'Prefactor '    5.8193       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    3.3196       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10114E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    13.075       1.0000         .10000E-03   10000.    
    15 'norm      '    .51722       1.0000         .10000E-03   10000.    
    16 'Prefactor '    19.760       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1129       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .94922       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=   5643.153     FROM MIGRAD    STATUS=CONVERGED    679 CALLS     2747 TOTAL
                     EDM=   .25E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    5.9199        .17809E-02** at limit **
   2  Prefactor     .10002E-03    361.93        .93850E-02** at limit **
   3  norm          .10000E-03    6.0449        .18018E-02** at limit **
   4  Prefactor     11.883        9.7342        .11617E-03    .54276E-03
   5  Prefactor     .10000E-03    113.61        .18142E-02** at limit **
   6  Prefactor     .10001E-03    152.72        .21192E-02** at limit **
   7  Prefactor     4.4342        12.743        .19076E-03    .11567E-03
   8  norm          .20250        2.1291        .14555E-02    .14034E-02
   9  Prefactor     5.8187        7.0174        .16648E-03    .13767E-03
  10  Prefactor     .10000E-03    1.9768        .20333E-03** at limit **
  11  Prefactor     3.3211        6.3412        .22218E-03   -.48611E-04
  12  Prefactor     .10000E-03    2.9477        .12568E-02** at limit **
  13  norm          .10000E-03    .58633        .80142E-03** at limit **
  14  Prefactor     13.070        8.8374        .11078E-03   -.18247E-03
  15  norm          .51764        1.1435        .11522E-03   -.32096E-03
  16  Prefactor     19.764        18.725        .90102E-04    .40250E-04
  17  norm          .10000E-03    3.0738        .12857E-02** at limit **
  18  Normalizat    1.1128        .22215        .24418E-03    .24390E-03
  19  Prefactor     .94916        .18871        .22960E-03    .12775E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.000100015
  norm       = 0.0001
  Prefactor  = 11.8827
  Prefactor  = 0.000100001
  Prefactor  = 0.000100013
  Prefactor  = 4.43419
  norm       = 0.2025
  Prefactor  = 5.8187
  Prefactor  = 0.0001
  Prefactor  = 3.32108
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 13.0703
  norm       = 0.517644
  Prefactor  = 19.7641
  norm       = 0.0001
  Normalizat = 1.1128
  Prefactor  = 0.949156
 **********
 **   18 **HESSE 
 **********

 FCN=   5643.153     FROM HESSE     STATUS=OK           250 CALLS     2997 TOTAL
                     EDM=   .21E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    5.9209        .35617E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10002E-03    377.01        .37540E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    6.0454        .36036E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     11.883        9.7332        .23233E-04   -1.5018    
   5  Prefactor     .10000E-03    113.64        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10001E-03    152.73        .42384E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     4.4342        12.739        .76306E-05   -1.5287    
   8  norm          .20250        2.1176        .58221E-04   -1.5618    
   9  Prefactor     5.8187        7.0092        .66594E-05   -1.5225    
  10  Prefactor     .10000E-03    1.9768        .40666E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     3.3211        6.3393        .88871E-05   -1.5343    
  12  Prefactor     .10000E-03    2.9479        .25135E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .58720        .16028E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     13.070        8.8305        .44310E-05   -1.4985    
  15  norm          .51764        1.1432        .46089E-05   -1.5564    
  16  Prefactor     19.764        18.722        .36041E-05   -1.4819    
  17  norm          .10000E-03    3.0738        .25715E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.1128        .22225        .48837E-04   -.89342    
  19  Prefactor     .94916        .18881        .91842E-05   -.94444    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.07508e-09
Minuit parameter uncertainties:
  1  2.82226e-05
  2  0.00482993
  3  3.40279e-06
  4  9.73446
  5  0.00076115
  6  0.00283783
  7  12.7464
  8  1.30941
  9  7.01014
  10  3.00642e-06
  11  6.34055
  12  6.87799e-06
  13  2.67378e-05
  14  8.83139
  15  1.14322
  16  18.7275
  17  1.29102e-06
  18  0.222441
  19  0.188936
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  3.006e-06  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.492e-01  1.889e-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.113e+00  2.224e-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: 7.41e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.72e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/64291/likelihoodResults_346896001_347155201_4FGL_J1040.5+0617_daily_bin415.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) = 5643.15517062
delta logL = -0.00241357721916

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5643.15275719
delta logL = -1.47911123349e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3612       1.0000          .0000       10.000    
     3 'Normalizat'    1.1128       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .94920       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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5643.153     FROM MIGRAD    STATUS=FAILED        89 CALLS      244 TOTAL
                     EDM=   .29E-06    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10050E-03    3.0041        .20375E-03** at limit **
   2  Index         2.2977        6.3792        .50000        .18229E-04
   3  Normalizat    1.1128        .21175        .24418E-03   -.96002E-04
   4  Prefactor     .94916        .18645        .22960E-03   -.77490E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5643.153     FROM SIMPLEX   STATUS=PROGRESS     115 CALLS      359 TOTAL
                     EDM=   .99E-05    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10005E-03    3.0041        .13772E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.2978        6.3792        .13295E-02   -.57095    
   3  Normalizat    1.1128        .21175        .99107E-04   -.89342    
   4  Prefactor     .94917        .18645        .96554E-04   -.94444    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5643.153     FROM MIGRAD    STATUS=CONVERGED     38 CALLS      397 TOTAL
                     EDM=   .16E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    2.0471        .40750E-04** at limit **
   2  Index         2.1905        8.8681        .50000       -.11694E-06
   3  Normalizat    1.1128        .21192        .97673E-05   -.84968E-04
   4  Prefactor     .94916        .18662        .91842E-05   -.92096E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.19047
  Normalizat = 1.1128
  Prefactor  = 0.949156
 **********
 **   18 **HESSE 
 **********

 FCN=   5643.153     FROM HESSE     STATUS=OK            29 CALLS      426 TOTAL
                     EDM=   .16E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    2.0284        .81501E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.1905        8.8994        .50000       -.59669    
   3  Normalizat    1.1128        .21203        .19535E-05   -.89342    
   4  Prefactor     .94916        .18671        .18368E-05   -.94444    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.57811e-11
Minuit parameter uncertainties:
  1  5.37475e-07
  2  95.2553
  3  0.212196
  4  0.186841
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64291': 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) = 5643.15275641
delta logL = 6.33271156403e-07

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  5.375e-07  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.190e+00  9.526e+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.492e-01  1.868e-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.113e+00  2.122e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 160.150 6.285

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/64291/cmap_HighResolution_346896001_347155201_4FGL_J1040.5+0617_daily_bin415.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.72e-03', job_status='DONE', photon_flux_upper_limit='7.41e-08', time_completed='2021-09-02 08:28:10.398231', job_id='64291', GAL2='0.95', fit_tolerance='1e-08', EG2='1.11', EG='1.11', time_epoch_completed='1630596490.4', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.95', dlogl='6.33e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='415' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:28:10 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0141>
Subject: Job 64291: <4FGL_J1040.5+0617_daily_bin415> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin415> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Sep  2 08:16:20 2021
Job was executed on host(s) <bullet0141>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:17:28 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:17:28 2021
Terminated at Thu Sep  2 08:28:11 2021
Results reported at Thu Sep  2 08:28:11 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin415 160.15 6.2848 346896001 347155201 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 :                                   622.40 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             355.27 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   642 sec.
    Turnaround time :                            711 sec.

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

