aklog: Couldn't determine realm of user:aklog: No credentials cache found  while getting realm
/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/pyfits/__init__.py:22: PyFITSDeprecationWarning: PyFITS is deprecated, please use astropy.io.fits
  PyFITSDeprecationWarning)  # noqa

Likelihood Analysis Tool
Support Contact: Daniel Kocevski (daniel.kocevski@nasa.gov)


Waiting 124 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 make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

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


Performing analysis on: 4FGL_J0158.5-3932_daily_bin1723
RA = 29.646, Dec = -39.5358
tmin = 685929601, tmax = 686188801
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='430244', job_status='RUN', time_executed='2022-09-30 00:07:32.550165', time_epoch_executed='1664521652.55' WHERE source_name='4FGL J0158.5-3932' and cadence='daily' and bin_id='1723'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/430244

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

Retrieving the FT1 file...

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

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

Retrieving 45 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/430244/ft1_4FGL_J0158.5-3932_daily_bin1723.fits


Retrieving the FT1 file...

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

Retrieving 45 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/430244/ft2_4FGL_J0158.5-3932_daily_bin1723.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/430244/ft1_4FGL_J0158.5-3932_daily_bin1723.fits outfile=/scratch/kocevski/430244/ft1_filteredMKT_4FGL_J0158.5-3932_daily_bin1723.fits ra=29.646 dec=-39.5358 rad=12.0 tmin=685929601.0 tmax=686188801.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 3.64
user 3.34
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/430244/ft2_4FGL_J0158.5-3932_daily_bin1723.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/430244/ft2_4FGL_J0158.5-3932_daily_bin1723.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/430244/ft1_filteredMKT_4FGL_J0158.5-3932_daily_bin1723.fits evtable="EVENTS" outfile="/scratch/kocevski/430244/ft1_filtered_4FGL_J0158.5-3932_daily_bin1723.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.54
user 0.32
sys 0.16

Number of photons that the gtmktime cut: 392

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/430244/ft1_filtered_4FGL_J0158.5-3932_daily_bin1723.fits" evtable="EVENTS" scfile=/scratch/kocevski/430244/ft2_4FGL_J0158.5-3932_daily_bin1723.fits sctable="SC_DATA" outfile=/scratch/kocevski/430244/ltcube_685929601_686188801_4FGL_J0158.5-3932_daily_bin1723.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/430244/ft2_4FGL_J0158.5-3932_daily_bin1723.fits
.....................!
real 12.04
user 11.54
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/430244/ft1_filtered_4FGL_J0158.5-3932_daily_bin1723.fits evtable="EVENTS" scfile=/scratch/kocevski/430244/ft2_4FGL_J0158.5-3932_daily_bin1723.fits sctable="SC_DATA" expcube=/scratch/kocevski/430244/ltcube_685929601_686188801_4FGL_J0158.5-3932_daily_bin1723.fits outfile=/scratch/kocevski/430244/expmap_685929601_686188801_4FGL_J0158.5-3932_daily_bin1723.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/430244/ltcube_685929601_686188801_4FGL_J0158.5-3932_daily_bin1723.fits
.....................!
real 191.70
user 186.41
sys 4.92

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
Extended source Fornax A in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/FornaxA.fits is the correct path to the extended template.
Added 174 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J0158.5-3932 @ 29.646 -39.5358

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/430244/ft1_filtered_4FGL_J0158.5-3932_daily_bin1723.fits scfile=/scratch/kocevski/430244/ft2_4FGL_J0158.5-3932_daily_bin1723.fits outfile=/scratch/kocevski/430244/cmap_685929601_686188801_4FGL_J0158.5-3932_daily_bin1723.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.646 yref=-39.5358 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.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/430244/ft1_filtered_4FGL_J0158.5-3932_daily_bin1723.fits scfile=/scratch/kocevski/430244/ft2_4FGL_J0158.5-3932_daily_bin1723.fits outfile=/scratch/kocevski/430244/cmap_HighResolution_685929601_686188801_4FGL_J0158.5-3932_daily_bin1723.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.646 yref=-39.5358 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.55
user 0.38
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/430244/ft1_filtered_4FGL_J0158.5-3932_daily_bin1723.fits evtable="EVENTS" scfile=/scratch/kocevski/430244/ft2_4FGL_J0158.5-3932_daily_bin1723.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/430244/Model_4FGL_J0158.5-3932_daily_bin1723.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 Fornax A
adding source GAL_V02
Working on...
/scratch/kocevski/430244/ft1_filtered_4FGL_J0158.5-3932_daily_bin1723.fits.....................!
real 87.04
user 85.54
sys 1.31

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/430244/ft1_filtered_4FGL_J0158.5-3932_daily_bin1723.fits', '/scratch/kocevski/430244/ft2_4FGL_J0158.5-3932_daily_bin1723.fits', expMap='/scratch/kocevski/430244/expmap_685929601_686188801_4FGL_J0158.5-3932_daily_bin1723.fits', expCube='/scratch/kocevski/430244/ltcube_685929601_686188801_4FGL_J0158.5-3932_daily_bin1723.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/430244/Model_4FGL_J0158.5-3932_daily_bin1723.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0158.5-3932'

4FGL J0158.5-3932
   Spectrum: PowerLaw
278    Prefactor:  4.060e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
279        Index:  2.091e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
280        Scale:  1.384e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/430244/ft1_filtered_4FGL_J0158.5-3932_daily_bin1723.fits
Spacecraft file(s): /scratch/kocevski/430244/ft2_4FGL_J0158.5-3932_daily_bin1723.fits
Exposure map: /scratch/kocevski/430244/expmap_685929601_686188801_4FGL_J0158.5-3932_daily_bin1723.fits
Exposure cube: /scratch/kocevski/430244/ltcube_685929601_686188801_4FGL_J0158.5-3932_daily_bin1723.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/430244/Model_4FGL_J0158.5-3932_daily_bin1723.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) = 4387.18450396

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .26225E-05   1.0000          .0000       .10000E+07
     2 'Prefactor '    3.2026       1.0000          .0000       .10000E+07
     3 'Prefactor '    7.6212       1.0000          .0000       .10000E+07
     4 'Prefactor '    .88739E-05   1.0000          .0000       .10000E+07
     5 'norm      '    .31503E-03   1.0000          .0000       .10000E+07
     6 'Prefactor '    17.854       1.0000          .0000       .10000E+07
     7 'Prefactor '    18.380       1.0000          .0000       .10000E+07
     8 'norm      '    3.2729       1.0000          .0000       .10000E+07
     9 'Prefactor '    .77068E-03   1.0000          .0000       .10000E+07
    10 'Prefactor '    20.027       1.0000          .0000       .10000E+07
    11 'Prefactor '    25.054       1.0000          .0000       .10000E+07
    12 'norm      '    .25131E-04   1.0000          .0000       .10000E+07
    13 'Prefactor '    .67470E-03   1.0000          .0000       .10000E+07
    14 'Prefactor '    11.741       1.0000          .0000       .10000E+07
    15 'Prefactor '    .22724E-03   1.0000          .0000       .10000E+07
    16 'Prefactor '    4.0686       1.0000          .0000       .10000E+07
    17 'norm      '    .55511E-10   1.0000          .0000       .10000E+07
    18 'Normalizat'    1.0125       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .85350       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5510E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   4387.151     FROM MIGRAD    STATUS=CONVERGED    155 CALLS     1435 TOTAL
                     EDM=   .63E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        3.5881       -.52637E-08** at limit **
   2  Prefactor     4.3621        18.113        .33437E-05    .44276E-01
   3  Prefactor     7.7164        5.0967       -.36717E-07   -.17445E-02
   4  Prefactor     .55511E-10    7.7485        .44137E-06** at limit **
   5  norm          .55511E-10    2.6524        .27998E-05** at limit **
   6  Prefactor     17.918        15.552       -.24553E-05   -.29439E-01
   7  Prefactor     19.717        26.857       -.44963E-05    .52544E-01
   8  norm          3.2762        2.0013        .18029E-06    .25248E-02
   9  Prefactor     .27756E-09    11.195        .26562E-05** at limit **
  10  Prefactor     20.046        19.973       -.21648E-05   -.29934E-01
  11  Prefactor     24.497        71.071       -.43678E-05    .10021E-01
  12  norm           .0000        1.2606        .65976E-06** at limit **
  13  Prefactor      .0000        4.0450        .11261E-05** at limit **
  14  Prefactor     12.143        3.2590        .46058E-06    .15304E-01
  15  Prefactor     .26485E-05    32.249       -.68046E-06** at limit **
  16  Prefactor     4.1041        6.1957        .22132E-06    .65245E-03
  17  norm           .0000        1.0696        .76154E-07** at limit **
  18  Normalizat    1.0085        .21216        .97075E-05    .15200E-04
  19  Prefactor     .85481        .23277       -.51636E-05    .22197E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Prefactor  = 4.36213
  Prefactor  = 7.7164
  Prefactor  = 5.55112e-11
  norm       = 5.55112e-11
  Prefactor  = 17.9185
  Prefactor  = 19.7173
  norm       = 3.27623
  Prefactor  = 2.77556e-10
  Prefactor  = 20.046
  Prefactor  = 24.4973
  norm       = 0
  Prefactor  = 0
  Prefactor  = 12.1427
  Prefactor  = 2.64855e-06
  Prefactor  = 4.10408
  norm       = 0
  Normalizat = 1.00853
  Prefactor  = 0.854806
 **********
 **   18 **HESSE 
 **********

 FCN=   4387.151     FROM HESSE     STATUS=OK           306 CALLS     1741 TOTAL
                     EDM=   .69E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        3.5651        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     4.3621        49.236        .56591E-03   -1.5666    
   3  Prefactor     7.7164        5.1087        .36302E-03   -1.5652    
   4  Prefactor     .55511E-10    7.6985        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .55511E-10    2.6491        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     17.918        15.719        .23676E-03   -1.5623    
   7  Prefactor     19.717        30.339        .23334E-03   -1.5619    
   8  norm          3.2762        2.0012        .55949E-03   -1.5672    
   9  Prefactor     .27756E-09    11.185        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     20.046        20.235        .22353E-03   -1.5618    
  11  Prefactor     24.497        73.180        .19983E-03   -1.5609    
  12  norm           .0000        1.2570        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor      .0000        4.0405        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     12.143        25.297        .29211E-03   -1.5638    
  15  Prefactor     .26485E-05    35.989        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     4.1041        6.2105        .49962E-03   -1.5667    
  17  norm           .0000        1.0189        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.0085        .18348        .44826E-01   -.92745    
  19  Prefactor     .85481        .19936        .44410E-01   -.97739    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.92338e-07
Minuit parameter uncertainties:
  1  1.76257e-05
  2  29.3106
  3  5.10872
  4  4.29171e-05
  5  2.23185e-05
  6  15.7188
  7  30.3389
  8  2.00124
  9  0.000115969
  10  20.235
  11  73.1827
  12  2.42011e-06
  13  1.40379e-05
  14  25.2974
  15  0.0195265
  16  6.21048
  17  6.38087e-06
  18  0.18359
  19  0.199528
Done.

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

Extracting fit parameters...

4FGL J0158.5-3932
   Spectrum: PowerLaw
278    Prefactor:  1.792e+01  1.572e+01  0.000e+00  1.000e+06 ( 1.000e-13)
279        Index:  2.091e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
280        Scale:  1.384e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
548    Prefactor:  8.548e-01  1.995e-01  0.000e+00  1.000e+01 ( 1.000e+00)
549        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
550        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
544   Normalization:  1.009e+00  1.836e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.18
Ra Dec: 29.646 -39.536
Photon Index (Fixed Index): 2.09 +/- 0.00
Photon Flux (Fixed Index): 3.99e-08 +/- 3.50e-08
Energy Flux (Fixed Index): 2.24e-05 +/- 1.96e-05

TS (Fixed Index): 2.18
Ra Dec: 29.646 -39.536
Photon Flux Upper Limit: 1.18e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.92e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/430244/likelihoodResults_685929601_686188801_4FGL_J0158.5-3932_daily_bin1723.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): 0
logL (Free Index) = 4386.19737406
delta logL = 0.953300256321

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4386.18241429
delta logL = 0.968260021091

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.2958       1.0000          .0000       .10000E+07
     2 'Index     '    3.4155       1.0000          .0000       10.000    
     3 'Normalizat'    .91245       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .92938       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5510E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4386.182     FROM MIGRAD    STATUS=CONVERGED     46 CALLS      249 TOTAL
                     EDM=   .15E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.2958        33.727        .55744E-03    .16320E-01
   2  Index         3.4156        2.6083        .82885E-01    .11317E-03
   3  Normalizat    .91240        .69740E-01    .45061E-01    .46122E-05
   4  Prefactor     .92939        .72078E-01    .45378E-01    .71586E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.29581
  Index      = 3.41563
  Normalizat = 0.912403
  Prefactor  = 0.929394
 **********
 **   18 **HESSE 
 **********

 FCN=   4386.182     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      282 TOTAL
                     EDM=   .53E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.2958        50.843        .65615E-05   -1.5672    
   2  Index         3.4156        3.4539        .32796E-02   -.32243    
   3  Normalizat    .91240        .24915        .22224E-03   -.96026    
   4  Prefactor     .92939        .26632        .24851E-03   -.95121    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.30139e-08
Minuit parameter uncertainties:
  1  25.89
  2  3.86899
  3  0.249465
  4  0.266697
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/430244': 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) = 4386.18241417
delta logL = 0.968260149602

Extracting fit parameters...

4FGL J0158.5-3932
   Spectrum: PowerLaw
278    Prefactor:  3.296e+00  2.589e+01  0.000e+00  1.000e+06 ( 1.000e-13)
279        Index:  3.416e+00  3.869e+00  0.000e+00  1.000e+01 (-1.000e+00)
280        Scale:  1.384e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
548    Prefactor:  9.294e-01  2.667e-01  0.000e+00  1.000e+01 ( 1.000e+00)
549        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
550        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
544   Normalization:  9.124e-01  2.495e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.31
Ra Dec: 29.646 -39.536
Photon Index (Free Index): 3.42 +/- 3.87
Photon Flux (Free Index): 1.08e-07 +/- 1.01e-07
Energy Flux (Free Index): 1.84e-05 +/- 1.30e-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/430244/cmap_HighResolution_685929601_686188801_4FGL_J0158.5-3932_daily_bin1723.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.92e-03', comment='SUCCESS', photon_flux='3.99e-08', energy_flux2='1.84e-05', photon_flux_error='3.50e-08', dlogl='9.68e-01', energy_flux='2.24e-05', photon_flux2='1.08e-07', job_status='DONE', time_completed='2022-09-30 00:16:05.390068', photon_index_error2='3.87', photon_index2='3.42', ts='2.18', fit_tolerance='1e-08', GAL='0.85', photon_index_error='0.00', photon_flux_upper_limit='1.18e-07', energy_flux_error2='1.30e-05', EG='1.01', time_epoch_completed='1664522165.39', return_code='0', job_id='430244', GAL2='0.93', EG2='0.91', return_code2='102', energy_flux_error='1.96e-05', photon_flux_error2='1.01e-07', ts2='4.31', photon_index='2.09' WHERE bin_id='1723' AND source_name='4FGL J0158.5-3932' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Fri Sep 30 00:16:05 PDT 2022


------------------------------------------------------------
Sender: LSF System <lsf@bullet0070>
Subject: Job 430244: <4FGL_J0158.5-3932_daily_bin1723> in cluster <slac> Done

Job <4FGL_J0158.5-3932_daily_bin1723> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Fri Sep 30 00:05:05 2022
Job was executed on host(s) <bullet0070>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Sep 30 00:05:18 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri Sep 30 00:05:18 2022
Terminated at Fri Sep 30 00:16:06 2022
Results reported at Fri Sep 30 00:16:06 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0158.5-3932_daily_bin1723 29.646 -39.5358 685929601 686188801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0158.5-3932 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   515.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             316.81 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   647 sec.
    Turnaround time :                            661 sec.

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

