aklog: Couldn't determine realm of user:aklog: unknown RPC error (-1765328189)  while getting realm
/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/font_manager.py:281: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  'Matplotlib is building the font cache using fc-list. '
/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 236 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 = 17179
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0159.5+1046_weekly_bin497
RA = 29.8858, Dec = 10.7737
tmin = 539568001, tmax = 540172801
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='321127', job_status='RUN', time_executed='2021-07-04 12:55:57.324040', time_epoch_executed='1625428557.32' WHERE source_name='4FGL J0159.5+1046' and cadence='weekly' and bin_id='497'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/321127

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/321127/ft1_4FGL_J0159.5+1046_weekly_bin497.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/321127/ft2_4FGL_J0159.5+1046_weekly_bin497.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/321127/ft1_4FGL_J0159.5+1046_weekly_bin497.fits outfile=/scratch/kocevski/321127/ft1_filteredMKT_4FGL_J0159.5+1046_weekly_bin497.fits ra=29.8858 dec=10.7737 rad=12.0 tmin=539568001.0 tmax=540172801.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 9.45
user 8.81
sys 0.39

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/321127/ft2_4FGL_J0159.5+1046_weekly_bin497.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/321127/ft2_4FGL_J0159.5+1046_weekly_bin497.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/321127/ft1_filteredMKT_4FGL_J0159.5+1046_weekly_bin497.fits evtable="EVENTS" outfile="/scratch/kocevski/321127/ft1_filtered_4FGL_J0159.5+1046_weekly_bin497.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 1.35
user 0.38
sys 0.24

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/321127/ft1_filtered_4FGL_J0159.5+1046_weekly_bin497.fits" evtable="EVENTS" scfile=/scratch/kocevski/321127/ft2_4FGL_J0159.5+1046_weekly_bin497.fits sctable="SC_DATA" outfile=/scratch/kocevski/321127/ltcube_539568001_540172801_4FGL_J0159.5+1046_weekly_bin497.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/321127/ft2_4FGL_J0159.5+1046_weekly_bin497.fits
.....................!
real 27.12
user 26.38
sys 0.43

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/321127/ft1_filtered_4FGL_J0159.5+1046_weekly_bin497.fits evtable="EVENTS" scfile=/scratch/kocevski/321127/ft2_4FGL_J0159.5+1046_weekly_bin497.fits sctable="SC_DATA" expcube=/scratch/kocevski/321127/ltcube_539568001_540172801_4FGL_J0159.5+1046_weekly_bin497.fits outfile=/scratch/kocevski/321127/expmap_539568001_540172801_4FGL_J0159.5+1046_weekly_bin497.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/321127/ltcube_539568001_540172801_4FGL_J0159.5+1046_weekly_bin497.fits
.....................!
real 193.20
user 185.24
sys 4.83

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 170 point sources and 0 extended sources

Setting source of interest to:
4FGL J0159.5+1046 @ 29.8858 10.7737

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/321127/ft1_filtered_4FGL_J0159.5+1046_weekly_bin497.fits scfile=/scratch/kocevski/321127/ft2_4FGL_J0159.5+1046_weekly_bin497.fits outfile=/scratch/kocevski/321127/cmap_539568001_540172801_4FGL_J0159.5+1046_weekly_bin497.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=29.8858 yref=10.7737 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.81
user 0.42
sys 0.23

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/321127/ft1_filtered_4FGL_J0159.5+1046_weekly_bin497.fits scfile=/scratch/kocevski/321127/ft2_4FGL_J0159.5+1046_weekly_bin497.fits outfile=/scratch/kocevski/321127/cmap_HighResolution_539568001_540172801_4FGL_J0159.5+1046_weekly_bin497.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=29.8858 yref=10.7737 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.74
user 0.41
sys 0.25

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/321127/ft1_filtered_4FGL_J0159.5+1046_weekly_bin497.fits evtable="EVENTS" scfile=/scratch/kocevski/321127/ft2_4FGL_J0159.5+1046_weekly_bin497.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/321127/Model_4FGL_J0159.5+1046_weekly_bin497.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/321127/ft1_filtered_4FGL_J0159.5+1046_weekly_bin497.fits.....................!
real 168.06
user 164.85
sys 1.29

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/321127/ft1_filtered_4FGL_J0159.5+1046_weekly_bin497.fits', '/scratch/kocevski/321127/ft2_4FGL_J0159.5+1046_weekly_bin497.fits', expMap='/scratch/kocevski/321127/expmap_539568001_540172801_4FGL_J0159.5+1046_weekly_bin497.fits', expCube='/scratch/kocevski/321127/ltcube_539568001_540172801_4FGL_J0159.5+1046_weekly_bin497.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/321127/Model_4FGL_J0159.5+1046_weekly_bin497.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0159.5+1046'

4FGL J0159.5+1046
   Spectrum: PowerLaw
219    Prefactor:  2.134e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
220        Index:  1.995e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
221        Scale:  2.167e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/321127/ft1_filtered_4FGL_J0159.5+1046_weekly_bin497.fits
Spacecraft file(s): /scratch/kocevski/321127/ft2_4FGL_J0159.5+1046_weekly_bin497.fits
Exposure map: /scratch/kocevski/321127/expmap_539568001_540172801_4FGL_J0159.5+1046_weekly_bin497.fits
Exposure cube: /scratch/kocevski/321127/ltcube_539568001_540172801_4FGL_J0159.5+1046_weekly_bin497.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/321127/Model_4FGL_J0159.5+1046_weekly_bin497.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) = 15747.2015416

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.7403       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    5.5699       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.2004       1.0000         .10000E-03   10000.    
     9 'Prefactor '    8.5845       1.0000         .10000E-03   10000.    
    10 'norm      '    .98475       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    2.4053       1.0000         .10000E-03   10000.    
    13 'Prefactor '    1.9375       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    16.827       1.0000         .10000E-03   10000.    
    17 'Prefactor '    2.1301       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    2.1477       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10167E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    6.9780       1.0000         .10000E-03   10000.    
    22 'norm      '    .88470E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    39.422       1.0000         .10000E-03   10000.    
    24 'Normalizat'    .99968       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.0665       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5380E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   15747.20     FROM MIGRAD    STATUS=CONVERGED    578 CALLS     2900 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.7409        5.6091        .95599E-05   -.37044E-03
   2  Prefactor     .10000E-03    10.070       -.40940E-06** at limit **
   3  Prefactor     .10000E-03    1.9489        .63516E-07** at limit **
   4  Prefactor     .10000E-03    1.3404        .68142E-06** at limit **
   5  norm          5.5708        8.3695        .18983E-06   -.16203E-04
   6  Prefactor     .10000E-03    1.4491        .12293E-06** at limit **
   7  Prefactor     .10000E-03    .42143       -.20204E-09** at limit **
   8  norm          2.2007        2.4028        .11817E-06   -.33081E-04
   9  Prefactor     8.5846        2.1623        .43798E-07    .12285E-03
  10  norm          .98482        .57409        .64359E-07    .13487E-03
  11  Prefactor     .10000E-03    4.9176        .52794E-07** at limit **
  12  Prefactor     2.3739        50.770        .81241E-05   -.39139E-04
  13  Prefactor     1.9372        3.1779        .30779E-06   -.55276E-05
  14  Prefactor     .10000E-03    11.567        .63852E-06** at limit **
  15  Prefactor     .10000E-03    2.3310       -.67076E-06** at limit **
  16  Prefactor     16.827        10.764        .14957E-06    .16048E-03
  17  Prefactor     2.1270        5.0972        .10674E-05    .54587E-03
  18  Prefactor     .10000E-03    3.7729       -.77588E-06** at limit **
  19  norm          2.1479        .48265       -.85923E-07   -.17448E-02
  20  Prefactor     .10001E-03    28.747       -.38837E-05** at limit **
  21  Prefactor     6.9782        13.470        .41020E-06    .42293E-04
  22  norm          .10002E-03    3.0600       -.24563E-05** at limit **
  23  Prefactor     39.392        27.759        .45532E-05    .58888E-03
  24  Normalizat    .99967        .12808       -.21432E-05   -.20196E-04
  25  Prefactor     1.0665        .81530E-01    .35152E-06    .53632E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.74091
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 5.57081
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.20068
  Prefactor  = 8.5846
  norm       = 0.984816
  Prefactor  = 0.0001
  Prefactor  = 2.37389
  Prefactor  = 1.93721
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 16.8266
  Prefactor  = 2.127
  Prefactor  = 0.0001
  norm       = 2.14789
  Prefactor  = 0.000100007
  Prefactor  = 6.97821
  norm       = 0.000100018
  Prefactor  = 39.3925
  Normalizat = 0.999672
  Prefactor  = 1.06649
 **********
 **   18 **HESSE 
 **********

 FCN=   15747.20     FROM HESSE     STATUS=OK           427 CALLS     3327 TOTAL
                     EDM=   .30E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.7409        5.6545        .15901E-02   -1.5444    
   2  Prefactor     .10000E-03    10.072        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    1.9559        .17108E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    2.7120        .28073E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          5.5708        8.3617        .17023E-03   -1.5236    
   6  Prefactor     .10000E-03    1.4668        .14750E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    .42888        .79511E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.2007        2.3889        .19578E-03   -1.5411    
   9  Prefactor     8.5846        2.1602        .88375E-04   -1.5122    
  10  norm          .98482        .55929        .69881E-04   -1.5509    
  11  Prefactor     .10000E-03    4.9245        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     2.3739        50.154        .26399E-03   -1.5400    
  13  Prefactor     1.9372        3.1566        .27674E-03   -1.5430    
  14  Prefactor     .10000E-03    11.566        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    2.3586        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     16.827        10.752        .97636E-04   -1.4887    
  17  Prefactor     2.1270        5.0494        .28249E-03   -1.5416    
  18  Prefactor     .10000E-03    3.8132        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          2.1479        .48182        .39476E-04   -1.5415    
  20  Prefactor     .10001E-03    29.191        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     6.9782        13.456        .15187E-03   -1.5180    
  22  norm          .10002E-03    16.763        .40263E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     39.392        27.970        .63838E-04   -1.4452    
  24  Normalizat    .99967        .14395        .31517E-03   -.93041    
  25  Prefactor     1.0665        .92477E-01    .19329E-03   -.90545    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.99287e-09
Minuit parameter uncertainties:
  1  5.65622
  2  2.44732e-05
  3  4.34009e-06
  4  2.74106e-05
  5  8.36344
  6  7.81505e-06
  7  2.16376e-07
  8  2.38903
  9  2.16019
  10  0.559288
  11  5.66238e-06
  12  21.8433
  13  3.15683
  14  1.32554e-05
  15  5.64652e-05
  16  10.753
  17  5.05039
  18  7.98079e-05
  19  0.481821
  20  0.000926675
  21  13.4615
  22  0.00109373
  23  27.9792
  24  0.144008
  25  0.0924904
Done.

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

Extracting fit parameters...

4FGL J0159.5+1046
   Spectrum: PowerLaw
219    Prefactor:  1.000e-04  7.815e-06  1.000e-04  1.000e+04 ( 1.000e-13)
220        Index:  1.995e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
221        Scale:  2.167e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
535    Prefactor:  1.066e+00  9.249e-02  0.000e+00  1.000e+01 ( 1.000e+00)
536        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
537        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
534   Normalization:  9.997e-01  1.440e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 29.886 10.774
Photon Flux Upper Limit: 2.85e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.13e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/321127/likelihoodResults_539568001_540172801_4FGL_J0159.5+1046_weekly_bin497.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): 102
logL (Free Index) = 15747.2011783
delta logL = -0.003246311986

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 15747.197932
delta logL = 5.20776666235e-09

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    1.9923       1.0000          .0000       10.000    
     3 'Normalizat'    .99967       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0665       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5380E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   15747.20     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      209 TOTAL
                     EDM=   .90E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .54484        .90712E-02** at limit **
   2  Index         1.9900        5.2304        .50000        .11938E-04
   3  Normalizat    .99967        .21038E-02    .71238E-01    .47857E-04
   4  Prefactor     1.0665        .13344E-02    .39028E-01    .20924E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.98995
  Normalizat = 0.999674
  Prefactor  = 1.06649
 **********
 **   18 **HESSE 
 **********

 FCN=   15747.20     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      242 TOTAL
                     EDM=   .30E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    18.293        .14754E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.9900        5.7003        .50000       -.64601    
   3  Normalizat    .99967        .12249E-01    .31517E-03   -.93041    
   4  Prefactor     1.0665        .77806E-02    .19329E-03   -.90545    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.97721e-07
Minuit parameter uncertainties:
  1  1.5601e-05
  2  184.252
  3  0.0122495
  4  0.00778056
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/321127': 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): 102
logL (Free Index) = 15747.197932
delta logL = 1.45082594827e-08

Extracting fit parameters...

4FGL J0159.5+1046
   Spectrum: PowerLaw
219    Prefactor:  1.000e-04  1.560e-05  1.000e-04  1.000e+04 ( 1.000e-13)
220        Index:  1.990e+00  1.843e+02  0.000e+00  1.000e+01 (-1.000e+00)
221        Scale:  2.167e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
535    Prefactor:  1.066e+00  7.781e-03  0.000e+00  1.000e+01 ( 1.000e+00)
536        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
537        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
534   Normalization:  9.997e-01  1.225e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 29.886 10.774

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/321127/cmap_HighResolution_539568001_540172801_4FGL_J0159.5+1046_weekly_bin497.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.13e-03', job_status='DONE', photon_flux_upper_limit='2.85e-08', time_completed='2021-07-04 13:19:22.636668', job_id='321127', GAL2='1.07', fit_tolerance='1e-08', EG2='1.00', EG='1.00', time_epoch_completed='1625429962.64', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.07', dlogl='1.45e-08', ts2='-0.00', photon_index_error='0.00', photon_index='1.99' WHERE bin_id='497' AND source_name='4FGL J0159.5+1046' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Sun Jul  4 13:19:22 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0022>
Subject: Job 321127: <4FGL_J0159.5+1046_weekly_bin497> in cluster <slac> Done

Job <4FGL_J0159.5+1046_weekly_bin497> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Sun Jul  4 05:59:19 2021
Job was executed on host(s) <bullet0022>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Jul  4 05:59:21 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sun Jul  4 05:59:21 2021
Terminated at Sun Jul  4 13:19:26 2021
Results reported at Sun Jul  4 13:19:26 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0159.5+1046_weekly_bin497 29.8858 10.7737 539568001 540172801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0159.5+1046 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   1375.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             64.39 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   26404 sec.
    Turnaround time :                            26407 sec.

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

