/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 4 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 = 7412
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J0238.4-3116_daily_bin297
RA = 39.6209, Dec = -31.2828
tmin = 316310401, tmax = 316569601
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='598268', job_status='RUN', time_executed='2021-08-16 09:15:42.321808', time_epoch_executed='1629130542.32' WHERE source_name='4FGL J0238.4-3116' and cadence='daily' and bin_id='297'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/598268

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/598268/ft1_4FGL_J0238.4-3116_daily_bin297.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/598268/ft2_4FGL_J0238.4-3116_daily_bin297.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/598268/ft1_4FGL_J0238.4-3116_daily_bin297.fits outfile=/scratch/kocevski/598268/ft1_filteredMKT_4FGL_J0238.4-3116_daily_bin297.fits ra=39.6209 dec=-31.2828 rad=12.0 tmin=316310401.0 tmax=316569601.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 4.43
user 3.27
sys 1.11

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/598268/ft2_4FGL_J0238.4-3116_daily_bin297.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/598268/ft2_4FGL_J0238.4-3116_daily_bin297.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/598268/ft1_filteredMKT_4FGL_J0238.4-3116_daily_bin297.fits evtable="EVENTS" outfile="/scratch/kocevski/598268/ft1_filtered_4FGL_J0238.4-3116_daily_bin297.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 1.49
user 0.33
sys 1.07

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/598268/ft1_filtered_4FGL_J0238.4-3116_daily_bin297.fits" evtable="EVENTS" scfile=/scratch/kocevski/598268/ft2_4FGL_J0238.4-3116_daily_bin297.fits sctable="SC_DATA" outfile=/scratch/kocevski/598268/ltcube_316310401_316569601_4FGL_J0238.4-3116_daily_bin297.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/598268/ft2_4FGL_J0238.4-3116_daily_bin297.fits
.....................!
real 14.12
user 12.70
sys 1.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/598268/ft1_filtered_4FGL_J0238.4-3116_daily_bin297.fits evtable="EVENTS" scfile=/scratch/kocevski/598268/ft2_4FGL_J0238.4-3116_daily_bin297.fits sctable="SC_DATA" expcube=/scratch/kocevski/598268/ltcube_316310401_316569601_4FGL_J0238.4-3116_daily_bin297.fits outfile=/scratch/kocevski/598268/expmap_316310401_316569601_4FGL_J0238.4-3116_daily_bin297.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/598268/ltcube_316310401_316569601_4FGL_J0238.4-3116_daily_bin297.fits
.....................!
real 194.81
user 186.29
sys 6.26

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 173 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 J0238.4-3116 @ 39.6209 -31.2828

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/598268/ft1_filtered_4FGL_J0238.4-3116_daily_bin297.fits scfile=/scratch/kocevski/598268/ft2_4FGL_J0238.4-3116_daily_bin297.fits outfile=/scratch/kocevski/598268/cmap_316310401_316569601_4FGL_J0238.4-3116_daily_bin297.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=39.6209 yref=-31.2828 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 1.63
user 0.37
sys 1.05

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/598268/ft1_filtered_4FGL_J0238.4-3116_daily_bin297.fits scfile=/scratch/kocevski/598268/ft2_4FGL_J0238.4-3116_daily_bin297.fits outfile=/scratch/kocevski/598268/cmap_HighResolution_316310401_316569601_4FGL_J0238.4-3116_daily_bin297.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=39.6209 yref=-31.2828 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 1.58
user 0.40
sys 1.02

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/598268/ft1_filtered_4FGL_J0238.4-3116_daily_bin297.fits evtable="EVENTS" scfile=/scratch/kocevski/598268/ft2_4FGL_J0238.4-3116_daily_bin297.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/598268/Model_4FGL_J0238.4-3116_daily_bin297.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/598268/ft1_filtered_4FGL_J0238.4-3116_daily_bin297.fits.....................!
real 90.31
user 86.51
sys 2.44

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/598268/ft1_filtered_4FGL_J0238.4-3116_daily_bin297.fits', '/scratch/kocevski/598268/ft2_4FGL_J0238.4-3116_daily_bin297.fits', expMap='/scratch/kocevski/598268/expmap_316310401_316569601_4FGL_J0238.4-3116_daily_bin297.fits', expCube='/scratch/kocevski/598268/ltcube_316310401_316569601_4FGL_J0238.4-3116_daily_bin297.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/598268/Model_4FGL_J0238.4-3116_daily_bin297.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0238.4-3116'

4FGL J0238.4-3116
   Spectrum: PowerLaw
285    Prefactor:  1.261e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
286        Index:  1.820e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
287        Scale:  2.751e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/598268/ft1_filtered_4FGL_J0238.4-3116_daily_bin297.fits
Spacecraft file(s): /scratch/kocevski/598268/ft2_4FGL_J0238.4-3116_daily_bin297.fits
Exposure map: /scratch/kocevski/598268/expmap_316310401_316569601_4FGL_J0238.4-3116_daily_bin297.fits
Exposure cube: /scratch/kocevski/598268/ltcube_316310401_316569601_4FGL_J0238.4-3116_daily_bin297.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/598268/Model_4FGL_J0238.4-3116_daily_bin297.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) = 4294.27563377

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    .25037       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .72956       1.0000         .10000E-03   10000.    
     5 'Prefactor '    1.9874       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    2.7070       1.0000         .10000E-03   10000.    
     8 'Prefactor '    9.9897       1.0000         .10000E-03   10000.    
     9 'Prefactor '    43.993       1.0000         .10000E-03   10000.    
    10 'Prefactor '    83.064       1.0000         .10000E-03   10000.    
    11 'Prefactor '    7.0563       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    64.251       1.0000         .10000E-03   10000.    
    14 'norm      '    7.1482       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10525E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .17973E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10086E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    19.825       1.0000         .10000E-03   10000.    
    19 'Normalizat'    .91044       1.0000         .10000E-01   10.000    
    20 'Prefactor '    .88962       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5500E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   4294.266     FROM MIGRAD    STATUS=CONVERGED    445 CALLS     2104 TOTAL
                     EDM=   .97E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    14.004       -.82970E-09** at limit **
   2  Prefactor     .29617        13.149       -.90040E-06    .19160E-03
   3  Prefactor     .10000E-03    3.6611       -.32251E-07** at limit **
   4  Prefactor     .73145        5.3570        .28017E-07   -.11294E-04
   5  Prefactor     1.9874        .76657        .22223E-07   -.18206E-03
   6  Prefactor     .10000E-03    157.08       -.59905E-05** at limit **
   7  norm          2.7048        3.7397       -.52491E-06   -.47103E-04
   8  Prefactor     9.9953        35.425        .52680E-05    .53556E-05
   9  Prefactor     43.993        44.394        .15620E-05    .26359E-05
  10  Prefactor     83.068        63.406        .32907E-05    .47399E-05
  11  Prefactor     7.0543        6.9980       -.15055E-07    .23072E-04
  12  Prefactor     .10000E-03    88.917       -.12514E-05** at limit **
  13  Prefactor     64.249        50.996        .47517E-06   -.17192E-07
  14  norm          7.1485        2.8701       -.55905E-08   -.20594E-04
  15  Prefactor     .10000E-03    9.3467       -.23470E-07** at limit **
  16  norm          .10000E-03    3.1742        .34217E-07** at limit **
  17  Prefactor     .10000E-03    54.946        .21142E-06** at limit **
  18  Prefactor     19.825        27.495        .49236E-06   -.32176E-06
  19  Normalizat    .91024        .19094       -.19088E-06    .51298E-04
  20  Prefactor     .88980        .21284       -.53326E-06    .46251E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.296166
  Prefactor  = 0.0001
  Prefactor  = 0.731447
  Prefactor  = 1.98735
  Prefactor  = 0.0001
  norm       = 2.70478
  Prefactor  = 9.99529
  Prefactor  = 43.9927
  Prefactor  = 83.0684
  Prefactor  = 7.05425
  Prefactor  = 0.0001
  Prefactor  = 64.2492
  norm       = 7.14852
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 19.8253
  Normalizat = 0.910239
  Prefactor  = 0.889803
 **********
 **   18 **HESSE 
 **********

 FCN=   4294.266     FROM HESSE     STATUS=OK           299 CALLS     2403 TOTAL
                     EDM=   .24E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    14.004        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .29617        164.69        .45023E-02   -1.5599    
   3  Prefactor     .10000E-03    3.6630        .12245E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .73145        10.461        .28390E-02   -1.5537    
   5  Prefactor     1.9874        7.0016        .14696E-02   -1.5426    
   6  Prefactor     .10000E-03    157.47        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          2.7048        3.7236        .12990E-03   -1.5379    
   8  Prefactor     9.9953        35.479        .12678E-03   -1.5076    
   9  Prefactor     43.993        45.134        .60444E-04   -1.4380    
  10  Prefactor     83.068        63.412        .44073E-04   -1.3883    
  11  Prefactor     7.0543        6.9921        .15102E-03   -1.5177    
  12  Prefactor     .10000E-03    88.941        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     64.249        51.148        .50065E-04   -1.4103    
  14  norm          7.1485        2.8627        .66997E-04   -1.5173    
  15  Prefactor     .10000E-03    9.3691        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    6.7171        .22431E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    56.148        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     19.825        27.495        .89956E-04   -1.4817    
  19  Normalizat    .91024        .22561        .22614E-03   -.96101    
  20  Prefactor     .88980        .24970        .25932E-03   -.96498    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.41532e-08
Minuit parameter uncertainties:
  1  3.12603e-07
  2  14.0045
  3  4.21903e-07
  4  5.53311
  5  7.0045
  6  2.86632e-05
  7  3.72389
  8  35.5542
  9  45.1695
  10  63.4639
  11  6.99289
  12  2.10519e-05
  13  51.1833
  14  2.86274
  15  2.68181e-06
  16  1.27663e-05
  17  3.38417e-05
  18  27.5121
  19  0.225847
  20  0.250018
Done.

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

Extracting fit parameters...

4FGL J0238.4-3116
   Spectrum: PowerLaw
285    Prefactor:  7.054e+00  6.993e+00  1.000e-04  1.000e+04 ( 1.000e-13)
286        Index:  1.820e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
287        Scale:  2.751e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
547    Prefactor:  8.898e-01  2.500e-01  0.000e+00  1.000e+01 ( 1.000e+00)
548        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
549        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
543   Normalization:  9.102e-01  2.258e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.34
Ra Dec: 39.621 -31.283
Photon Index (Fixed Index): 1.82 +/- 0.00
Photon Flux (Fixed Index): 3.57e-08 +/- 3.54e-08
Energy Flux (Fixed Index): 4.03e-05 +/- 4.00e-05

TS (Fixed Index): 1.34
Ra Dec: 39.621 -31.283
Photon Flux Upper Limit: 1.11e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.19e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/598268/likelihoodResults_316310401_316569601_4FGL_J0238.4-3116_daily_bin297.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) = 4292.85209197
delta logL = 1.41351282979

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4292.84606715
delta logL = 1.41953764639

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.0070       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0017       1.0000          .0000       10.000    
     3 'Normalizat'    .82906       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .94538       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5500E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4292.846     FROM MIGRAD    STATUS=CONVERGED     49 CALLS      222 TOTAL
                     EDM=   .18E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.0068        9.7545        .84339E-02    .43813E-03
   2  Index         3.0018        1.9594        .66094E-01    .15735E-03
   3  Normalizat    .82908        .58621E-01    .43988E-01    .98887E-05
   4  Prefactor     .94537        .65390E-01    .45581E-01    .73990E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.00682
  Index      = 3.00177
  Normalizat = 0.829077
  Prefactor  = 0.945366
 **********
 **   18 **HESSE 
 **********

 FCN=   4292.846     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      255 TOTAL
                     EDM=   .17E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.0068        16.929        .37721E-04   -1.5507    
   2  Index         3.0018        2.7928        .26640E-02   -.41113    
   3  Normalizat    .82908        .24098        .23517E-03   -.98999    
   4  Prefactor     .94537        .27933        .25193E-03   -.94573    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.70929e-07
Minuit parameter uncertainties:
  1  8.25919
  2  3.00318
  3  0.241292
  4  0.279754
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/598268': 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) = 4292.84606714
delta logL = 1.41953765396

Extracting fit parameters...

4FGL J0238.4-3116
   Spectrum: PowerLaw
285    Prefactor:  1.007e+00  8.259e+00  1.000e-04  1.000e+04 ( 1.000e-13)
286        Index:  3.002e+00  3.003e+00  0.000e+00  1.000e+01 (-1.000e+00)
287        Scale:  2.751e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
547    Prefactor:  9.454e-01  2.798e-01  0.000e+00  1.000e+01 ( 1.000e+00)
548        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
549        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
543   Normalization:  8.291e-01  2.413e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.25
Ra Dec: 39.621 -31.283
Photon Index (Free Index): 3.00 +/- 3.00
Photon Flux (Free Index): 1.06e-07 +/- 7.03e-08
Energy Flux (Free Index): 2.10e-05 +/- 2.84e-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/598268/cmap_HighResolution_316310401_316569601_4FGL_J0238.4-3116_daily_bin297.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.19e-03', comment='SUCCESS', photon_flux='3.57e-08', energy_flux2='2.10e-05', photon_flux_error='3.54e-08', dlogl='1.42e+00', energy_flux='4.03e-05', photon_flux2='1.06e-07', job_status='DONE', time_completed='2021-08-16 09:25:21.879021', photon_index_error2='3.00', photon_index2='3.00', ts='1.34', fit_tolerance='1e-08', GAL='0.89', photon_index_error='0.00', photon_flux_upper_limit='1.11e-07', energy_flux_error2='2.84e-05', EG='0.91', time_epoch_completed='1629131121.88', return_code='0', job_id='598268', GAL2='0.95', EG2='0.83', return_code2='102', energy_flux_error='4.00e-05', photon_flux_error2='7.03e-08', ts2='4.25', photon_index='1.82' WHERE bin_id='297' AND source_name='4FGL J0238.4-3116' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Aug 16 09:25:21 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0197>
Subject: Job 598268: <4FGL_J0238.4-3116_daily_bin297> in cluster <slac> Done

Job <4FGL_J0238.4-3116_daily_bin297> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Mon Aug 16 09:10:59 2021
Job was executed on host(s) <bullet0197>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Aug 16 09:14:56 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Aug 16 09:14:56 2021
Terminated at Mon Aug 16 09:25:22 2021
Results reported at Mon Aug 16 09:25:22 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0238.4-3116_daily_bin297 39.6209 -31.2828 316310401 316569601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0238.4-3116 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   583.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             338.74 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   626 sec.
    Turnaround time :                            863 sec.

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

