aklog: Couldn't determine realm of user:aklog: No credentials cache found  while getting realm
/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 19 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 make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

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


Performing analysis on: 4FGL_J1040.5+0617_weekly_bin744
RA = 160.15, Dec = 6.2848
tmin = 688953601, tmax = 689558401
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='969187', job_status='RUN', time_executed='2022-11-08 01:01:11.564226', time_epoch_executed='1667898071.56' WHERE source_name='4FGL J1040.5+0617' and cadence='weekly' and bin_id='744'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/969187

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/969187/ft1_4FGL_J1040.5+0617_weekly_bin744.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/969187/ft2_4FGL_J1040.5+0617_weekly_bin744.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/969187/ft1_4FGL_J1040.5+0617_weekly_bin744.fits outfile=/scratch/kocevski/969187/ft1_filteredMKT_4FGL_J1040.5+0617_weekly_bin744.fits ra=160.15 dec=6.2848 rad=12.0 tmin=688953601.0 tmax=689558401.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 7.60
user 7.31
sys 0.27

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

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

Number of photons that the gtmktime cut: 1303

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/969187/ft1_filtered_4FGL_J1040.5+0617_weekly_bin744.fits" evtable="EVENTS" scfile=/scratch/kocevski/969187/ft2_4FGL_J1040.5+0617_weekly_bin744.fits sctable="SC_DATA" outfile=/scratch/kocevski/969187/ltcube_688953601_689558401_4FGL_J1040.5+0617_weekly_bin744.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/969187/ft2_4FGL_J1040.5+0617_weekly_bin744.fits
.....................!
real 27.12
user 26.75
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/969187/ft1_filtered_4FGL_J1040.5+0617_weekly_bin744.fits evtable="EVENTS" scfile=/scratch/kocevski/969187/ft2_4FGL_J1040.5+0617_weekly_bin744.fits sctable="SC_DATA" expcube=/scratch/kocevski/969187/ltcube_688953601_689558401_4FGL_J1040.5+0617_weekly_bin744.fits outfile=/scratch/kocevski/969187/expmap_688953601_689558401_4FGL_J1040.5+0617_weekly_bin744.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/969187/ltcube_688953601_689558401_4FGL_J1040.5+0617_weekly_bin744.fits
.....................!
real 191.94
user 186.84
sys 4.76

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/969187/ft1_filtered_4FGL_J1040.5+0617_weekly_bin744.fits scfile=/scratch/kocevski/969187/ft2_4FGL_J1040.5+0617_weekly_bin744.fits outfile=/scratch/kocevski/969187/cmap_688953601_689558401_4FGL_J1040.5+0617_weekly_bin744.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.42
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/969187/ft1_filtered_4FGL_J1040.5+0617_weekly_bin744.fits scfile=/scratch/kocevski/969187/ft2_4FGL_J1040.5+0617_weekly_bin744.fits outfile=/scratch/kocevski/969187/cmap_HighResolution_688953601_689558401_4FGL_J1040.5+0617_weekly_bin744.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/969187/ft1_filtered_4FGL_J1040.5+0617_weekly_bin744.fits evtable="EVENTS" scfile=/scratch/kocevski/969187/ft2_4FGL_J1040.5+0617_weekly_bin744.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/969187/Model_4FGL_J1040.5+0617_weekly_bin744.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/969187/ft1_filtered_4FGL_J1040.5+0617_weekly_bin744.fits.....................!
real 118.12
user 116.65
sys 1.25

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/969187/ft1_filtered_4FGL_J1040.5+0617_weekly_bin744.fits', '/scratch/kocevski/969187/ft2_4FGL_J1040.5+0617_weekly_bin744.fits', expMap='/scratch/kocevski/969187/expmap_688953601_689558401_4FGL_J1040.5+0617_weekly_bin744.fits', expCube='/scratch/kocevski/969187/ltcube_688953601_689558401_4FGL_J1040.5+0617_weekly_bin744.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/969187/Model_4FGL_J1040.5+0617_weekly_bin744.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  0.000e+00  1.000e+06 ( 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/969187/ft1_filtered_4FGL_J1040.5+0617_weekly_bin744.fits
Spacecraft file(s): /scratch/kocevski/969187/ft2_4FGL_J1040.5+0617_weekly_bin744.fits
Exposure map: /scratch/kocevski/969187/expmap_688953601_689558401_4FGL_J1040.5+0617_weekly_bin744.fits
Exposure cube: /scratch/kocevski/969187/ltcube_688953601_689558401_4FGL_J1040.5+0617_weekly_bin744.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/969187/Model_4FGL_J1040.5+0617_weekly_bin744.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) = 14434.2094866

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.0336       1.0000          .0000       .10000E+07
     2 'Prefactor '    .31002E-02   1.0000          .0000       .10000E+07
     3 'Prefactor '    .47113E-05   1.0000          .0000       .10000E+07
     4 'Prefactor '    1.0016       1.0000          .0000       .10000E+07
     5 'Prefactor '    17.325       1.0000          .0000       .10000E+07
     6 'Prefactor '    .15159E-02   1.0000          .0000       .10000E+07
     7 'norm      '    2.2050       1.0000          .0000       .10000E+07
     8 'Prefactor '    .20874E-02   1.0000          .0000       .10000E+07
     9 'Prefactor '    .72198E-06   1.0000          .0000       .10000E+07
    10 'Prefactor '    20.419       1.0000          .0000       .10000E+07
    11 'Prefactor '    9.0939       1.0000          .0000       .10000E+07
    12 'norm      '    1.0631       1.0000          .0000       .10000E+07
    13 'norm      '    .83328E-06   1.0000          .0000       .10000E+07
    14 'Prefactor '    .59336E-06   1.0000          .0000       .10000E+07
    15 'norm      '    8.6137       1.0000          .0000       .10000E+07
    16 'Normalizat'    .95683       1.0000         .10000E-01   10.000    
    17 'Prefactor '    1.1232       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5360E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   14434.05     FROM MIGRAD    STATUS=CONVERGED    168 CALLS     1066 TOTAL
                     EDM=   .29E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.0690        6.3241        .12939E-08   -.12071E-03
   2  Prefactor      .0000        11.245       -.17162E-07** at limit **
   3  Prefactor      .0000        2.6504        .35900E-07** at limit **
   4  Prefactor     .62237        392.24        .10544E-05   -.55286E-04
   5  Prefactor     17.431        27.912       -.15573E-06   -.13906E-03
   6  Prefactor      .0000        29.915        .19886E-07** at limit **
   7  norm          2.2027        .94339       -.48845E-08   -.48579E-03
   8  Prefactor     .44301E-01    56.074       -.76446E-06** at limit **
   9  Prefactor      .0000        2.0598       -.33001E-08** at limit **
  10  Prefactor     20.351        5.9429       -.76197E-08   -.18289E-03
  11  Prefactor     9.0520        4.8510       -.93749E-08    .36608E-03
  12  norm          1.0635        .36510       -.18788E-08    .43806E-03
  13  norm           .0000        3.5683        .62799E-07** at limit **
  14  Prefactor      .0000        4.1089       -.22545E-07** at limit **
  15  norm          8.7505        7.6247       -.79452E-08   -.23219E-04
  16  Normalizat    .95731        .15112       -.17622E-06   -.21058E-04
  17  Prefactor     1.1229        .12630        .71409E-07   -.17310E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.06895
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0.622372
  Prefactor  = 17.4308
  Prefactor  = 0
  norm       = 2.20267
  Prefactor  = 0.0443009
  Prefactor  = 0
  Prefactor  = 20.3505
  Prefactor  = 9.05201
  norm       = 1.06352
  norm       = 0
  Prefactor  = 0
  norm       = 8.75047
  Normalizat = 0.957308
  Prefactor  = 1.12289
 **********
 **   18 **HESSE 
 **********

 FCN=   14434.05     FROM HESSE     STATUS=OK           269 CALLS     1335 TOTAL
                     EDM=   .74E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.0690        6.3704        .50185E-03   -1.5668    
   2  Prefactor      .0000        11.257        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        2.6548        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .62237        463.38        .43821E-03   -1.5692    
   5  Prefactor     17.431        28.590        .24035E-03   -1.5624    
   6  Prefactor      .0000        29.684        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          2.2027        .94903        .69252E-03   -1.5678    
   8  Prefactor     .44301E-01    2.1145        .56385E-02   -1.5704    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor      .0000        2.0295        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     20.351        5.9346        .22137E-03   -1.5618    
  11  Prefactor     9.0520        4.8734        .33211E-03   -1.5648    
  12  norm          1.0635        .36917        .92073E-03   -1.5687    
  13  norm           .0000        .47090        .25882E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor      .0000        4.1200        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          8.7505        7.6435        .34131E-03   -1.5649    
  16  Normalizat    .95731        .13361        .45624E-01   -.94475    
  17  Prefactor     1.1229        .10993        .36765E-01   -.88738    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.4157e-08
Minuit parameter uncertainties:
  1  6.37037
  2  1.55825e-06
  3  3.68849e-06
  4  33.9668
  5  28.5902
  6  1.30015e-05
  7  0.949027
  8  0.612124
  9  8.53027e-07
  10  5.93457
  11  4.87345
  12  0.369166
  13  1.52644e-06
  14  1.01459e-06
  15  7.64356
  16  0.133657
  17  0.109954
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  0.000e+00  8.530e-07  0.000e+00  1.000e+06 ( 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.123e+00  1.100e-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.573e-01  1.337e-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: 4.74e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.65e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/969187/likelihoodResults_688953601_689558401_4FGL_J1040.5+0617_weekly_bin744.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) = 14434.0655864
delta logL = -0.0136444291384

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 14434.051942
delta logL = -1.08229869511e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .71054E-08   1.0000          .0000       .10000E+07
     2 'Index     '    2.6830       1.0000          .0000       10.000    
     3 'Normalizat'    .95729       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1229       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.
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   14434.05     FROM MIGRAD    STATUS=CONVERGED     47 CALLS      250 TOTAL
                     EDM=   .69E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        .50094        .30824E-02** at limit **
   2  Index         2.9086        1.0327        .20297E-04     .0000    
   3  Normalizat    .95731        1.2896        .70118E-05    .10205E-03
   4  Prefactor     1.1229        1.1351       -.54994E-05    .15454E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 2.90862
  Normalizat = 0.957308
  Prefactor  = 1.12289
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   14434.05     FROM HESSE     STATUS=FAILED         9 CALLS      259 TOTAL
                     EDM=   .69E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        .50094        .30824E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .95766        2.0058        .20297E-04   -.43155    
   3  Normalizat    .95731        1.2896        .70118E-05   -.94475    
   4  Prefactor     1.1229        1.1351       -.54994E-05   -.88738    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 6.87624e-12
Minuit parameter uncertainties:
  1  3.52689e-06
  2  1.04186
  3  1.33549
  4  1.16106
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/969187': 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): 101
logL (Free Index) = 14434.051942
delta logL = -3.63797880709e-12

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  0.000e+00  3.527e-06  0.000e+00  1.000e+06 ( 1.000e-12)
217        Index:  2.909e+00  1.042e+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.123e+00  1.161e+00  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.573e-01  1.335e+00  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 -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/969187/cmap_HighResolution_688953601_689558401_4FGL_J1040.5+0617_weekly_bin744.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.65e-03', job_status='DONE', photon_flux_upper_limit='4.74e-08', time_completed='2022-11-08 01:14:12.182028', job_id='969187', GAL2='1.12', fit_tolerance='1e-08', EG2='0.96', EG='0.96', time_epoch_completed='1667898852.18', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='1.12', dlogl='-3.64e-12', ts2='0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='744' AND source_name='4FGL J1040.5+0617' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Nov  8 01:14:12 PST 2022


------------------------------------------------------------
Sender: LSF System <lsf@bullet0174>
Subject: Job 969187: <4FGL_J1040.5+0617_weekly_bin744> in cluster <slac> Done

Job <4FGL_J1040.5+0617_weekly_bin744> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Tue Nov  8 01:00:43 2022
Job was executed on host(s) <bullet0174>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Nov  8 01:00:44 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Nov  8 01:00:44 2022
Terminated at Tue Nov  8 01:14:13 2022
Results reported at Tue Nov  8 01:14:13 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_weekly_bin744 160.15 6.2848 688953601 689558401 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 :                                   782.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             368.85 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   808 sec.
    Turnaround time :                            810 sec.

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

