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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1550
RA = 160.15, Dec = 6.2848
tmin = 641088001, tmax = 641347201
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='70508', job_status='RUN', time_executed='2021-09-02 08:44:23.848201', time_epoch_executed='1630597463.85' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1550'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/70508

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/70508/ft1_4FGL_J1040.5+0617_daily_bin1550.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/70508/ft2_4FGL_J1040.5+0617_daily_bin1550.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/70508/ft1_4FGL_J1040.5+0617_daily_bin1550.fits outfile=/scratch/kocevski/70508/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1550.fits ra=160.15 dec=6.2848 rad=12.0 tmin=641088001.0 tmax=641347201.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.01
user 2.79
sys 0.20

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/70508/ft1_filtered_4FGL_J1040.5+0617_daily_bin1550.fits evtable="EVENTS" scfile=/scratch/kocevski/70508/ft2_4FGL_J1040.5+0617_daily_bin1550.fits sctable="SC_DATA" expcube=/scratch/kocevski/70508/ltcube_641088001_641347201_4FGL_J1040.5+0617_daily_bin1550.fits outfile=/scratch/kocevski/70508/expmap_641088001_641347201_4FGL_J1040.5+0617_daily_bin1550.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/70508/ltcube_641088001_641347201_4FGL_J1040.5+0617_daily_bin1550.fits
.....................!
real 190.28
user 185.81
sys 4.05

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/70508/ft1_filtered_4FGL_J1040.5+0617_daily_bin1550.fits scfile=/scratch/kocevski/70508/ft2_4FGL_J1040.5+0617_daily_bin1550.fits outfile=/scratch/kocevski/70508/cmap_641088001_641347201_4FGL_J1040.5+0617_daily_bin1550.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.54
user 0.38
sys 0.14

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11599E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    41.703       1.0000         .10000E-03   10000.    
     3 'norm      '    8.1564       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .11549E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    34.862       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .11398E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    8.1560       1.0000         .10000E-03   10000.    
     8 'norm      '    1.9600       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.7331       1.0000         .10000E-03   10000.    
    11 'Prefactor '    32.307       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10207E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10259E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10092E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .95640       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0284       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=   5419.523     FROM MIGRAD    STATUS=CONVERGED    384 CALLS     1878 TOTAL
                     EDM=   .62E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10004E-03    5.5887        .20304E-05** at limit **
   2  Prefactor     41.678        58.983       -.34243E-04   -.16863E-05
   3  norm          8.1558        9.2722       -.64704E-07   -.94720E-04
   4  Prefactor     .10000E-03    10.053        .46181E-06** at limit **
   5  Prefactor     34.856        43.363       -.80745E-05   -.28548E-04
   6  Prefactor     .10000E-03    34.940       -.18498E-04** at limit **
   7  Prefactor     8.1486        18.917       -.43463E-05   -.38811E-05
   8  norm          1.9602        1.3599        .15759E-06   -.15757E-02
   9  Prefactor     .10000E-03    2.5836        .14047E-06** at limit **
  10  Prefactor     2.7338        3.2151       -.56413E-06   -.47784E-03
  11  Prefactor     32.311        10.146       -.52854E-06    .17727E-03
  12  Prefactor     .10000E-03    2.2039        .28872E-07** at limit **
  13  norm          .10000E-03    .15412        .19891E-08** at limit **
  14  Prefactor     .10000E-03    4.6184       -.13084E-06** at limit **
  15  norm          .10000E-03    .89076       -.40131E-06** at limit **
  16  Prefactor     .10000E-03    30.900        .18567E-04** at limit **
  17  norm          .10000E-03    19.086       -.80908E-05** at limit **
  18  Normalizat    .95613        .20656        .53544E-05   -.15375E-03
  19  Prefactor     1.0286        .17001       -.33109E-06    .68312E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100042
  Prefactor  = 41.6783
  norm       = 8.15577
  Prefactor  = 0.0001
  Prefactor  = 34.8558
  Prefactor  = 0.0001
  Prefactor  = 8.14855
  norm       = 1.96021
  Prefactor  = 0.0001
  Prefactor  = 2.73379
  Prefactor  = 32.3111
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100001
  norm       = 0.0001
  Normalizat = 0.956128
  Prefactor  = 1.02859
 **********
 **   18 **HESSE 
 **********

 FCN=   5419.523     FROM HESSE     STATUS=OK           272 CALLS     2150 TOTAL
                     EDM=   .29E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10004E-03    20.138        .33189E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     41.678        58.941        .62075E-04   -1.4416    
   3  norm          8.1558        9.2322        .14038E-03   -1.5137    
   4  Prefactor     .10000E-03    10.120        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     34.856        43.276        .67871E-04   -1.4527    
   6  Prefactor     .10000E-03    34.816        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     8.1486        18.849        .14039E-03   -1.5137    
   8  norm          1.9602        1.3558        .34321E-03   -1.5428    
   9  Prefactor     .10000E-03    2.5924        .11555E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     2.7338        3.2074        .13628E-03   -1.5377    
  11  Prefactor     32.311        10.157        .70496E-04   -1.4570    
  12  Prefactor     .10000E-03    2.2066        .10672E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .16276        .56378E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    4.7586        .30884E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    1.4283        .13289E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    31.047        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    19.291        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .95613        .23545        .27178E-03   -.94515    
  19  Prefactor     1.0286        .19609        .22728E-03   -.91782    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.92746e-09
Minuit parameter uncertainties:
  1  0.00184264
  2  59.0238
  3  9.23381
  4  0.000120459
  5  43.3152
  6  0.000213681
  7  18.8626
  8  1.35577
  9  1.7147e-05
  10  3.20762
  11  10.1574
  12  3.43501e-06
  13  1.20411e-06
  14  1.61126e-05
  15  3.96876e-05
  16  0.00026318
  17  7.48125e-05
  18  0.235701
  19  0.196229
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.734e+00  3.208e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.368e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  1.029e+00  1.962e-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:  9.561e-01  2.357e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/70508/likelihoodResults_641088001_641347201_4FGL_J1040.5+0617_daily_bin1550.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) = 5419.33589212
delta logL = 0.187597748983

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5419.33093701
delta logL = 0.192552859228

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.7003       1.0000         .10000E-03   10000.    
     2 'Index     '    2.9287       1.0000          .0000       10.000    
     3 'Normalizat'    .93708       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0396       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=   5419.331     FROM MIGRAD    STATUS=CONVERGED     48 CALLS      238 TOTAL
                     EDM=   .70E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.7003        44.324        .80652E-02    .60913E-03
   2  Index         2.9287        6.4632        .14755        .96416E-04
   3  Normalizat    .93707        .61822E-01    .45374E-01    .13100E-04
   4  Prefactor     1.0396        .53038E-01    .40558E-01    .46985E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.70027
  Index      = 2.92872
  Normalizat = 0.937075
  Prefactor  = 1.03964
 **********
 **   18 **HESSE 
 **********

 FCN=   5419.331     FROM HESSE     STATUS=OK            33 CALLS      271 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.7003        3.4999        .91763E-04   -1.5447    
   2  Index         2.9287        1.2258        .76582E-02   -.42713    
   3  Normalizat    .93707        .22781        .27417E-03   -.95169    
   4  Prefactor     1.0396        .19559        .22619E-03   -.91419    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.08846e-08
Minuit parameter uncertainties:
  1  3.50037
  2  1.24116
  3  0.228047
  4  0.195729
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/70508': 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) = 5419.33093701
delta logL = 0.192552860936

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.700e+00  3.500e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.929e+00  1.241e+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:  1.040e+00  1.957e-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:  9.371e-01  2.280e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.33
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.93 +/- 1.24
Photon Flux (Free Index): 4.89e-08 +/- 5.02e-08
Energy Flux (Free Index): 1.01e-05 +/- 1.11e-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/70508/cmap_HighResolution_641088001_641347201_4FGL_J1040.5+0617_daily_bin1550.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.27e-03', comment='SUCCESS', energy_flux2='1.01e-05', dlogl='1.93e-01', photon_flux2='4.89e-08', job_status='DONE', time_completed='2021-09-02 08:53:35.696191', photon_index_error2='1.24', photon_index2='2.93', ts='0.93', fit_tolerance='1e-08', GAL='1.03', photon_index_error='0.00', photon_flux_upper_limit='1.20e-07', energy_flux_error2='1.11e-05', EG='0.96', time_epoch_completed='1630598015.7', return_code='0', job_id='70508', GAL2='1.04', EG2='0.94', return_code2='0', photon_flux_error2='5.02e-08', ts2='1.33', photon_index='2.37' WHERE bin_id='1550' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:53:35 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0239>
Subject: Job 70508: <4FGL_J1040.5+0617_daily_bin1550> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1550 160.15 6.2848 641088001 641347201 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 :                                   534.33 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             271.13 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   725 sec.
    Turnaround time :                            747 sec.

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

