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


Performing analysis on: 4FGL_J0159.5+1046_daily_bin1392
RA = 29.8858, Dec = 10.7737
tmin = 600134401, tmax = 600393601
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='2971', job_status='RUN', time_executed='2021-08-15 00:53:15.981175', time_epoch_executed='1629013995.98' WHERE source_name='4FGL J0159.5+1046' and cadence='daily' and bin_id='1392'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/2971

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/2971/ft1_4FGL_J0159.5+1046_daily_bin1392.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/2971/ft2_4FGL_J0159.5+1046_daily_bin1392.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/2971/ft1_4FGL_J0159.5+1046_daily_bin1392.fits outfile=/scratch/kocevski/2971/ft1_filteredMKT_4FGL_J0159.5+1046_daily_bin1392.fits ra=29.8858 dec=10.7737 rad=12.0 tmin=600134401.0 tmax=600393601.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 4.88
user 4.63
sys 0.23

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/2971/ft2_4FGL_J0159.5+1046_daily_bin1392.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/2971/ft1_filteredMKT_4FGL_J0159.5+1046_daily_bin1392.fits evtable="EVENTS" outfile="/scratch/kocevski/2971/ft1_filtered_4FGL_J0159.5+1046_daily_bin1392.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.52
user 0.34
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/2971/ft1_filtered_4FGL_J0159.5+1046_daily_bin1392.fits" evtable="EVENTS" scfile=/scratch/kocevski/2971/ft2_4FGL_J0159.5+1046_daily_bin1392.fits sctable="SC_DATA" outfile=/scratch/kocevski/2971/ltcube_600134401_600393601_4FGL_J0159.5+1046_daily_bin1392.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/2971/ft2_4FGL_J0159.5+1046_daily_bin1392.fits
.....................!
real 14.37
user 13.81
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/2971/ft1_filtered_4FGL_J0159.5+1046_daily_bin1392.fits evtable="EVENTS" scfile=/scratch/kocevski/2971/ft2_4FGL_J0159.5+1046_daily_bin1392.fits sctable="SC_DATA" expcube=/scratch/kocevski/2971/ltcube_600134401_600393601_4FGL_J0159.5+1046_daily_bin1392.fits outfile=/scratch/kocevski/2971/expmap_600134401_600393601_4FGL_J0159.5+1046_daily_bin1392.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/2971/ltcube_600134401_600393601_4FGL_J0159.5+1046_daily_bin1392.fits
.....................!
real 191.34
user 186.12
sys 4.75

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/2971/ft1_filtered_4FGL_J0159.5+1046_daily_bin1392.fits scfile=/scratch/kocevski/2971/ft2_4FGL_J0159.5+1046_daily_bin1392.fits outfile=/scratch/kocevski/2971/cmap_600134401_600393601_4FGL_J0159.5+1046_daily_bin1392.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.54
user 0.37
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/2971/ft1_filtered_4FGL_J0159.5+1046_daily_bin1392.fits scfile=/scratch/kocevski/2971/ft2_4FGL_J0159.5+1046_daily_bin1392.fits outfile=/scratch/kocevski/2971/cmap_HighResolution_600134401_600393601_4FGL_J0159.5+1046_daily_bin1392.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.56
user 0.38
sys 0.16

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/2971/ft1_filtered_4FGL_J0159.5+1046_daily_bin1392.fits', '/scratch/kocevski/2971/ft2_4FGL_J0159.5+1046_daily_bin1392.fits', expMap='/scratch/kocevski/2971/expmap_600134401_600393601_4FGL_J0159.5+1046_daily_bin1392.fits', expCube='/scratch/kocevski/2971/ltcube_600134401_600393601_4FGL_J0159.5+1046_daily_bin1392.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/2971/Model_4FGL_J0159.5+1046_daily_bin1392.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/2971/ft1_filtered_4FGL_J0159.5+1046_daily_bin1392.fits
Spacecraft file(s): /scratch/kocevski/2971/ft2_4FGL_J0159.5+1046_daily_bin1392.fits
Exposure map: /scratch/kocevski/2971/expmap_600134401_600393601_4FGL_J0159.5+1046_daily_bin1392.fits
Exposure cube: /scratch/kocevski/2971/ltcube_600134401_600393601_4FGL_J0159.5+1046_daily_bin1392.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/2971/Model_4FGL_J0159.5+1046_daily_bin1392.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) = 6287.09890621

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    18.763       1.0000         .10000E-03   10000.    
     2 'Prefactor '    100.11       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10046E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    20.675       1.0000         .10000E-03   10000.    
     7 'Prefactor '    1.5736       1.0000         .10000E-03   10000.    
     8 'norm      '    .32490E-02   1.0000         .10000E-03   10000.    
     9 'Prefactor '    1.9695       1.0000         .10000E-03   10000.    
    10 'norm      '    .80217       1.0000         .10000E-03   10000.    
    11 'Prefactor '    19.262       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .12282E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10035E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    1.6407       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    21.616       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10036E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    1.5135       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10139E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    .10057E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .13473E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.0311       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .87602       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=   6286.695     FROM MIGRAD    STATUS=CONVERGED    640 CALLS     3018 TOTAL
                     EDM=   .11E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  6.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     18.765        14.960       -.19386E-06    .20136E-05
   2  Prefactor     99.752        75.653       -.17444E-05    .89377E-05
   3  Prefactor     .10000E-03    3.7171       -.35821E-08** at limit **
   4  Prefactor     .10000E-03    1.6695        .55864E-07** at limit **
   5  norm          .10000E-03    4.8430        .17157E-06** at limit **
   6  Prefactor     20.677        8.3565       -.69914E-06   -.47867E-05
   7  Prefactor     1.5715        2.5844       -.40811E-06   -.26294E-03
   8  norm          .10000E-03    69.445        .11780E-04** at limit **
   9  Prefactor     1.9707        2.7121       -.68331E-06   -.43742E-03
  10  norm          .80231        .57096       -.20453E-07    .24179E-04
  11  Prefactor     19.248        29.017        .13294E-05    .33935E-05
  12  Prefactor     .10000E-03    43.959       -.83307E-06** at limit **
  13  Prefactor     .10000E-03    10.967        .35319E-05** at limit **
  14  Prefactor     .10000E-03    34.102        .11344E-06** at limit **
  15  Prefactor     1.6328        12.717        .58231E-05   -.95445E-05
  16  Prefactor     .10000E-03    6.7933       -.69369E-07** at limit **
  17  Prefactor     21.618        12.638       -.15886E-06   -.74984E-05
  18  Prefactor     .10000E-03    5.7495        .64622E-06** at limit **
  19  norm          1.5132        .63656        .60035E-07    .13596E-03
  20  Prefactor     .10000E-03    80.147       -.41666E-05** at limit **
  21  Prefactor     .10000E-03    5.9986       -.16708E-07** at limit **
  22  norm          .10000E-03    7.1167        .69484E-06** at limit **
  23  Prefactor     .10000E-03    114.00        .71540E-05** at limit **
  24  Normalizat    1.0306        .18583        .19292E-05    .28542E-04
  25  Prefactor     .87647        .11492       -.22638E-06    .17836E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 18.7652
  Prefactor  = 99.7525
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 20.6766
  Prefactor  = 1.57146
  norm       = 0.0001
  Prefactor  = 1.9707
  norm       = 0.802306
  Prefactor  = 19.2477
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 1.63281
  Prefactor  = 0.0001
  Prefactor  = 21.6177
  Prefactor  = 0.0001
  norm       = 1.51321
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100001
  Normalizat = 1.03063
  Prefactor  = 0.876469
 **********
 **   18 **HESSE 
 **********

 FCN=   6286.695     FROM HESSE     STATUS=OK           431 CALLS     3449 TOTAL
                     EDM=   .19E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     18.765        14.982        .92464E-04   -1.4841    
   2  Prefactor     99.752        75.819        .40180E-04   -1.3707    
   3  Prefactor     .10000E-03    3.7325        .14929E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    1.6732        .10004E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    4.8461        .17042E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     20.677        8.3759        .88087E-04   -1.4798    
   7  Prefactor     1.5715        2.5782        .15445E-03   -1.5457    
   8  norm          .10000E-03    4.0670        .40991E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     1.9707        2.7017        .13872E-03   -1.5427    
  10  norm          .80231        .58496        .49134E-04   -1.5529    
  11  Prefactor     19.248        28.887        .91259E-04   -1.4830    
  12  Prefactor     .10000E-03    44.473        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    10.921        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    34.117        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     1.6328        13.135        .32987E-03   -1.5452    
  16  Prefactor     .10000E-03    6.8035        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     21.618        12.625        .86150E-04   -1.4778    
  18  Prefactor     .10000E-03    5.7524        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          1.5132        .63153        .39301E-04   -1.5462    
  20  Prefactor     .10000E-03    80.857        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    6.0007        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          .10000E-03    7.1369        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    114.64        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.0306        .20911        .28465E-03   -.92011    
  25  Prefactor     .87647        .13050        .19255E-03   -.96968    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.87598e-10
Minuit parameter uncertainties:
  1  14.9851
  2  75.8929
  3  5.81927e-06
  4  1.80541e-06
  5  4.94192e-06
  6  8.37637
  7  2.57838
  8  1.2016e-05
  9  2.70185
  10  0.584962
  11  28.9078
  12  2.80775e-05
  13  0.000104501
  14  4.11079e-05
  15  9.26463
  16  1.28826e-05
  17  12.6268
  18  1.62285e-05
  19  0.631534
  20  1.02919e-05
  21  5.83226e-06
  22  1.89982e-06
  23  0.000484185
  24  0.209273
  25  0.130545
Done.

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

Extracting fit parameters...

4FGL J0159.5+1046
   Spectrum: PowerLaw
219    Prefactor:  2.068e+01  8.376e+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

GAL_V02
   Spectrum: PowerLaw
535    Prefactor:  8.765e-01  1.305e-01  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:  1.031e+00  2.093e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 13.01
Ra Dec: 29.886 10.774
Photon Index (Fixed Index): 1.99 +/- 0.00
Photon Flux (Fixed Index): 9.59e-08 +/- 3.88e-08
Energy Flux (Fixed Index): 6.72e-05 +/- 2.72e-05

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6286.62249166
delta logL = 0.0721717655942

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6286.62130137
delta logL = 0.0733620536594

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    17.757       1.0000         .10000E-03   10000.    
     2 'Index     '    2.1064       1.0000          .0000       10.000    
     3 'Normalizat'    1.0231       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .87867       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=   6286.621     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      262 TOTAL
                     EDM=   .75E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     17.760        122.91        .23762E-02    .91609E-03
   2  Index         2.1065        2.3026        .83244E-01    .48539E-03
   3  Normalizat    1.0231        .12768        .64551E-01    .10672E-03
   4  Prefactor     .87865        .64803E-01    .44733E-01    .18666E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 17.7602
  Index      = 2.10651
  Normalizat = 1.02309
  Prefactor  = 0.878652
 **********
 **   18 **HESSE 
 **********

 FCN=   6286.621     FROM HESSE     STATUS=OK            29 CALLS      291 TOTAL
                     EDM=   .31E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     17.760        11.072        .95047E-04   -1.4865    
   2  Index         2.1065        .31203        .34236E-02   -.61713    
   3  Normalizat    1.0231        .20199        .28552E-03   -.92261    
   4  Prefactor     .87865        .12732        .19231E-03   -.96891    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.10413e-10
Minuit parameter uncertainties:
  1  11.0732
  2  0.312332
  3  0.202146
  4  0.127367
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/2971': 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) = 6286.62130068
delta logL = 0.0733627499967

Extracting fit parameters...

4FGL J0159.5+1046
   Spectrum: PowerLaw
219    Prefactor:  1.776e+01  1.107e+01  1.000e-04  1.000e+04 ( 1.000e-13)
220        Index:  2.107e+00  3.123e-01  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:  8.787e-01  1.274e-01  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:  1.023e+00  2.021e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 13.09
Ra Dec: 29.886 10.774
Photon Index (Free Index): 2.11 +/- 0.31
Photon Flux (Free Index): 1.05e-07 +/- 4.64e-08
Energy Flux (Free Index): 5.66e-05 +/- 3.47e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/2971/cmap_HighResolution_600134401_600393601_4FGL_J0159.5+1046_daily_bin1392.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='9.59e-08', energy_flux2='5.66e-05', photon_flux_error='3.88e-08', dlogl='7.34e-02', energy_flux='6.72e-05', photon_flux2='1.05e-07', job_status='DONE', time_completed='2021-08-15 01:04:37.223048', photon_index_error2='0.31', photon_index2='2.11', ts='13.01', fit_tolerance='1e-08', GAL='0.88', photon_index_error='0.00', energy_flux_error2='3.47e-05', EG='1.03', time_epoch_completed='1629014677.22', return_code='0', job_id='2971', GAL2='0.88', EG2='1.02', return_code2='0', energy_flux_error='2.72e-05', photon_flux_error2='4.64e-08', ts2='13.09', photon_index='1.99' WHERE bin_id='1392' AND source_name='4FGL J0159.5+1046' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Aug 15 01:04:37 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0246>
Subject: Job 2971: <4FGL_J0159.5+1046_daily_bin1392> in cluster <slac> Done

Job <4FGL_J0159.5+1046_daily_bin1392> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sun Aug 15 00:50:24 2021
Job was executed on host(s) <bullet0246>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Aug 15 00:50:37 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sun Aug 15 00:50:37 2021
Terminated at Sun Aug 15 01:04:37 2021
Results reported at Sun Aug 15 01:04:37 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0159.5+1046_daily_bin1392 29.8858 10.7737 600134401 600393601 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 :                                   671.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             254.62 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   840 sec.
    Turnaround time :                            853 sec.

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

