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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1617
RA = 160.15, Dec = 6.2848
tmin = 658454401, tmax = 658713601
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='298546', job_status='RUN', time_executed='2021-12-07 21:13:30.041507', time_epoch_executed='1638940410.04' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1617'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/298546

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/298546/ft1_4FGL_J1040.5+0617_daily_bin1617.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/298546/ft2_4FGL_J1040.5+0617_daily_bin1617.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/298546/ft1_4FGL_J1040.5+0617_daily_bin1617.fits outfile=/scratch/kocevski/298546/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1617.fits ra=160.15 dec=6.2848 rad=12.0 tmin=658454401.0 tmax=658713601.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.05
user 2.82
sys 0.21

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/298546/ft1_filtered_4FGL_J1040.5+0617_daily_bin1617.fits evtable="EVENTS" scfile=/scratch/kocevski/298546/ft2_4FGL_J1040.5+0617_daily_bin1617.fits sctable="SC_DATA" expcube=/scratch/kocevski/298546/ltcube_658454401_658713601_4FGL_J1040.5+0617_daily_bin1617.fits outfile=/scratch/kocevski/298546/expmap_658454401_658713601_4FGL_J1040.5+0617_daily_bin1617.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/298546/ltcube_658454401_658713601_4FGL_J1040.5+0617_daily_bin1617.fits
.....................!
real 198.46
user 191.92
sys 5.70

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/298546/ft1_filtered_4FGL_J1040.5+0617_daily_bin1617.fits scfile=/scratch/kocevski/298546/ft2_4FGL_J1040.5+0617_daily_bin1617.fits outfile=/scratch/kocevski/298546/cmap_658454401_658713601_4FGL_J1040.5+0617_daily_bin1617.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.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/298546/ft1_filtered_4FGL_J1040.5+0617_daily_bin1617.fits scfile=/scratch/kocevski/298546/ft2_4FGL_J1040.5+0617_daily_bin1617.fits outfile=/scratch/kocevski/298546/cmap_HighResolution_658454401_658713601_4FGL_J1040.5+0617_daily_bin1617.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.59
user 0.42
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .30617       1.0000         .10000E-03   10000.    
     2 'Prefactor '    50.424       1.0000         .10000E-03   10000.    
     3 'norm      '    .18374E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .15922E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    37.010       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .22622E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10138E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    3.2542       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .15173E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    11.414       1.0000         .10000E-03   10000.    
    11 'Prefactor '    5.2726       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10791E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.0742       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .14520E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    2.8037       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .11425E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    15.840       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .80858       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1891       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=   9144.519     FROM MIGRAD    STATUS=CONVERGED    407 CALLS     1885 TOTAL
                     EDM=   .89E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .23670        4.2596       -.78770E-06   -.72825E-04
   2  Prefactor     50.405        37.157        .37635E-05    .10221E-05
   3  norm          .10000E-03    8.0699        .41027E-05** at limit **
   4  Prefactor     .10000E-03    1.9615       -.23732E-06** at limit **
   5  Prefactor     37.078        40.394        .49465E-05    .20698E-04
   6  Prefactor     .10000E-03    8.2555       -.43315E-05** at limit **
   7  Prefactor     .10000E-03    2.7373        .64907E-07** at limit **
   8  norm          3.2544        1.2958       -.88537E-08   -.25376E-03
   9  Prefactor     .10000E-03    1.6762       -.75462E-07** at limit **
  10  Prefactor     11.415        3.3366        .36595E-07   -.16973E-03
  11  Prefactor     5.2568        5.5450       -.38228E-06   -.40570E-03
  12  Prefactor     .10000E-03    1.8057        .18622E-06** at limit **
  13  norm          1.0740        .43052        .34003E-07   -.36952E-03
  14  Prefactor     .10000E-03    2.8285        .58737E-07** at limit **
  15  norm          2.8031        1.3007       -.93766E-07   -.66715E-03
  16  Prefactor     .10000E-03    9.7717        .12976E-05** at limit **
  17  norm          15.841        9.7938        .54131E-05   -.28790E-04
  18  Normalizat    .80870        .15848       -.18129E-05    .43067E-04
  19  Prefactor     1.1891        .13436       -.12333E-06   -.44154E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.236701
  Prefactor  = 50.405
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 37.0779
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.25441
  Prefactor  = 0.0001
  Prefactor  = 11.4147
  Prefactor  = 5.25684
  Prefactor  = 0.0001
  norm       = 1.07397
  Prefactor  = 0.0001
  norm       = 2.80305
  Prefactor  = 0.0001
  norm       = 15.8409
  Normalizat = 0.808698
  Prefactor  = 1.18911
 **********
 **   18 **HESSE 
 **********

 FCN=   9144.519     FROM HESSE     STATUS=OK           272 CALLS     2157 TOTAL
                     EDM=   .34E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .23670        53.333        .37390E-02   -1.5611    
   2  Prefactor     50.405        37.137        .56476E-04   -1.4287    
   3  norm          .10000E-03    8.0904        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    1.9655        .13077E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     37.078        40.440        .65879E-04   -1.4489    
   6  Prefactor     .10000E-03    8.2619        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    2.7381        .15451E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          3.2544        1.2942        .65887E-04   -1.5347    
   9  Prefactor     .10000E-03    1.6890        .12088E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     11.415        3.3417        .89584E-04   -1.5032    
  11  Prefactor     5.2568        5.5634        .17504E-03   -1.5249    
  12  Prefactor     .10000E-03    1.8163        .12545E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.0740        .42715        .38075E-04   -1.5501    
  14  Prefactor     .10000E-03    2.8479        .15690E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          2.8031        1.3009        .69134E-04   -1.5373    
  16  Prefactor     .10000E-03    9.8346        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          15.841        9.7557        .10064E-03   -1.4912    
  18  Normalizat    .80870        .18548        .29259E-03   -.99747    
  19  Prefactor     1.1891        .15841        .22275E-03   -.86667    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.41684e-08
Minuit parameter uncertainties:
  1  7.11093
  2  37.1543
  3  1.64804e-05
  4  2.91902e-06
  5  40.4704
  6  7.42406e-06
  7  2.03693e-06
  8  1.29421
  9  1.39717e-06
  10  3.34171
  11  5.56391
  12  2.44186e-06
  13  0.427154
  14  3.71552e-06
  15  1.30093
  16  8.28374e-06
  17  9.75671
  18  0.185622
  19  0.158473
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.141e+01  3.342e+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.189e+00  1.585e-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:  8.087e-01  1.856e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 24.00
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.38e-07 +/- 4.03e-08
Energy Flux (Fixed Index): 4.72e-05 +/- 1.38e-05

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) = 9144.51879127
delta logL = 0.000531267009137

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 9144.518325
delta logL = 0.000997542234472

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    11.289       1.0000         .10000E-03   10000.    
     2 'Index     '    2.3805       1.0000          .0000       10.000    
     3 'Normalizat'    .80726       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1900       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=   9144.518     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      211 TOTAL
                     EDM=   .37E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     11.289        43.223        .29810E-02    .17082E-02
   2  Index         2.3805        2.4464        .10156        .34303E-03
   3  Normalizat    .80725        .11270        .66190E-01   -.42173E-03
   4  Prefactor     1.1901        .84084E-01    .50370E-01   -.39518E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 11.2885
  Index      = 2.38055
  Normalizat = 0.807252
  Prefactor  = 1.19006
 **********
 **   18 **HESSE 
 **********

 FCN=   9144.518     FROM HESSE     STATUS=OK            31 CALLS      242 TOTAL
                     EDM=   .60E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     11.289        4.4958        .88945E-04   -1.5036    
   2  Index         2.3805        .29249        .41857E-02   -.55141    
   3  Normalizat    .80725        .17654        .29283E-03   -.99800    
   4  Prefactor     1.1901        .15798        .22268E-03   -.86638    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.01698e-10
Minuit parameter uncertainties:
  1  4.49592
  2  0.29272
  3  0.176666
  4  0.158044
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/298546': 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) = 9144.518325
delta logL = 0.00099754339135

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.129e+01  4.496e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.381e+00  2.927e-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:  1.190e+00  1.580e-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:  8.073e-01  1.767e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 23.86
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.38 +/- 0.29
Photon Flux (Free Index): 1.39e-07 +/- 4.54e-08
Energy Flux (Free Index): 4.67e-05 +/- 1.80e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/298546/cmap_HighResolution_658454401_658713601_4FGL_J1040.5+0617_daily_bin1617.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.38e-07', energy_flux2='4.67e-05', photon_flux_error='4.03e-08', dlogl='9.98e-04', energy_flux='4.72e-05', photon_flux2='1.39e-07', job_status='DONE', time_completed='2021-12-07 21:24:34.718073', photon_index_error2='0.29', photon_index2='2.38', ts='24.00', fit_tolerance='1e-08', GAL='1.19', photon_index_error='0.00', energy_flux_error2='1.80e-05', EG='0.81', time_epoch_completed='1638941074.72', return_code='0', job_id='298546', GAL2='1.19', EG2='0.81', return_code2='0', energy_flux_error='1.38e-05', photon_flux_error2='4.54e-08', ts2='23.86', photon_index='2.37' WHERE bin_id='1617' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Dec  7 21:24:34 PST 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0294>
Subject: Job 298546: <4FGL_J1040.5+0617_daily_bin1617> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1617> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Tue Dec  7 21:10:14 2021
Job was executed on host(s) <bullet0294>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Dec  7 21:10:46 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Dec  7 21:10:46 2021
Terminated at Tue Dec  7 21:24:35 2021
Results reported at Tue Dec  7 21:24:35 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1617 160.15 6.2848 658454401 658713601 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 :                                   661.53 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             282.66 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   829 sec.
    Turnaround time :                            861 sec.

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

