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


Performing analysis on: 4FGL_J0159.0+3313_weekly_bin664
RA = 29.7665, Dec = 33.2175
tmin = 640569601, tmax = 641174401
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='312293', job_status='RUN', time_executed='2021-07-04 05:31:50.427409', time_epoch_executed='1625401910.43' WHERE source_name='4FGL J0159.0+3313' and cadence='weekly' and bin_id='664'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/312293

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/312293/ft1_4FGL_J0159.0+3313_weekly_bin664.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/312293/ft2_4FGL_J0159.0+3313_weekly_bin664.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/312293/ft1_4FGL_J0159.0+3313_weekly_bin664.fits outfile=/scratch/kocevski/312293/ft1_filteredMKT_4FGL_J0159.0+3313_weekly_bin664.fits ra=29.7665 dec=33.2175 rad=12.0 tmin=640569601.0 tmax=641174401.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 8.04
user 6.17
sys 0.29

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/312293/ft2_4FGL_J0159.0+3313_weekly_bin664.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/312293/ft2_4FGL_J0159.0+3313_weekly_bin664.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/312293/ft1_filteredMKT_4FGL_J0159.0+3313_weekly_bin664.fits evtable="EVENTS" outfile="/scratch/kocevski/312293/ft1_filtered_4FGL_J0159.0+3313_weekly_bin664.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.29
user 0.38
sys 0.18

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/312293/ft1_filtered_4FGL_J0159.0+3313_weekly_bin664.fits" evtable="EVENTS" scfile=/scratch/kocevski/312293/ft2_4FGL_J0159.0+3313_weekly_bin664.fits sctable="SC_DATA" outfile=/scratch/kocevski/312293/ltcube_640569601_641174401_4FGL_J0159.0+3313_weekly_bin664.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/312293/ft2_4FGL_J0159.0+3313_weekly_bin664.fits
.....................!
real 29.97
user 28.11
sys 0.38

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/312293/ft1_filtered_4FGL_J0159.0+3313_weekly_bin664.fits evtable="EVENTS" scfile=/scratch/kocevski/312293/ft2_4FGL_J0159.0+3313_weekly_bin664.fits sctable="SC_DATA" expcube=/scratch/kocevski/312293/ltcube_640569601_641174401_4FGL_J0159.0+3313_weekly_bin664.fits outfile=/scratch/kocevski/312293/expmap_640569601_641174401_4FGL_J0159.0+3313_weekly_bin664.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/312293/ltcube_640569601_641174401_4FGL_J0159.0+3313_weekly_bin664.fits
.....................!
real 202.38
user 187.71
sys 5.13

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

Setting source of interest to:
4FGL J0159.0+3313 @ 29.7665 33.2175

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/312293/ft1_filtered_4FGL_J0159.0+3313_weekly_bin664.fits scfile=/scratch/kocevski/312293/ft2_4FGL_J0159.0+3313_weekly_bin664.fits outfile=/scratch/kocevski/312293/cmap_640569601_641174401_4FGL_J0159.0+3313_weekly_bin664.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.7665 yref=33.2175 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.84
user 0.41
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/312293/ft1_filtered_4FGL_J0159.0+3313_weekly_bin664.fits scfile=/scratch/kocevski/312293/ft2_4FGL_J0159.0+3313_weekly_bin664.fits outfile=/scratch/kocevski/312293/cmap_HighResolution_640569601_641174401_4FGL_J0159.0+3313_weekly_bin664.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.7665 yref=33.2175 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 1.00
user 0.43
sys 0.18

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/312293/ft1_filtered_4FGL_J0159.0+3313_weekly_bin664.fits evtable="EVENTS" scfile=/scratch/kocevski/312293/ft2_4FGL_J0159.0+3313_weekly_bin664.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/312293/Model_4FGL_J0159.0+3313_weekly_bin664.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/312293/ft1_filtered_4FGL_J0159.0+3313_weekly_bin664.fits......................!
real 42.96
user 28.21
sys 1.29

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/312293/ft1_filtered_4FGL_J0159.0+3313_weekly_bin664.fits', '/scratch/kocevski/312293/ft2_4FGL_J0159.0+3313_weekly_bin664.fits', expMap='/scratch/kocevski/312293/expmap_640569601_641174401_4FGL_J0159.0+3313_weekly_bin664.fits', expCube='/scratch/kocevski/312293/ltcube_640569601_641174401_4FGL_J0159.0+3313_weekly_bin664.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/312293/Model_4FGL_J0159.0+3313_weekly_bin664.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0159.0+3313'

4FGL J0159.0+3313
   Spectrum: PowerLaw
265    Prefactor:  1.345e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
266        Index:  1.985e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
267        Scale:  3.553e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/312293/ft1_filtered_4FGL_J0159.0+3313_weekly_bin664.fits
Spacecraft file(s): /scratch/kocevski/312293/ft2_4FGL_J0159.0+3313_weekly_bin664.fits
Exposure map: /scratch/kocevski/312293/expmap_640569601_641174401_4FGL_J0159.0+3313_weekly_bin664.fits
Exposure cube: /scratch/kocevski/312293/ltcube_640569601_641174401_4FGL_J0159.0+3313_weekly_bin664.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/312293/Model_4FGL_J0159.0+3313_weekly_bin664.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) = 1734.05906864

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    4.2937       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    3.1670       1.0000         .10000E-03   10000.    
     4 'Prefactor '    14.940       1.0000         .10000E-03   10000.    
     5 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    3.2913       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    37.791       1.0000         .10000E-03   10000.    
    14 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10211E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    9.5392       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    .10008E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    .10035E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    2.0394       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .16003       1.0000         .10000E-03   10000.    
    24 'norm      '    84.875       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    38.329       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.1087       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .65384       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5940E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   1734.054     FROM MIGRAD    STATUS=CONVERGED    733 CALLS     3684 TOTAL
                     EDM=   .68E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          4.2937        2.5309       -.25388E-07    .56840E-04
   2  Prefactor     .10000E-03    21.893       -.29033E-08** at limit **
   3  Prefactor     3.1647        24.024        .86131E-06   -.38180E-04
   4  Prefactor     14.939        25.557       -.23173E-07    .74450E-05
   5  norm          .10000E-03    .65765        .56293E-08** at limit **
   6  Prefactor     .10000E-03    87.928       -.15344E-06** at limit **
   7  Prefactor     .10000E-03    75.521       -.21504E-07** at limit **
   8  norm          .10000E-03    .57881       -.41917E-08** at limit **
   9  Prefactor     .10000E-03    45.246       -.46510E-07** at limit **
  10  Prefactor     .10000E-03    11.998       -.44311E-07** at limit **
  11  Prefactor     3.2887        8.2176       -.78825E-07   -.18759E-04
  12  Prefactor     .10000E-03    64.799        .19984E-06** at limit **
  13  Prefactor     37.770        178.47       -.24581E-05    .73889E-05
  14  norm          .10000E-03    9.7031        .19369E-08** at limit **
  15  Prefactor     .10000E-03    870.79       -.10795E-05** at limit **
  16  Prefactor     .10000E-03    13.820       -.26058E-09** at limit **
  17  Prefactor     .10000E-03    473.30        .27736E-07** at limit **
  18  norm          9.5139        18.949       -.31463E-05    .60871E-04
  19  Prefactor     .10000E-03    31.082        .27424E-07** at limit **
  20  norm          .10000E-03    1.7415        .27146E-06** at limit **
  21  norm          .10002E-03    6517.0       -.27303E-05** at limit **
  22  norm          2.0391        1.4623       -.27737E-07    .18321E-03
  23  Prefactor     .10053E-03    76.676        .73361E-05** at limit **
  24  norm          84.804        64.172       -.31229E-05    .64899E-04
  25  Prefactor     .10000E-03    194.23        .58158E-06** at limit **
  26  norm          38.321        39.823       -.62301E-07    .71397E-05
  27  Prefactor     .10000E-03    114.81       -.11660E-06** at limit **
  28  Normalizat    1.1088        .43092       -.10141E-05    .15654E-04
  29  Prefactor     .65370        .22536        .14029E-06    .42388E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 4.29368
  Prefactor  = 0.0001
  Prefactor  = 3.1647
  Prefactor  = 14.9394
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.28873
  Prefactor  = 0.0001
  Prefactor  = 37.7699
  norm       = 0.0001
  Prefactor  = 0.000100003
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 9.51392
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.000100019
  norm       = 2.03913
  Prefactor  = 0.000100529
  norm       = 84.804
  Prefactor  = 0.000100001
  norm       = 38.3212
  Prefactor  = 0.0001
  Normalizat = 1.10884
  Prefactor  = 0.653698
 **********
 **   18 **HESSE 
 **********

 FCN=   1734.054     FROM HESSE     STATUS=OK           545 CALLS     4229 TOTAL
                     EDM=   .91E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          4.2937        2.5224        .45222E-04   -1.5294    
   2  Prefactor     .10000E-03    21.894        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     3.1647        25.014        .22774E-03   -1.5352    
   4  Prefactor     14.939        25.558        .10362E-03   -1.4935    
   5  norm          .10000E-03    .65962        .32972E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    87.959        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    75.521        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .57939        .30939E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    45.256        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    12.002        .14088E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     3.2887        8.2083        .17465E-03   -1.5345    
  12  Prefactor     .10000E-03    64.877        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     37.770        178.07        .65197E-04   -1.4478    
  14  norm          .10000E-03    9.7040        .12671E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    870.41        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    13.820        .15123E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    473.37        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          9.5139        19.176        .12975E-03   -1.5091    
  19  Prefactor     .10000E-03    31.082        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .10000E-03    1.7518        .53644E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          .10002E-03    6515.9        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          2.0391        1.4554        .39797E-04   -1.5422    
  23  Prefactor     .10053E-03    565.18        .63784E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          84.804        64.400        .43604E-04   -1.3864    
  25  Prefactor     .10000E-03    194.15        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          38.321        39.824        .64740E-04   -1.4469    
  27  Prefactor     .10000E-03    114.80        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.1088        .52656        .28904E-03   -.89469    
  29  Prefactor     .65370        .27521        .20650E-03   -1.0537    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.13471e-10
Minuit parameter uncertainties:
  1  2.52246
  2  8.25852e-07
  3  17.8045
  4  25.5768
  5  3.39841e-07
  6  0.000118251
  7  8.79029e-06
  8  2.47613e-07
  9  2.08134e-05
  10  1.63513e-05
  11  8.21115
  12  8.15303e-05
  13  164.83
  14  5.81964e-07
  15  0.00325427
  16  2.23288e-06
  17  5.50075e-06
  18  19.1881
  19  5.76865e-06
  20  2.89695e-06
  21  0.0161128
  22  1.45547
  23  0.0349171
  24  64.4526
  25  0.000628181
  26  39.8515
  27  0.000127016
  28  0.529085
  29  0.275779
Done.

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

Extracting fit parameters...

4FGL J0159.0+3313
   Spectrum: PowerLaw
265    Prefactor:  1.000e-04  8.153e-05  1.000e-04  1.000e+04 ( 1.000e-14)
266        Index:  1.985e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
267        Scale:  3.553e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
591    Prefactor:  6.537e-01  2.758e-01  0.000e+00  1.000e+01 ( 1.000e+00)
592        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
593        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
590   Normalization:  1.109e+00  5.291e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 29.767 33.218
Photon Flux Upper Limit: 2.54e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.90e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/312293/likelihoodResults_640569601_641174401_4FGL_J0159.0+3313_weekly_bin664.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) = 1734.05397272
delta logL = -7.32892247015e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 1734.05389986
delta logL = -4.28610974268e-07

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   1734.054     FROM MIGRAD    STATUS=CONVERGED     96 CALLS      281 TOTAL
                     EDM=   .26E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10282E-03    14.763        .18142E-01** at limit **
   2  Index         1.9959        9.0020        .50000        .10119E-04
   3  Normalizat    1.1088        .48207E-02    .28903E-03   -.20807E-04
   4  Prefactor     .65370        .27253E-02    .20650E-03   -.31367E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000102822
  Index      = 1.99594
  Normalizat = 1.10884
  Prefactor  = 0.653697
 **********
 **   18 **HESSE 
 **********

 FCN=   1734.054     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      310 TOTAL
                     EDM=   .17E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10282E-03    103.78        .32147E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.9959        5.9931        .50000       -.64452    
   3  Normalizat    1.1088        .12783E-01    .11561E-04   -.89469    
   4  Prefactor     .65370        .72265E-02    .82602E-05   -1.0537    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.73687e-10
Minuit parameter uncertainties:
  1  0.0342863
  2  109.616
  3  0.0127826
  4  0.00722646
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/312293': 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) = 1734.05389948
delta logL = -4.91963874083e-08

Extracting fit parameters...

4FGL J0159.0+3313
   Spectrum: PowerLaw
265    Prefactor:  1.028e-04  3.429e-02  1.000e-04  1.000e+04 ( 1.000e-14)
266        Index:  1.996e+00  1.096e+02  0.000e+00  1.000e+01 (-1.000e+00)
267        Scale:  3.553e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
591    Prefactor:  6.537e-01  7.226e-03  0.000e+00  1.000e+01 ( 1.000e+00)
592        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
593        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
590   Normalization:  1.109e+00  1.278e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 29.767 33.218

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/312293/cmap_HighResolution_640569601_641174401_4FGL_J0159.0+3313_weekly_bin664.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.90e-02', job_status='DONE', photon_flux_upper_limit='2.54e-07', time_completed='2021-07-04 05:40:55.140594', job_id='312293', GAL2='0.65', fit_tolerance='1e-08', EG2='1.11', EG='1.11', time_epoch_completed='1625402455.14', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.65', dlogl='-4.92e-08', ts2='-0.00', photon_index_error='0.00', photon_index='1.98' WHERE bin_id='664' AND source_name='4FGL J0159.0+3313' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Sun Jul  4 05:40:55 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0215>
Subject: Job 312293: <4FGL_J0159.0+3313_weekly_bin664> in cluster <slac> Done

Job <4FGL_J0159.0+3313_weekly_bin664> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sun Jul  4 05:28:39 2021
Job was executed on host(s) <bullet0215>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Jul  4 05:28:41 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:28:41 2021
Terminated at Sun Jul  4 05:40:59 2021
Results reported at Sun Jul  4 05:40:59 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0159.0+3313_weekly_bin664 29.7665 33.2175 640569601 641174401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0159.0+3313 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   496.24 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             259.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   737 sec.
    Turnaround time :                            740 sec.

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

