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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1616
RA = 160.15, Dec = 6.2848
tmin = 658195201, tmax = 658454401
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='298545', job_status='RUN', time_executed='2021-12-07 21:13:36.319804', time_epoch_executed='1638940416.32' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1616'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/298545

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/298545/ft1_4FGL_J1040.5+0617_daily_bin1616.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/298545/ft2_4FGL_J1040.5+0617_daily_bin1616.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/298545/ft1_4FGL_J1040.5+0617_daily_bin1616.fits outfile=/scratch/kocevski/298545/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1616.fits ra=160.15 dec=6.2848 rad=12.0 tmin=658195201.0 tmax=658454401.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 4.69
user 4.44
sys 0.23

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/298545/ft1_filtered_4FGL_J1040.5+0617_daily_bin1616.fits" evtable="EVENTS" scfile=/scratch/kocevski/298545/ft2_4FGL_J1040.5+0617_daily_bin1616.fits sctable="SC_DATA" outfile=/scratch/kocevski/298545/ltcube_658195201_658454401_4FGL_J1040.5+0617_daily_bin1616.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/298545/ft2_4FGL_J1040.5+0617_daily_bin1616.fits
.....................!
real 14.37
user 13.98
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/298545/ft1_filtered_4FGL_J1040.5+0617_daily_bin1616.fits evtable="EVENTS" scfile=/scratch/kocevski/298545/ft2_4FGL_J1040.5+0617_daily_bin1616.fits sctable="SC_DATA" expcube=/scratch/kocevski/298545/ltcube_658195201_658454401_4FGL_J1040.5+0617_daily_bin1616.fits outfile=/scratch/kocevski/298545/expmap_658195201_658454401_4FGL_J1040.5+0617_daily_bin1616.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/298545/ltcube_658195201_658454401_4FGL_J1040.5+0617_daily_bin1616.fits
.....................!
real 191.59
user 186.49
sys 4.62

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/298545/ft1_filtered_4FGL_J1040.5+0617_daily_bin1616.fits scfile=/scratch/kocevski/298545/ft2_4FGL_J1040.5+0617_daily_bin1616.fits outfile=/scratch/kocevski/298545/cmap_658195201_658454401_4FGL_J1040.5+0617_daily_bin1616.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.57
user 0.40
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/298545/ft1_filtered_4FGL_J1040.5+0617_daily_bin1616.fits scfile=/scratch/kocevski/298545/ft2_4FGL_J1040.5+0617_daily_bin1616.fits outfile=/scratch/kocevski/298545/cmap_HighResolution_658195201_658454401_4FGL_J1040.5+0617_daily_bin1616.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.58
user 0.41
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10763E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    23.083       1.0000         .10000E-03   10000.    
     3 'norm      '    15.673       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10051E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    21.794       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10362E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    13.545       1.0000         .10000E-03   10000.    
     8 'norm      '    2.2662       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    8.0435       1.0000         .10000E-03   10000.    
    11 'Prefactor '    15.925       1.0000         .10000E-03   10000.    
    12 'Prefactor '    5.8325       1.0000         .10000E-03   10000.    
    13 'norm      '    .47009       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    2.2722       1.0000         .10000E-03   10000.    
    16 'Prefactor '    12.933       1.0000         .10000E-03   10000.    
    17 'norm      '    18.593       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .62620       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1564       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=   6202.813     FROM MIGRAD    STATUS=CONVERGED    371 CALLS     1887 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    7.9106        .58832E-06** at limit **
   2  Prefactor     23.039        35.780       -.73867E-04    .97406E-05
   3  norm          15.670        13.841        .38838E-05    .26208E-04
   4  Prefactor     .10000E-03    3.9371        .33544E-06** at limit **
   5  Prefactor     21.771        50.716       -.42899E-04    .13827E-04
   6  Prefactor     .10000E-03    30.163        .39275E-05** at limit **
   7  Prefactor     13.535        17.003       -.44931E-05    .97405E-05
   8  norm          2.2663        1.3911        .42151E-06    .32913E-03
   9  Prefactor     .10000E-03    2.0737        .86319E-07** at limit **
  10  Prefactor     8.0441        3.6767       -.33385E-06    .75631E-04
  11  Prefactor     15.927        7.0869       -.10246E-05    .70734E-04
  12  Prefactor     5.8339        5.9718       -.17294E-05   -.17999E-02
  13  norm          .47013        .42863       -.28326E-06   -.16264E-02
  14  Prefactor     .10000E-03    10.564       -.96029E-06** at limit **
  15  norm          2.2724        1.2328       -.34504E-06   -.10195E-03
  16  Prefactor     12.932        15.552       -.24512E-05    .13489E-04
  17  norm          18.594        11.921       -.14800E-05    .19142E-04
  18  Normalizat    .62598        .18561        .14432E-04   -.11174E-03
  19  Prefactor     1.1566        .15475       -.92659E-06    .39367E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 23.0387
  norm       = 15.6702
  Prefactor  = 0.0001
  Prefactor  = 21.7711
  Prefactor  = 0.000100002
  Prefactor  = 13.5346
  norm       = 2.26631
  Prefactor  = 0.0001
  Prefactor  = 8.04412
  Prefactor  = 15.9265
  Prefactor  = 5.83388
  norm       = 0.47013
  Prefactor  = 0.0001
  norm       = 2.27242
  Prefactor  = 12.9325
  norm       = 18.5942
  Normalizat = 0.625976
  Prefactor  = 1.15658
 **********
 **   18 **HESSE 
 **********

 FCN=   6202.813     FROM HESSE     STATUS=OK           276 CALLS     2163 TOTAL
                     EDM=   .30E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    7.9555        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     23.039        35.747        .83371E-04   -1.4748    
   3  norm          15.670        13.826        .10117E-03   -1.4916    
   4  Prefactor     .10000E-03    3.9431        .15252E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     21.771        50.900        .85798E-04   -1.4774    
   6  Prefactor     .10000E-03    30.196        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     13.535        16.975        .10883E-03   -1.4972    
   8  norm          2.2663        1.3850        .69603E-04   -1.5407    
   9  Prefactor     .10000E-03    2.0904        .11074E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     8.0441        3.6769        .94946E-04   -1.5141    
  11  Prefactor     15.927        7.1059        .10036E-03   -1.4910    
  12  Prefactor     5.8339        5.9794        .83147E-03   -1.5225    
  13  norm          .47013        .40707        .46747E-03   -1.5571    
  14  Prefactor     .10000E-03    10.746        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          2.2724        1.2294        .61085E-04   -1.5406    
  16  Prefactor     12.932        15.547        .11138E-03   -1.4989    
  17  norm          18.594        11.929        .92886E-04   -1.4845    
  18  Normalizat    .62598        .20808        .30582E-03   -1.0689    
  19  Prefactor     1.1566        .17476        .20820E-03   -.87678    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.02862e-09
Minuit parameter uncertainties:
  1  9.29859e-05
  2  35.7807
  3  13.829
  4  7.81661e-05
  5  51.0021
  6  0.000452507
  7  16.9806
  8  1.38502
  9  1.11791e-05
  10  3.67705
  11  7.10631
  12  5.98006
  13  0.407077
  14  8.68782e-05
  15  1.22939
  16  15.5519
  17  11.9305
  18  0.208338
  19  0.174849
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  8.044e+00  3.677e+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.157e+00  1.748e-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:  6.260e-01  2.083e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 8.93
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 9.72e-08 +/- 4.44e-08
Energy Flux (Fixed Index): 3.33e-05 +/- 1.52e-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) = 6201.5493073
delta logL = 1.2640437538

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6201.54071263
delta logL = 1.27263842291

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.9596       1.0000         .10000E-03   10000.    
     2 'Index     '    3.2859       1.0000          .0000       10.000    
     3 'Normalizat'    .54282       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2090       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=   6201.541     FROM MIGRAD    STATUS=CONVERGED     55 CALLS      247 TOTAL
                     EDM=   .36E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.9605        14.801        .59011E-02    .33733E-03
   2  Index         3.2861        2.4645        .82844E-01    .15653E-03
   3  Normalizat    .54298        .79699E-01    .73706E-01    .41675E-04
   4  Prefactor     1.2090        .65060E-01    .34422E-01    .69500E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.96055
  Index      = 3.28609
  Normalizat = 0.542977
  Prefactor  = 1.20901
 **********
 **   18 **HESSE 
 **********

 FCN=   6201.541     FROM HESSE     STATUS=OK            33 CALLS      280 TOTAL
                     EDM=   .18E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.9605        4.8373        .48167E-04   -1.5364    
   2  Index         3.2861        1.0175        .34425E-02   -.34988    
   3  Normalizat    .54298        .20242        .32632E-03   -1.1046    
   4  Prefactor     1.2090        .17891        .20421E-03   -.86055    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.81169e-08
Minuit parameter uncertainties:
  1  4.83795
  2  1.02564
  3  0.202694
  4  0.179003
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/298545': 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) = 6201.54070824
delta logL = 1.27264281581

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.961e+00  4.838e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.286e+00  1.026e+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.209e+00  1.790e-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:  5.430e-01  2.027e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 11.94
Ra Dec: 160.150 6.285
Photon Index (Free Index): 3.29 +/- 1.03
Photon Flux (Free Index): 1.55e-07 +/- 6.50e-08
Energy Flux (Free Index): 2.76e-05 +/- 1.15e-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/298545/cmap_HighResolution_658195201_658454401_4FGL_J1040.5+0617_daily_bin1616.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='9.72e-08', energy_flux2='2.76e-05', photon_flux_error='4.44e-08', dlogl='1.27e+00', energy_flux='3.33e-05', photon_flux2='1.55e-07', job_status='DONE', time_completed='2021-12-07 21:22:37.676713', photon_index_error2='1.03', photon_index2='3.29', ts='8.93', fit_tolerance='1e-08', GAL='1.16', photon_index_error='0.00', energy_flux_error2='1.15e-05', EG='0.63', time_epoch_completed='1638940957.68', return_code='0', job_id='298545', GAL2='1.21', EG2='0.54', return_code2='0', energy_flux_error='1.52e-05', photon_flux_error2='6.50e-08', ts2='11.94', photon_index='2.37' WHERE bin_id='1616' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Dec  7 21:22:37 PST 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0231>
Subject: Job 298545: <4FGL_J1040.5+0617_daily_bin1616> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1616> 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) <bullet0231>, 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:22:38 2021
Results reported at Tue Dec  7 21:22:38 2021

Your job looked like:

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

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

