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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1234
RA = 160.15, Dec = 6.2848
tmin = 559180801, tmax = 559440001
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='69187', job_status='RUN', time_executed='2021-09-02 08:37:02.057621', time_epoch_executed='1630597022.06' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1234'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/69187

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/69187/ft1_4FGL_J1040.5+0617_daily_bin1234.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/69187/ft2_4FGL_J1040.5+0617_daily_bin1234.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/69187/ft1_4FGL_J1040.5+0617_daily_bin1234.fits outfile=/scratch/kocevski/69187/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1234.fits ra=160.15 dec=6.2848 rad=12.0 tmin=559180801.0 tmax=559440001.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.63
user 3.37
sys 0.21

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/69187/ft1_filtered_4FGL_J1040.5+0617_daily_bin1234.fits evtable="EVENTS" scfile=/scratch/kocevski/69187/ft2_4FGL_J1040.5+0617_daily_bin1234.fits sctable="SC_DATA" expcube=/scratch/kocevski/69187/ltcube_559180801_559440001_4FGL_J1040.5+0617_daily_bin1234.fits outfile=/scratch/kocevski/69187/expmap_559180801_559440001_4FGL_J1040.5+0617_daily_bin1234.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/69187/ltcube_559180801_559440001_4FGL_J1040.5+0617_daily_bin1234.fits
.....................!
real 193.70
user 187.68
sys 4.04

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/69187/ft1_filtered_4FGL_J1040.5+0617_daily_bin1234.fits scfile=/scratch/kocevski/69187/ft2_4FGL_J1040.5+0617_daily_bin1234.fits outfile=/scratch/kocevski/69187/cmap_559180801_559440001_4FGL_J1040.5+0617_daily_bin1234.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.40
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/69187/ft1_filtered_4FGL_J1040.5+0617_daily_bin1234.fits scfile=/scratch/kocevski/69187/ft2_4FGL_J1040.5+0617_daily_bin1234.fits outfile=/scratch/kocevski/69187/cmap_HighResolution_559180801_559440001_4FGL_J1040.5+0617_daily_bin1234.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.57
user 0.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10229E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10211E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10064E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    64.347       1.0000         .10000E-03   10000.    
     5 'Prefactor '    26.112       1.0000         .10000E-03   10000.    
     6 'Prefactor '    4.3236       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    3.4456       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .13420E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .12466E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    2.1962       1.0000         .10000E-03   10000.    
    16 'Prefactor '    57.872       1.0000         .10000E-03   10000.    
    17 'norm      '    12.520       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .79402       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2726       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=   1972.458     FROM MIGRAD    STATUS=CONVERGED    385 CALLS     2136 TOTAL
                     EDM=   .13E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    17.902        .15094E-05** at limit **
   2  Prefactor     .10000E-03    117.03        .10720E-04** at limit **
   3  norm          .10003E-03    60.045        .16602E-05** at limit **
   4  Prefactor     64.350        86.108       -.27563E-04    .33319E-04
   5  Prefactor     26.250        484.05       -.15068E-04    .38743E-04
   6  Prefactor     3.7811        7693.8        .12384E-03    .15830E-04
   7  Prefactor     .10002E-03    41.383       -.74394E-05** at limit **
   8  norm          3.4445        5.4821        .21297E-05   -.36566E-03
   9  Prefactor     .10000E-03    59.669       -.23433E-05** at limit **
  10  Prefactor     .10000E-03    2.7703       -.18596E-07** at limit **
  11  Prefactor     .10000E-03    6.1878       -.23005E-07** at limit **
  12  Prefactor     .10000E-03    11.064       -.67734E-07** at limit **
  13  norm          .10000E-03    .63879       -.75106E-08** at limit **
  14  Prefactor     .10000E-03    39.736        .18324E-05** at limit **
  15  norm          2.1963        2.2501       -.25885E-07    .10314E-03
  16  Prefactor     57.850        68.560       -.60224E-05   -.50061E-04
  17  norm          12.521        26.133       -.11615E-05   -.28606E-05
  18  Normalizat    .79412        .37885        .42098E-05    .73323E-04
  19  Prefactor     1.2725        .31566        .10995E-05    .76346E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100003
  Prefactor  = 0.000100003
  norm       = 0.000100034
  Prefactor  = 64.3497
  Prefactor  = 26.2496
  Prefactor  = 3.78105
  Prefactor  = 0.000100018
  norm       = 3.44447
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 2.19628
  Prefactor  = 57.8499
  norm       = 12.5212
  Normalizat = 0.794122
  Prefactor  = 1.27254
 **********
 **   18 **HESSE 
 **********

 FCN=   1972.458     FROM HESSE     STATUS=OK           262 CALLS     2398 TOTAL
                     EDM=   .21E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    17.964        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    117.20        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10003E-03    60.619        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     64.350        95.720        .25014E-03   -1.4102    
   5  Prefactor     26.250        502.33        .78395E-04   -1.4683    
   6  Prefactor     3.7811        8459.5        .19373E-02   -1.5319    
   7  Prefactor     .10002E-03    41.248        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          3.4445        5.4879        .62983E-03   -1.5337    
   9  Prefactor     .10000E-03    59.925        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    2.7739        .72189E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    6.2292        .10785E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    11.086        .14430E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .63964        .34667E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    40.236        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          2.1963        2.2459        .62858E-04   -1.5412    
  16  Prefactor     57.850        68.743        .52735E-04   -1.4185    
  17  norm          12.521        26.154        .11321E-03   -1.5000    
  18  Normalizat    .79412        .45706        .32337E-03   -1.0029    
  19  Prefactor     1.2725        .38206        .23081E-03   -.84127    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.10696e-09
Minuit parameter uncertainties:
  1  0.000433777
  2  0.00120368
  3  0.00287191
  4  95.9502
  5  231.944
  6  389.68
  7  0.00172029
  8  5.48867
  9  0.000199479
  10  1.72653e-05
  11  1.61054e-05
  12  3.01646e-05
  13  2.55259e-07
  14  8.41577e-05
  15  2.24595
  16  68.8372
  17  26.1776
  18  0.459299
  19  0.382902
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  1.727e-05  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.273e+00  3.829e-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:  7.941e-01  4.593e-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: 1.74e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.34e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/69187/likelihoodResults_559180801_559440001_4FGL_J1040.5+0617_daily_bin1234.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) = 1972.45955126
delta logL = -0.00155650845159

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 1972.45799474
delta logL = 1.94427229872e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3627       1.0000          .0000       10.000    
     3 'Normalizat'    .79409       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2726       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=   1972.458     FROM MIGRAD    STATUS=CONVERGED     98 CALLS      253 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    6.3595        .72288E-03** at limit **
   2  Index         2.0851        6.0068        .50000        .23104E-06
   3  Normalizat    .79412        .41858        .32337E-03   -.60645E-06
   4  Prefactor     1.2725        .37193        .23081E-03    .34355E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Index      = 2.08515
  Normalizat = 0.794121
  Prefactor  = 1.27254
 **********
 **   18 **HESSE 
 **********

 FCN=   1972.458     FROM HESSE     STATUS=OK            29 CALLS      282 TOTAL
                     EDM=   .48E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    2.9400        .14458E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0851        5.6614        .50000       -.62238    
   3  Normalizat    .79412        .41899        .12935E-04   -1.0029    
   4  Prefactor     1.2725        .37230        .92326E-05   -.84127    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.78869e-10
Minuit parameter uncertainties:
  1  0.000107386
  2  159.277
  3  0.420707
  4  0.373079
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/69187': 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) = 1972.4579941
delta logL = 6.56363681628e-07

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  1.074e-04  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.085e+00  1.593e+02  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.273e+00  3.731e-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:  7.941e-01  4.207e-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/69187/cmap_HighResolution_559180801_559440001_4FGL_J1040.5+0617_daily_bin1234.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.34e-02', job_status='DONE', photon_flux_upper_limit='1.74e-07', time_completed='2021-09-02 08:43:59.798082', job_id='69187', GAL2='1.27', fit_tolerance='1e-08', EG2='0.79', EG='0.79', time_epoch_completed='1630597439.8', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.27', dlogl='6.56e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='1234' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:43:59 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0238>
Subject: Job 69187: <4FGL_J1040.5+0617_daily_bin1234> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1234> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Thu Sep  2 08:36:34 2021
Job was executed on host(s) <bullet0238>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:36:41 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:36:41 2021
Terminated at Thu Sep  2 08:44:00 2021
Results reported at Thu Sep  2 08:44:00 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1234 160.15 6.2848 559180801 559440001 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 :                                   407.02 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             339.76 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   439 sec.
    Turnaround time :                            446 sec.

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

