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


Performing analysis on: 4FGL_J1040.5+0617_weekly_bin714
RA = 160.15, Dec = 6.2848
tmin = 670809601, tmax = 671414401
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='424218', job_status='RUN', time_executed='2022-04-12 01:12:50.462201', time_epoch_executed='1649751170.46' WHERE source_name='4FGL J1040.5+0617' and cadence='weekly' and bin_id='714'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/424218

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/424218/ft1_4FGL_J1040.5+0617_weekly_bin714.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/424218/ft2_4FGL_J1040.5+0617_weekly_bin714.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/424218/ft1_4FGL_J1040.5+0617_weekly_bin714.fits outfile=/scratch/kocevski/424218/ft1_filteredMKT_4FGL_J1040.5+0617_weekly_bin714.fits ra=160.15 dec=6.2848 rad=12.0 tmin=670809601.0 tmax=671414401.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 11.59
user 11.22
sys 0.33

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

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

Number of photons that the gtmktime cut: 1121

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/424218/ft1_filtered_4FGL_J1040.5+0617_weekly_bin714.fits evtable="EVENTS" scfile=/scratch/kocevski/424218/ft2_4FGL_J1040.5+0617_weekly_bin714.fits sctable="SC_DATA" expcube=/scratch/kocevski/424218/ltcube_670809601_671414401_4FGL_J1040.5+0617_weekly_bin714.fits outfile=/scratch/kocevski/424218/expmap_670809601_671414401_4FGL_J1040.5+0617_weekly_bin714.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/424218/ltcube_670809601_671414401_4FGL_J1040.5+0617_weekly_bin714.fits
.....................!
real 190.26
user 185.90
sys 4.06

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/424218/ft1_filtered_4FGL_J1040.5+0617_weekly_bin714.fits scfile=/scratch/kocevski/424218/ft2_4FGL_J1040.5+0617_weekly_bin714.fits outfile=/scratch/kocevski/424218/cmap_670809601_671414401_4FGL_J1040.5+0617_weekly_bin714.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.39
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/424218/ft1_filtered_4FGL_J1040.5+0617_weekly_bin714.fits scfile=/scratch/kocevski/424218/ft2_4FGL_J1040.5+0617_weekly_bin714.fits outfile=/scratch/kocevski/424218/cmap_HighResolution_670809601_671414401_4FGL_J1040.5+0617_weekly_bin714.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=160.15 yref=6.2848 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.57
user 0.40
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    5.5698       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10031E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    40.601       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10176E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    12.875       1.0000         .10000E-03   10000.    
     8 'norm      '    3.4713       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .41058E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    4.4497       1.0000         .10000E-03   10000.    
    11 'Prefactor '    13.473       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.5808       1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.1924       1.0000         .10000E-03   10000.    
    15 'norm      '    1.8678       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    6.4859       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .84574       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1753       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=   12263.45     FROM MIGRAD    STATUS=CONVERGED    389 CALLS     1885 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.5688        5.2124        .27676E-06    .25875E-04
   2  Prefactor     .10000E-03    6.1687        .23228E-08** at limit **
   3  norm          .10000E-03    3.1035        .16147E-07** at limit **
   4  Prefactor     .10000E-03    3.3097        .43075E-07** at limit **
   5  Prefactor     40.587        29.843       -.81656E-05   -.44710E-03
   6  Prefactor     .10000E-03    29.254        .33624E-06** at limit **
   7  Prefactor     12.867        10.911        .10822E-05    .61737E-04
   8  norm          3.4716        1.1752       -.58429E-08   -.44240E-04
   9  Prefactor     .10000E-03    3.1111        .72646E-08** at limit **
  10  Prefactor     4.4493        2.1103        .25202E-07   -.54116E-04
  11  Prefactor     13.472        4.7851       -.22491E-06   -.13778E-03
  12  Prefactor     .10000E-03    2.8656       -.61590E-07** at limit **
  13  norm          1.5808        .44735       -.71231E-07    .91083E-04
  14  Prefactor     4.1919        3.6082        .12954E-05   -.34620E-02
  15  norm          1.8676        .89833       -.28457E-07   -.20315E-03
  16  Prefactor     .10000E-03    16.230       -.19347E-06** at limit **
  17  norm          6.4853        5.7968        .42208E-06   -.12888E-02
  18  Normalizat    .84590        .13530        .11466E-05   -.89499E-04
  19  Prefactor     1.1752        .11554       -.42025E-06    .12144E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.56877
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 40.5873
  Prefactor  = 0.0001
  Prefactor  = 12.8669
  norm       = 3.47159
  Prefactor  = 0.0001
  Prefactor  = 4.44926
  Prefactor  = 13.4721
  Prefactor  = 0.0001
  norm       = 1.58082
  Prefactor  = 4.1919
  norm       = 1.86764
  Prefactor  = 0.0001
  norm       = 6.48526
  Normalizat = 0.8459
  Prefactor  = 1.17523
 **********
 **   18 **HESSE 
 **********

 FCN=   12263.45     FROM HESSE     STATUS=OK           270 CALLS     2155 TOTAL
                     EDM=   .96E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.5688        5.2112        .17023E-03   -1.5236    
   2  Prefactor     .10000E-03    6.1699        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    3.1149        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    3.3271        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     40.587        30.856        .62908E-04   -1.4433    
   6  Prefactor     .10000E-03    29.288        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     12.867        10.896        .11164E-03   -1.4990    
   8  norm          3.4716        1.1649        .66609E-04   -1.5335    
   9  Prefactor     .10000E-03    11.731        .37165E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     4.4493        2.1102        .10593E-03   -1.5286    
  11  Prefactor     13.472        4.7981        .10912E-03   -1.4974    
  12  Prefactor     .10000E-03    2.9362        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.5808        .46617        .36375E-04   -1.5457    
  14  Prefactor     4.1919        5.3227        .98413E-03   -1.5298    
  15  norm          1.8676        .89312        .68985E-04   -1.5435    
  16  Prefactor     .10000E-03    16.504        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          6.4853        5.9983        .78794E-03   -1.5199    
  18  Normalizat    .84590        .15866        .28909E-03   -.98388    
  19  Prefactor     1.1752        .13620        .22363E-03   -.87097    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.63173e-09
Minuit parameter uncertainties:
  1  5.2116
  2  3.15648e-07
  3  8.07231e-06
  4  1.19673e-05
  5  30.8681
  6  8.90004e-05
  7  10.8977
  8  1.16494
  9  0.000152643
  10  2.11024
  11  4.79819
  12  5.13843e-06
  13  0.466172
  14  5.32335
  15  0.893123
  16  3.93244e-05
  17  5.9989
  18  0.15875
  19  0.136237
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.449e+00  2.110e+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.175e+00  1.362e-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.459e-01  1.588e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 8.15
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 5.38e-08 +/- 2.55e-08
Energy Flux (Fixed Index): 1.84e-05 +/- 8.73e-06

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) = 12262.9405413
delta logL = 0.50692975427

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 12262.92359
delta logL = 0.523881025561

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.0015       1.0000         .10000E-03   10000.    
     2 'Index     '    2.8560       1.0000          .0000       10.000    
     3 'Normalizat'    .81454       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1932       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=   12262.92     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      242 TOTAL
                     EDM=   .14E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.0015        16.113        .58573E-02   -.23098E-02
   2  Index         2.8560        2.4442        .15688       -.13492E-03
   3  Normalizat    .81453        .52664E-01    .66464E-01   -.70512E-03
   4  Prefactor     1.1933        .40367E-01    .50252E-01   -.37332E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.00147
  Index      = 2.85599
  Normalizat = 0.814528
  Prefactor  = 1.19325
 **********
 **   18 **HESSE 
 **********

 FCN=   12262.92     FROM HESSE     STATUS=OK            31 CALLS      273 TOTAL
                     EDM=   .10E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.0015        2.3858        .78473E-04   -1.5361    
   2  Index         2.8560        .56187        .55655E-02   -.44317    
   3  Normalizat    .81453        .15562        .29404E-03   -.99532    
   4  Prefactor     1.1933        .13708        .22216E-03   -.86539    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.03157e-09
Minuit parameter uncertainties:
  1  2.38586
  2  0.563326
  3  0.155701
  4  0.137122
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/424218': 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) = 12262.92359
delta logL = 0.523881031364

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.001e+00  2.386e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.856e+00  5.633e-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.193e+00  1.371e-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.145e-01  1.557e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 9.28
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.86 +/- 0.56
Photon Flux (Free Index): 7.66e-08 +/- 3.80e-08
Energy Flux (Free Index): 1.66e-05 +/- 7.34e-06

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/424218/cmap_HighResolution_670809601_671414401_4FGL_J1040.5+0617_weekly_bin714.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='5.38e-08', energy_flux2='1.66e-05', photon_flux_error='2.55e-08', dlogl='5.24e-01', energy_flux='1.84e-05', photon_flux2='7.66e-08', job_status='DONE', time_completed='2022-04-12 01:26:00.702761', photon_index_error2='0.56', photon_index2='2.86', ts='8.15', fit_tolerance='1e-08', GAL='1.18', photon_index_error='0.00', energy_flux_error2='7.34e-06', EG='0.85', time_epoch_completed='1649751960.7', return_code='0', job_id='424218', GAL2='1.19', EG2='0.81', return_code2='0', energy_flux_error='8.73e-06', photon_flux_error2='3.80e-08', ts2='9.28', photon_index='2.37' WHERE bin_id='714' AND source_name='4FGL J1040.5+0617' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Apr 12 01:26:00 PDT 2022


------------------------------------------------------------
Sender: LSF System <lsf@bullet0041>
Subject: Job 424218: <4FGL_J1040.5+0617_weekly_bin714> in cluster <slac> Done

Job <4FGL_J1040.5+0617_weekly_bin714> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Tue Apr 12 01:10:25 2022
Job was executed on host(s) <bullet0041>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Apr 12 01:10:26 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Apr 12 01:10:26 2022
Terminated at Tue Apr 12 01:26:01 2022
Results reported at Tue Apr 12 01:26:01 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_weekly_bin714 160.15 6.2848 670809601 671414401 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 :                                   790.03 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             280.65 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   934 sec.
    Turnaround time :                            936 sec.

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

