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


Performing analysis on: 4FGL_J0158.5-3932_daily_bin1423
RA = 29.646, Dec = -39.5358
tmin = 608169601, tmax = 608428801
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='973266', job_status='RUN', time_executed='2021-08-14 23:28:34.078759', time_epoch_executed='1629008914.08' WHERE source_name='4FGL J0158.5-3932' and cadence='daily' and bin_id='1423'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/973266

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/973266/ft1_4FGL_J0158.5-3932_daily_bin1423.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/973266/ft2_4FGL_J0158.5-3932_daily_bin1423.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/973266/ft1_4FGL_J0158.5-3932_daily_bin1423.fits outfile=/scratch/kocevski/973266/ft1_filteredMKT_4FGL_J0158.5-3932_daily_bin1423.fits ra=29.646 dec=-39.5358 rad=12.0 tmin=608169601.0 tmax=608428801.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 9.27
user 3.45
sys 5.53

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/973266/ft2_4FGL_J0158.5-3932_daily_bin1423.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/973266/ft1_filteredMKT_4FGL_J0158.5-3932_daily_bin1423.fits evtable="EVENTS" outfile="/scratch/kocevski/973266/ft1_filtered_4FGL_J0158.5-3932_daily_bin1423.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 5.86
user 0.33
sys 5.30

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/973266/ft1_filtered_4FGL_J0158.5-3932_daily_bin1423.fits" evtable="EVENTS" scfile=/scratch/kocevski/973266/ft2_4FGL_J0158.5-3932_daily_bin1423.fits sctable="SC_DATA" outfile=/scratch/kocevski/973266/ltcube_608169601_608428801_4FGL_J0158.5-3932_daily_bin1423.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/973266/ft2_4FGL_J0158.5-3932_daily_bin1423.fits
.....................!
real 21.75
user 14.13
sys 6.28

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/973266/ft1_filtered_4FGL_J0158.5-3932_daily_bin1423.fits evtable="EVENTS" scfile=/scratch/kocevski/973266/ft2_4FGL_J0158.5-3932_daily_bin1423.fits sctable="SC_DATA" expcube=/scratch/kocevski/973266/ltcube_608169601_608428801_4FGL_J0158.5-3932_daily_bin1423.fits outfile=/scratch/kocevski/973266/expmap_608169601_608428801_4FGL_J0158.5-3932_daily_bin1423.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/973266/ltcube_608169601_608428801_4FGL_J0158.5-3932_daily_bin1423.fits
.....................!
real 201.75
user 187.65
sys 11.07

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_archive_v18/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/973266/ft1_filtered_4FGL_J0158.5-3932_daily_bin1423.fits scfile=/scratch/kocevski/973266/ft2_4FGL_J0158.5-3932_daily_bin1423.fits outfile=/scratch/kocevski/973266/cmap_608169601_608428801_4FGL_J0158.5-3932_daily_bin1423.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 5.85
user 0.39
sys 5.32

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/973266/ft1_filtered_4FGL_J0158.5-3932_daily_bin1423.fits scfile=/scratch/kocevski/973266/ft2_4FGL_J0158.5-3932_daily_bin1423.fits outfile=/scratch/kocevski/973266/cmap_HighResolution_608169601_608428801_4FGL_J0158.5-3932_daily_bin1423.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 5.82
user 0.39
sys 5.23

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/973266/ft1_filtered_4FGL_J0158.5-3932_daily_bin1423.fits evtable="EVENTS" scfile=/scratch/kocevski/973266/ft2_4FGL_J0158.5-3932_daily_bin1423.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/973266/Model_4FGL_J0158.5-3932_daily_bin1423.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/973266/ft1_filtered_4FGL_J0158.5-3932_daily_bin1423.fits.....................!
real 121.22
user 111.33
sys 8.17

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/973266/ft1_filtered_4FGL_J0158.5-3932_daily_bin1423.fits', '/scratch/kocevski/973266/ft2_4FGL_J0158.5-3932_daily_bin1423.fits', expMap='/scratch/kocevski/973266/expmap_608169601_608428801_4FGL_J0158.5-3932_daily_bin1423.fits', expCube='/scratch/kocevski/973266/ltcube_608169601_608428801_4FGL_J0158.5-3932_daily_bin1423.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/973266/Model_4FGL_J0158.5-3932_daily_bin1423.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  1.000e-04  1.000e+04 ( 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/973266/ft1_filtered_4FGL_J0158.5-3932_daily_bin1423.fits
Spacecraft file(s): /scratch/kocevski/973266/ft2_4FGL_J0158.5-3932_daily_bin1423.fits
Exposure map: /scratch/kocevski/973266/expmap_608169601_608428801_4FGL_J0158.5-3932_daily_bin1423.fits
Exposure cube: /scratch/kocevski/973266/ltcube_608169601_608428801_4FGL_J0158.5-3932_daily_bin1423.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/973266/Model_4FGL_J0158.5-3932_daily_bin1423.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) = 5593.03601469

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .23110E-02   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10944E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10306E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    3.0839       1.0000         .10000E-03   10000.    
     6 'Prefactor '    5.7882       1.0000         .10000E-03   10000.    
     7 'norm      '    4.5640       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .15950       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .14726E-02   1.0000         .10000E-03   10000.    
    10 'norm      '    30.615       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10441E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10400E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10674E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    47.649       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10443E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10317E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .15145E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.4246       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .55122       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.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5593.004     FROM MIGRAD    STATUS=CONVERGED    522 CALLS     2126 TOTAL
                     EDM=   .39E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY= 11.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    289.88       -.52314E-04** at limit **
   2  Prefactor     .10000E-03    1.4963        .23618E-07** at limit **
   3  Prefactor     .10000E-03    18.204        .22312E-06** at limit **
   4  Prefactor     .10000E-03    15.445       -.24448E-06** at limit **
   5  Prefactor     3.0834        3.7416        .10084E-06    .89717E-04
   6  Prefactor     5.7864        6.4792       -.36975E-06   -.47542E-03
   7  norm          4.5553        5.1484       -.12516E-05    .14434E-05
   8  Prefactor     .18013        18.978        .12002E-04    .80259E-05
   9  Prefactor     .10000E-03    120.76        .55608E-05** at limit **
  10  norm          30.615        4.1378       -.13727E-07   -.75587E-03
  11  Prefactor     .10000E-03    12.334        .12393E-06** at limit **
  12  Prefactor     .10000E-03    9.2525       -.14163E-05** at limit **
  13  Prefactor     .10000E-03    25.768        .52294E-07** at limit **
  14  norm          .10000E-03    1.7929        .15119E-06** at limit **
  15  Prefactor     47.656        17.312        .13146E-06   -.13175E-03
  16  Prefactor     .10000E-03    9.2280        .13963E-05** at limit **
  17  Prefactor     .10000E-03    75.349       -.13110E-05** at limit **
  18  Prefactor     .10000E-03    2.7552        .48109E-07** at limit **
  19  norm          .10000E-03    .26819       -.77166E-08** at limit **
  20  Prefactor     .10000E-03    231.05        .11246E-05** at limit **
  21  Normalizat    1.4246        .18191       -.99065E-06   -.65787E-03
  22  Prefactor     .55122        .19607       -.12151E-06   -.34078E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100014
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.08339
  Prefactor  = 5.78642
  norm       = 4.55527
  Prefactor  = 0.18013
  Prefactor  = 0.000100005
  norm       = 30.6147
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 47.6556
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.42458
  Prefactor  = 0.551225
 **********
 **   18 **HESSE 
 **********

 FCN=   5593.004     FROM HESSE     STATUS=OK           346 CALLS     2472 TOTAL
                     EDM=   .75E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10001E-03    29.431        .10114       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    1.5138        .89310E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    18.329        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    15.477        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     3.0834        3.7373        .15242E-03   -1.5357    
   6  Prefactor     5.7864        6.5029        .16694E-03   -1.5227    
   7  norm          4.5553        5.1542        .85801E-03   -1.5281    
   8  Prefactor     .18013        78.217        .34082E-02   -1.5623    
   9  Prefactor     .10000E-03    121.98        .40971E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          30.615        4.1382        .53758E-04   -1.4601    
  11  Prefactor     .10000E-03    12.427        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    9.2689        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    25.780        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    3.5729        .19312E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     47.656        17.333        .58089E-04   -1.4326    
  16  Prefactor     .10000E-03    9.2430        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    75.777        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    5.3270        .24190E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    .26907        .37810E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    231.20        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.4246        .21226        .20965E-03   -.79920    
  22  Prefactor     .55122        .22731        .35103E-03   -1.0968    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.4572e-10
Minuit parameter uncertainties:
  1  0.00129675
  2  3.42189e-06
  3  3.05187e-05
  4  8.21543e-06
  5  3.73758
  6  6.50371
  7  5.15469
  8  7.51495
  9  0.00149302
  10  4.13822
  11  1.47621e-05
  12  2.24684e-05
  13  1.17397e-05
  14  3.21224e-05
  15  17.3348
  16  3.09944e-05
  17  7.00864e-05
  18  1.36697e-05
  19  1.31528e-07
  20  0.000177103
  21  0.212389
  22  0.227685
Done.

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

Extracting fit parameters...

4FGL J0158.5-3932
   Spectrum: PowerLaw
278    Prefactor:  1.801e-01  7.515e+00  1.000e-04  1.000e+04 ( 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:  5.512e-01  2.277e-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.425e+00  2.124e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 29.646 -39.536
Photon Flux Upper Limit: 5.58e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.22e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/973266/likelihoodResults_608169601_608428801_4FGL_J0158.5-3932_daily_bin1423.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) = 5593.0036695
delta logL = 0.000719119868336

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5593.00077481
delta logL = 0.00361381242419

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .48745       1.0000         .10000E-03   10000.    
     2 'Index     '    2.3653       1.0000          .0000       10.000    
     3 'Normalizat'    1.4238       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .55090       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=   5593.001     FROM MIGRAD    STATUS=CONVERGED     66 CALLS      266 TOTAL
                     EDM=   .27E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .48495        17.911        .56709E-01    .62076E-03
   2  Index         2.3661        .97416        .50000        .41621E-05
   3  Normalizat    1.4238        .80454E-02    .47438E-01    .15282E-04
   4  Prefactor     .55090        .88264E-02    .79273E-01    .39437E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.484953
  Index      = 2.3661
  Normalizat = 1.42383
  Prefactor  = 0.550901
 **********
 **   18 **HESSE 
 **********

 FCN=   5593.001     FROM HESSE     STATUS=OK            35 CALLS      301 TOTAL
                     EDM=   .17E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .48495        26.550        .34453E-02   -1.5569    
   2  Index         2.3661        2.9961        .94105E-02   -.55481    
   3  Normalizat    1.4238        .20776        .20969E-03   -.79942    
   4  Prefactor     .55090        .22684        .35111E-03   -1.0969    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.67323e-10
Minuit parameter uncertainties:
  1  7.17913
  2  3.32505
  3  0.20788
  4  0.227214
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/973266': 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) = 5593.00077469
delta logL = 0.00361393427283

Extracting fit parameters...

4FGL J0158.5-3932
   Spectrum: PowerLaw
278    Prefactor:  4.850e-01  7.179e+00  1.000e-04  1.000e+04 ( 1.000e-13)
279        Index:  2.366e+00  3.325e+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:  5.509e-01  2.272e-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.424e+00  2.079e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 29.646 -39.536

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/973266/cmap_HighResolution_608169601_608428801_4FGL_J0158.5-3932_daily_bin1423.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.22e-03', job_status='DONE', photon_flux_upper_limit='5.58e-08', time_completed='2021-08-14 23:41:38.930176', job_id='973266', GAL2='0.55', fit_tolerance='1e-08', EG2='1.42', EG='1.42', time_epoch_completed='1629009698.93', return_code2='0', ts='0.00', comment='SUCCESS', return_code='0', GAL='0.55', dlogl='3.61e-03', ts2='0.01', photon_index_error='0.00', photon_index='2.09' WHERE bin_id='1423' AND source_name='4FGL J0158.5-3932' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Aug 14 23:41:39 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0055>
Subject: Job 973266: <4FGL_J0158.5-3932_daily_bin1423> in cluster <slac> Done

Job <4FGL_J0158.5-3932_daily_bin1423> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Sat Aug 14 23:25:26 2021
Job was executed on host(s) <bullet0055>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Aug 14 23:26:55 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Aug 14 23:26:55 2021
Terminated at Sat Aug 14 23:41:40 2021
Results reported at Sat Aug 14 23:41:40 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0158.5-3932_daily_bin1423 29.646 -39.5358 608169601 608428801 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 :                                   836.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             308.77 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   884 sec.
    Turnaround time :                            974 sec.

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

