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


Performing analysis on: 4FGL_J0158.5-3932_daily_bin1094
RA = 29.646, Dec = -39.5358
tmin = 522892801, tmax = 523152001
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='971616', job_status='RUN', time_executed='2021-08-14 23:26:08.259716', time_epoch_executed='1629008768.26' WHERE source_name='4FGL J0158.5-3932' and cadence='daily' and bin_id='1094'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/971616

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/971616/ft1_4FGL_J0158.5-3932_daily_bin1094.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/971616/ft2_4FGL_J0158.5-3932_daily_bin1094.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/971616/ft1_4FGL_J0158.5-3932_daily_bin1094.fits outfile=/scratch/kocevski/971616/ft1_filteredMKT_4FGL_J0158.5-3932_daily_bin1094.fits ra=29.646 dec=-39.5358 rad=12.0 tmin=522892801.0 tmax=523152001.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.55
sys 4.17

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/971616/ft2_4FGL_J0158.5-3932_daily_bin1094.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/971616/ft1_filteredMKT_4FGL_J0158.5-3932_daily_bin1094.fits evtable="EVENTS" outfile="/scratch/kocevski/971616/ft1_filtered_4FGL_J0158.5-3932_daily_bin1094.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 4.45
user 0.36
sys 4.03

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/971616/ft1_filtered_4FGL_J0158.5-3932_daily_bin1094.fits" evtable="EVENTS" scfile=/scratch/kocevski/971616/ft2_4FGL_J0158.5-3932_daily_bin1094.fits sctable="SC_DATA" outfile=/scratch/kocevski/971616/ltcube_522892801_523152001_4FGL_J0158.5-3932_daily_bin1094.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/971616/ft2_4FGL_J0158.5-3932_daily_bin1094.fits
.....................!
real 19.67
user 14.84
sys 4.74

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/971616/ft1_filtered_4FGL_J0158.5-3932_daily_bin1094.fits evtable="EVENTS" scfile=/scratch/kocevski/971616/ft2_4FGL_J0158.5-3932_daily_bin1094.fits sctable="SC_DATA" expcube=/scratch/kocevski/971616/ltcube_522892801_523152001_4FGL_J0158.5-3932_daily_bin1094.fits outfile=/scratch/kocevski/971616/expmap_522892801_523152001_4FGL_J0158.5-3932_daily_bin1094.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/971616/ltcube_522892801_523152001_4FGL_J0158.5-3932_daily_bin1094.fits
.....................!
real 198.22
user 187.30
sys 9.90

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/971616/ft1_filtered_4FGL_J0158.5-3932_daily_bin1094.fits scfile=/scratch/kocevski/971616/ft2_4FGL_J0158.5-3932_daily_bin1094.fits outfile=/scratch/kocevski/971616/cmap_522892801_523152001_4FGL_J0158.5-3932_daily_bin1094.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 4.50
user 0.39
sys 4.06

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/971616/ft1_filtered_4FGL_J0158.5-3932_daily_bin1094.fits scfile=/scratch/kocevski/971616/ft2_4FGL_J0158.5-3932_daily_bin1094.fits outfile=/scratch/kocevski/971616/cmap_HighResolution_522892801_523152001_4FGL_J0158.5-3932_daily_bin1094.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 4.38
user 0.41
sys 3.94

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/971616/ft1_filtered_4FGL_J0158.5-3932_daily_bin1094.fits evtable="EVENTS" scfile=/scratch/kocevski/971616/ft2_4FGL_J0158.5-3932_daily_bin1094.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/971616/Model_4FGL_J0158.5-3932_daily_bin1094.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/971616/ft1_filtered_4FGL_J0158.5-3932_daily_bin1094.fits.....................!
real 90.95
user 84.13
sys 6.40

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/971616/ft1_filtered_4FGL_J0158.5-3932_daily_bin1094.fits', '/scratch/kocevski/971616/ft2_4FGL_J0158.5-3932_daily_bin1094.fits', expMap='/scratch/kocevski/971616/expmap_522892801_523152001_4FGL_J0158.5-3932_daily_bin1094.fits', expCube='/scratch/kocevski/971616/ltcube_522892801_523152001_4FGL_J0158.5-3932_daily_bin1094.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/971616/Model_4FGL_J0158.5-3932_daily_bin1094.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/971616/ft1_filtered_4FGL_J0158.5-3932_daily_bin1094.fits
Spacecraft file(s): /scratch/kocevski/971616/ft2_4FGL_J0158.5-3932_daily_bin1094.fits
Exposure map: /scratch/kocevski/971616/expmap_522892801_523152001_4FGL_J0158.5-3932_daily_bin1094.fits
Exposure cube: /scratch/kocevski/971616/ltcube_522892801_523152001_4FGL_J0158.5-3932_daily_bin1094.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/971616/Model_4FGL_J0158.5-3932_daily_bin1094.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) = 4156.17237622

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    3.3853       1.0000         .10000E-03   10000.    
     3 'Prefactor '    21.639       1.0000         .10000E-03   10000.    
     4 'Prefactor '    16.514       1.0000         .10000E-03   10000.    
     5 'Prefactor '    3.6758       1.0000         .10000E-03   10000.    
     6 'Prefactor '    2.2228       1.0000         .10000E-03   10000.    
     7 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    24.557       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    5.8254       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10084E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    2.5377       1.0000         .10000E-03   10000.    
    14 'norm      '    .10089E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10050E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .33407E-02   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    1.9715       1.0000         .10000E-03   10000.    
    19 'norm      '    2.0175       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10393E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.1488       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .62548       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=   4156.166     FROM MIGRAD    STATUS=CONVERGED    492 CALLS     2368 TOTAL
                     EDM=   .10E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    8.9335        .84457E-06** at limit **
   2  Prefactor     3.3873        5.9265        .71061E-05    .12330E-03
   3  Prefactor     21.645        27.724        .19767E-06   -.26111E-04
   4  Prefactor     16.518        24.285       -.74596E-06   -.35731E-04
   5  Prefactor     3.6762        3.6285       -.20442E-06   -.24293E-03
   6  Prefactor     2.2256        8.9043       -.23914E-05   -.38168E-03
   7  norm          .10000E-03    1.6581       -.34937E-06** at limit **
   8  Prefactor     24.561        14.503        .10135E-06   -.17205E-03
   9  Prefactor     .10000E-03    12.627        .63372E-05** at limit **
  10  norm          5.8260        2.4783        .20006E-06   -.60880E-04
  11  Prefactor     .10000E-03    17.482       -.17876E-05** at limit **
  12  Prefactor     .10000E-03    11.000       -.89925E-05** at limit **
  13  Prefactor     2.5426        131.81        .85390E-05   -.64839E-05
  14  norm          .10000E-03    1.8376        .46842E-06** at limit **
  15  Prefactor     .10000E-03    10.295        .44866E-05** at limit **
  16  Prefactor     .10171E-03    29.301       -.39906E-05** at limit **
  17  Prefactor     .10000E-03    45.610        .27909E-05** at limit **
  18  Prefactor     1.9713        2.9245        .66091E-07   -.70625E-04
  19  norm          2.0178        1.1321        .62414E-08   -.12446E-03
  20  Prefactor     .10000E-03    148.61        .77246E-05** at limit **
  21  Normalizat    1.1488        .19095       -.19628E-05    .80296E-04
  22  Prefactor     .62519        .19997        .75057E-07   -.39213E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 3.38729
  Prefactor  = 21.6452
  Prefactor  = 16.5182
  Prefactor  = 3.67622
  Prefactor  = 2.2256
  norm       = 0.0001
  Prefactor  = 24.5611
  Prefactor  = 0.000100001
  norm       = 5.82596
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 2.54259
  norm       = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.000101707
  Prefactor  = 0.0001
  Prefactor  = 1.97127
  norm       = 2.01782
  Prefactor  = 0.000100001
  Normalizat = 1.14885
  Prefactor  = 0.62519
 **********
 **   18 **HESSE 
 **********

 FCN=   4156.166     FROM HESSE     STATUS=OK           346 CALLS     2714 TOTAL
                     EDM=   .99E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    8.9390        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     3.3873        5.7565        .18700E-03   -1.5340    
   3  Prefactor     21.645        27.701        .86106E-04   -1.4777    
   4  Prefactor     16.518        24.268        .98557E-04   -1.4895    
   5  Prefactor     3.6762        3.6217        .11710E-03   -1.5324    
   6  Prefactor     2.2256        8.9527        .27580E-03   -1.5410    
   7  norm          .10000E-03    1.6584        .81013E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     24.561        14.501        .40417E-03   -1.4716    
   9  Prefactor     .10000E-03    12.693        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          5.8260        2.4764        .63150E-04   -1.5225    
  11  Prefactor     .10000E-03    17.654        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    11.034        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     2.5426        131.66        .25637E-03   -1.5389    
  14  norm          .10000E-03    6.0328        .16129E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    10.420        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10171E-03    183.12        .63713E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    45.726        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     1.9713        2.9047        .13074E-03   -1.5427    
  19  norm          2.0178        1.1314        .49821E-04   -1.5424    
  20  Prefactor     .10000E-03    148.72        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.1488        .22048        .19925E-03   -.88199    
  22  Prefactor     .62519        .23096        .28657E-03   -1.0654    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.93414e-09
Minuit parameter uncertainties:
  1  5.34111e-06
  2  5.75744
  3  27.7172
  4  24.2824
  5  3.62195
  6  8.92966
  7  2.13887e-06
  8  14.5036
  9  0.000186593
  10  2.47647
  11  2.36853e-05
  12  0.000197706
  13  36.6773
  14  0.000184495
  15  0.000121889
  16  0.0354647
  17  0.00019495
  18  2.90487
  19  1.1314
  20  0.000751161
  21  0.220656
  22  0.231314
Done.

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

Extracting fit parameters...

4FGL J0158.5-3932
   Spectrum: PowerLaw
278    Prefactor:  2.456e+01  1.450e+01  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:  6.252e-01  2.313e-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.149e+00  2.207e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 7.04
Ra Dec: 29.646 -39.536
Photon Index (Fixed Index): 2.09 +/- 0.00
Photon Flux (Fixed Index): 5.47e-08 +/- 3.23e-08
Energy Flux (Fixed Index): 3.06e-05 +/- 1.81e-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) = 4156.09505458
delta logL = 0.0709432291906

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4156.09321827
delta logL = 0.072779541385

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    20.778       1.0000         .10000E-03   10000.    
     2 'Index     '    2.2663       1.0000          .0000       10.000    
     3 'Normalizat'    1.1394       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .63155       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=   4156.093     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      257 TOTAL
                     EDM=   .40E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     20.794        280.21        .21967E-02   -.20332E-03
   2  Index         2.2671        3.4060        .11473       -.57839E-05
   3  Normalizat    1.1392        .10739        .36583E-01   -.67510E-05
   4  Prefactor     .63164        .95804E-01    .64455E-01    .69953E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 20.7945
  Index      = 2.26711
  Normalizat = 1.13918
  Prefactor  = 0.631636
 **********
 **   18 **HESSE 
 **********

 FCN=   4156.093     FROM HESSE     STATUS=OK            31 CALLS      288 TOTAL
                     EDM=   .39E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     20.794        16.890        .87869E-04   -1.4796    
   2  Index         2.2671        .49274        .45232E-02   -.57827    
   3  Normalizat    1.1392        .21214        .19993E-03   -.88504    
   4  Prefactor     .63164        .23030        .28519E-03   -1.0627    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.87113e-11
Minuit parameter uncertainties:
  1  16.8939
  2  0.493886
  3  0.212303
  4  0.230649
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/971616': 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) = 4156.09321146
delta logL = 0.0727863501916

Extracting fit parameters...

4FGL J0158.5-3932
   Spectrum: PowerLaw
278    Prefactor:  2.079e+01  1.689e+01  1.000e-04  1.000e+04 ( 1.000e-13)
279        Index:  2.267e+00  4.939e-01  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:  6.316e-01  2.306e-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.139e+00  2.123e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 7.16
Ra Dec: 29.646 -39.536
Photon Index (Free Index): 2.27 +/- 0.49
Photon Flux (Free Index): 6.34e-08 +/- 4.17e-08
Energy Flux (Free Index): 2.53e-05 +/- 1.90e-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/971616/cmap_HighResolution_522892801_523152001_4FGL_J0158.5-3932_daily_bin1094.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='5.47e-08', energy_flux2='2.53e-05', photon_flux_error='3.23e-08', dlogl='7.28e-02', energy_flux='3.06e-05', photon_flux2='6.34e-08', job_status='DONE', time_completed='2021-08-14 23:36:47.155653', photon_index_error2='0.49', photon_index2='2.27', ts='7.04', fit_tolerance='1e-08', GAL='0.63', photon_index_error='0.00', energy_flux_error2='1.90e-05', EG='1.15', time_epoch_completed='1629009407.16', return_code='0', job_id='971616', GAL2='0.63', EG2='1.14', return_code2='0', energy_flux_error='1.81e-05', photon_flux_error2='4.17e-08', ts2='7.16', photon_index='2.09' WHERE bin_id='1094' AND source_name='4FGL J0158.5-3932' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Aug 14 23:36:47 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0110>
Subject: Job 971616: <4FGL_J0158.5-3932_daily_bin1094> in cluster <slac> Done

Job <4FGL_J0158.5-3932_daily_bin1094> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Sat Aug 14 23:20:48 2021
Job was executed on host(s) <bullet0110>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Aug 14 23:22:23 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:22:23 2021
Terminated at Sat Aug 14 23:36:48 2021
Results reported at Sat Aug 14 23:36:48 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0158.5-3932_daily_bin1094 29.646 -39.5358 522892801 523152001 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 :                                   669.46 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             261.87 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   867 sec.
    Turnaround time :                            960 sec.

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

