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


Performing analysis on: 4FGL_J0159.5+1046_monthly_bin118
RA = 29.8858, Dec = 10.7737
tmin = 542851201, tmax = 545443201
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='723759', job_status='RUN', time_executed='2021-10-09 21:51:54.139715', time_epoch_executed='1633841514.14' WHERE source_name='4FGL J0159.5+1046' and cadence='monthly' and bin_id='118'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/723759

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

Retrieving the FT1 file...

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

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

Retrieving 176 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/723759/ft1_4FGL_J0159.5+1046_monthly_bin118.fits


Retrieving the FT1 file...

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

Retrieving 178 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/723759/ft2_4FGL_J0159.5+1046_monthly_bin118.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/723759/ft1_4FGL_J0159.5+1046_monthly_bin118.fits outfile=/scratch/kocevski/723759/ft1_filteredMKT_4FGL_J0159.5+1046_monthly_bin118.fits ra=29.8858 dec=10.7737 rad=12.0 tmin=542851201.0 tmax=545443201.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 18.33
user 17.82
sys 0.47

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/723759/ft1_filtered_4FGL_J0159.5+1046_monthly_bin118.fits" evtable="EVENTS" scfile=/scratch/kocevski/723759/ft2_4FGL_J0159.5+1046_monthly_bin118.fits sctable="SC_DATA" outfile=/scratch/kocevski/723759/ltcube_542851201_545443201_4FGL_J0159.5+1046_monthly_bin118.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/723759/ft2_4FGL_J0159.5+1046_monthly_bin118.fits
.....................!
real 39.44
user 38.97
sys 0.37

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/723759/ft1_filtered_4FGL_J0159.5+1046_monthly_bin118.fits evtable="EVENTS" scfile=/scratch/kocevski/723759/ft2_4FGL_J0159.5+1046_monthly_bin118.fits sctable="SC_DATA" expcube=/scratch/kocevski/723759/ltcube_542851201_545443201_4FGL_J0159.5+1046_monthly_bin118.fits outfile=/scratch/kocevski/723759/expmap_542851201_545443201_4FGL_J0159.5+1046_monthly_bin118.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/723759/ltcube_542851201_545443201_4FGL_J0159.5+1046_monthly_bin118.fits
.....................!
real 191.34
user 186.20
sys 4.78

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/723759/ft1_filtered_4FGL_J0159.5+1046_monthly_bin118.fits scfile=/scratch/kocevski/723759/ft2_4FGL_J0159.5+1046_monthly_bin118.fits outfile=/scratch/kocevski/723759/cmap_542851201_545443201_4FGL_J0159.5+1046_monthly_bin118.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.60
user 0.45
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/723759/ft1_filtered_4FGL_J0159.5+1046_monthly_bin118.fits scfile=/scratch/kocevski/723759/ft2_4FGL_J0159.5+1046_monthly_bin118.fits outfile=/scratch/kocevski/723759/cmap_HighResolution_542851201_545443201_4FGL_J0159.5+1046_monthly_bin118.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.61
user 0.44
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    61.679       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    118.80       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    13.045       1.0000         .10000E-03   10000.    
     7 'Prefactor '    3.3657       1.0000         .10000E-03   10000.    
     8 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10940E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .83675       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .63991E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    10.829       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    7.6351       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10288E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    29.276       1.0000         .10000E-03   10000.    
    19 'norm      '    .10206E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10226E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    .35807       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.0805       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=   1145.752     FROM MIGRAD    STATUS=CONVERGED    585 CALLS     2858 TOTAL
                     EDM=   .51E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     61.669        59.495        .71375E-07    .43370E-05
   2  Prefactor     .10000E-03    41.689        .13148E-06** at limit **
   3  Prefactor     118.79        64.660        .13836E-06    .99344E-05
   4  Prefactor     .10000E-03    8.0955        .69700E-06** at limit **
   5  norm          .10000E-03    18.590        .82510E-07** at limit **
   6  Prefactor     13.045        13.021       -.62249E-06    .22988E-04
   7  Prefactor     3.3647        6.6768       -.13276E-08    .36653E-04
   8  norm          .10000E-03    4.1752       -.18913E-06** at limit **
   9  Prefactor     .10000E-03    8.4360       -.59394E-05** at limit **
  10  norm          .83570        2.0830        .81439E-06    .21991E-03
  11  Prefactor     .10000E-03    114.95       -.91792E-05** at limit **
  12  Prefactor     .10000E-03    26.624       -.80213E-07** at limit **
  13  Prefactor     .10000E-03    7.2578       -.39459E-06** at limit **
  14  Prefactor     10.432        701.56       -.38538E-05    .61309E-05
  15  Prefactor     .10000E-03    7.0842       -.42677E-06** at limit **
  16  Prefactor     7.4749        109.35        .76857E-06    .28017E-04
  17  Prefactor     .10000E-03    12.028       -.18335E-05** at limit **
  18  Prefactor     29.278        25.895       -.88986E-07    .20597E-04
  19  norm          .10000E-03    .99786       -.10404E-06** at limit **
  20  Prefactor     .10000E-03    44.854       -.32821E-06** at limit **
  21  Prefactor     .10000E-03    33.697        .43899E-06** at limit **
  22  norm          .10000E-03    10.028       -.33414E-06** at limit **
  23  Prefactor     .10000E-03    37.173       -.11948E-06** at limit **
  24  Normalizat    .35843        .43691       -.10433E-04    .37045E-04
  25  Prefactor     1.0804        .29784        .42941E-05    .42278E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 61.6694
  Prefactor  = 0.0001
  Prefactor  = 118.788
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 13.0448
  Prefactor  = 3.36466
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.835697
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 10.4325
  Prefactor  = 0.0001
  Prefactor  = 7.47495
  Prefactor  = 0.0001
  Prefactor  = 29.2784
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.358435
  Prefactor  = 1.08036
 **********
 **   18 **HESSE 
 **********

 FCN=   1145.752     FROM HESSE     STATUS=OK           413 CALLS     3271 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     61.669        59.460        .51091E-04   -1.4136    
   2  Prefactor     .10000E-03    41.690        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     118.79        64.580        .18460E-03   -1.3524    
   4  Prefactor     .10000E-03    8.1758        .94045E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    18.591        .14260E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     13.045        13.019        .55452E-03   -1.4985    
   7  Prefactor     3.3647        6.6740        .11874E-03   -1.5341    
   8  norm          .10000E-03    4.1754        .67561E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    8.4926        .18919E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .83570        2.0306        .68451E-04   -1.5525    
  11  Prefactor     .10000E-03    115.29        .21029E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    26.624        .17067E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    7.2610        .89083E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     10.432        718.23        .12175E-03   -1.5062    
  15  Prefactor     .10000E-03    7.0868        .88009E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     7.4749        108.56        .14513E-03   -1.5161    
  17  Prefactor     .10000E-03    12.047        .11473E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     29.278        25.850        .74046E-04   -1.4625    
  19  norm          .10000E-03    1.0405        .65854E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    44.857        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    33.696        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          .10000E-03    10.030        .10472E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    37.175        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    .35843        .45113        .40822E-03   -1.1951    
  25  Prefactor     1.0804        .31696        .17091E-03   -.90097    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.10556e-10
Minuit parameter uncertainties:
  1  59.5178
  2  3.02499e-05
  3  64.6182
  4  8.55772e-06
  5  8.17558e-06
  6  13.0221
  7  6.67544
  8  1.49109e-06
  9  7.91662e-05
  10  2.03081
  11  0.000878979
  12  3.99007e-05
  13  1.69384e-06
  14  175.361
  15  2.71309e-06
  16  57.0969
  17  7.07294e-06
  18  25.8599
  19  1.81919e-06
  20  8.21609e-05
  21  7.25938e-05
  22  3.14917e-06
  23  4.37691e-05
  24  0.455812
  25  0.317514
Done.

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

Extracting fit parameters...

4FGL J0159.5+1046
   Spectrum: PowerLaw
219    Prefactor:  1.304e+01  1.302e+01  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.080e+00  3.175e-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:  3.584e-01  4.558e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 9.37
Ra Dec: 29.886 10.774
Photon Index (Fixed Index): 1.99 +/- 0.00
Photon Flux (Fixed Index): 6.05e-08 +/- 6.04e-08
Energy Flux (Fixed Index): 4.24e-05 +/- 4.23e-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) = 1143.66597702
delta logL = 2.08562889388

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 1143.66375086
delta logL = 2.08785505005

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    14.080       1.0000         .10000E-03   10000.    
     2 'Index     '    .75753       1.0000          .0000       10.000    
     3 'Normalizat'    .36723       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0807       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=   1143.664     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      199 TOTAL
                     EDM=   .19E-12  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     14.075        20.232       -.17092E-05   -.30594E-05
   2  Index         .75744        .62339       -.20503E-04    .19205E-06
   3  Normalizat    .36727        .40446        .55952E-06    .45605E-07
   4  Prefactor     1.0807        .28871       -.15918E-06    .63081E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 14.0748
  Index      = 0.757437
  Normalizat = 0.36727
  Prefactor  = 1.08066
 **********
 **   18 **HESSE 
 **********

 FCN=   1143.664     FROM HESSE     STATUS=OK            31 CALLS      230 TOTAL
                     EDM=   .40E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     14.075        20.157        .10674E-03   -1.4957    
   2  Index         .75744        .62237        .54853E-03   -1.0132    
   3  Normalizat    .36727        .43145        .40291E-03   -1.1903    
   4  Prefactor     1.0807        .30929        .17072E-03   -.90087    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.98709e-13
Minuit parameter uncertainties:
  1  20.1663
  2  0.628254
  3  0.435442
  4  0.309807
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/723759': 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) = 1143.66375082
delta logL = 2.08785509361

Extracting fit parameters...

4FGL J0159.5+1046
   Spectrum: PowerLaw
219    Prefactor:  1.407e+01  2.017e+01  1.000e-04  1.000e+04 ( 1.000e-13)
220        Index:  7.574e-01  6.283e-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:  1.081e+00  3.098e-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:  3.673e-01  4.354e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 13.54
Ra Dec: 29.886 10.774
Photon Index (Free Index): 0.76 +/- 0.63
Photon Flux (Free Index): 2.59e-08 +/- 2.65e-08
Energy Flux (Free Index): 6.22e-04 +/- 8.27e-04

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/723759/cmap_HighResolution_542851201_545443201_4FGL_J0159.5+1046_monthly_bin118.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='6.05e-08', energy_flux2='6.22e-04', photon_flux_error='6.04e-08', dlogl='2.09e+00', energy_flux='4.24e-05', photon_flux2='2.59e-08', job_status='DONE', time_completed='2021-10-09 22:01:11.680307', photon_index_error2='0.63', photon_index2='0.76', ts='9.37', fit_tolerance='1e-08', GAL='1.08', photon_index_error='0.00', energy_flux_error2='8.27e-04', EG='0.36', time_epoch_completed='1633842071.68', return_code='0', job_id='723759', GAL2='1.08', EG2='0.37', return_code2='0', energy_flux_error='4.23e-05', photon_flux_error2='2.65e-08', ts2='13.54', photon_index='1.99' WHERE bin_id='118' AND source_name='4FGL J0159.5+1046' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Sat Oct  9 22:01:11 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0036>
Subject: Job 723759: <4FGL_J0159.5+1046_monthly_bin118> in cluster <slac> Done

Job <4FGL_J0159.5+1046_monthly_bin118> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Sat Oct  9 21:50:22 2021
Job was executed on host(s) <bullet0036>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Oct  9 21:50:23 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Oct  9 21:50:23 2021
Terminated at Sat Oct  9 22:01:13 2021
Results reported at Sat Oct  9 22:01:13 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0159.5+1046_monthly_bin118 29.8858 10.7737 542851201 545443201 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 :                                   493.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             254.96 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   648 sec.
    Turnaround time :                            651 sec.

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

