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


Performing analysis on: 4FGL_J0338.9-2848_daily_bin1048
RA = 54.7447, Dec = -28.8009
tmin = 510969601, tmax = 511228801
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='721094', job_status='RUN', time_executed='2021-08-18 21:16:49.823443', time_epoch_executed='1629346609.82' WHERE source_name='4FGL J0338.9-2848' and cadence='daily' and bin_id='1048'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/721094

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/721094/ft1_4FGL_J0338.9-2848_daily_bin1048.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/721094/ft2_4FGL_J0338.9-2848_daily_bin1048.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/721094/ft1_4FGL_J0338.9-2848_daily_bin1048.fits outfile=/scratch/kocevski/721094/ft1_filteredMKT_4FGL_J0338.9-2848_daily_bin1048.fits ra=54.7447 dec=-28.8009 rad=12.0 tmin=510969601.0 tmax=511228801.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 10.02
user 3.23
sys 5.82

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/721094/ft2_4FGL_J0338.9-2848_daily_bin1048.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/721094/ft2_4FGL_J0338.9-2848_daily_bin1048.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/721094/ft1_filteredMKT_4FGL_J0338.9-2848_daily_bin1048.fits evtable="EVENTS" outfile="/scratch/kocevski/721094/ft1_filtered_4FGL_J0338.9-2848_daily_bin1048.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.65
user 0.32
sys 5.29

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/721094/ft1_filtered_4FGL_J0338.9-2848_daily_bin1048.fits" evtable="EVENTS" scfile=/scratch/kocevski/721094/ft2_4FGL_J0338.9-2848_daily_bin1048.fits sctable="SC_DATA" outfile=/scratch/kocevski/721094/ltcube_510969601_511228801_4FGL_J0338.9-2848_daily_bin1048.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/721094/ft2_4FGL_J0338.9-2848_daily_bin1048.fits
.....................!
real 18.22
user 12.00
sys 6.08

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/721094/ft1_filtered_4FGL_J0338.9-2848_daily_bin1048.fits evtable="EVENTS" scfile=/scratch/kocevski/721094/ft2_4FGL_J0338.9-2848_daily_bin1048.fits sctable="SC_DATA" expcube=/scratch/kocevski/721094/ltcube_510969601_511228801_4FGL_J0338.9-2848_daily_bin1048.fits outfile=/scratch/kocevski/721094/expmap_510969601_511228801_4FGL_J0338.9-2848_daily_bin1048.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/721094/ltcube_510969601_511228801_4FGL_J0338.9-2848_daily_bin1048.fits
.....................!
real 199.72
user 187.44
sys 11.88

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 163 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 J0338.9-2848 @ 54.7447 -28.8009

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/721094/ft1_filtered_4FGL_J0338.9-2848_daily_bin1048.fits scfile=/scratch/kocevski/721094/ft2_4FGL_J0338.9-2848_daily_bin1048.fits outfile=/scratch/kocevski/721094/cmap_510969601_511228801_4FGL_J0338.9-2848_daily_bin1048.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=54.7447 yref=-28.8009 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.60
user 0.38
sys 5.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/721094/ft1_filtered_4FGL_J0338.9-2848_daily_bin1048.fits scfile=/scratch/kocevski/721094/ft2_4FGL_J0338.9-2848_daily_bin1048.fits outfile=/scratch/kocevski/721094/cmap_HighResolution_510969601_511228801_4FGL_J0338.9-2848_daily_bin1048.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=54.7447 yref=-28.8009 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.61
user 0.39
sys 5.19

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/721094/ft1_filtered_4FGL_J0338.9-2848_daily_bin1048.fits evtable="EVENTS" scfile=/scratch/kocevski/721094/ft2_4FGL_J0338.9-2848_daily_bin1048.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/721094/Model_4FGL_J0338.9-2848_daily_bin1048.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/721094/ft1_filtered_4FGL_J0338.9-2848_daily_bin1048.fits.....................!
real 144.80
user 136.56
sys 7.95

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/721094/ft1_filtered_4FGL_J0338.9-2848_daily_bin1048.fits', '/scratch/kocevski/721094/ft2_4FGL_J0338.9-2848_daily_bin1048.fits', expMap='/scratch/kocevski/721094/expmap_510969601_511228801_4FGL_J0338.9-2848_daily_bin1048.fits', expCube='/scratch/kocevski/721094/ltcube_510969601_511228801_4FGL_J0338.9-2848_daily_bin1048.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/721094/Model_4FGL_J0338.9-2848_daily_bin1048.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0338.9-2848'

4FGL J0338.9-2848
   Spectrum: PowerLaw
258    Prefactor:  7.603e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
259        Index:  1.942e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
260        Scale:  2.410e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/721094/ft1_filtered_4FGL_J0338.9-2848_daily_bin1048.fits
Spacecraft file(s): /scratch/kocevski/721094/ft2_4FGL_J0338.9-2848_daily_bin1048.fits
Exposure map: /scratch/kocevski/721094/expmap_510969601_511228801_4FGL_J0338.9-2848_daily_bin1048.fits
Exposure cube: /scratch/kocevski/721094/ltcube_510969601_511228801_4FGL_J0338.9-2848_daily_bin1048.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/721094/Model_4FGL_J0338.9-2848_daily_bin1048.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) = 6530.0174124

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10108E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    10.179       1.0000         .10000E-03   10000.    
     3 'norm      '    3.3472       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10053E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    6.6273       1.0000         .10000E-03   10000.    
     8 'norm      '    2.5634       1.0000         .10000E-03   10000.    
     9 'norm      '    1.7002       1.0000         .10000E-03   10000.    
    10 'Prefactor '    22.868       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .38621E-01   1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.5466       1.0000         .10000E-03   10000.    
    13 'Prefactor '    1.8412       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    1.2927       1.0000         .10000E-03   10000.    
    17 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10562E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    9.5515       1.0000         .10000E-03   10000.    
    21 'Prefactor '    8.5541       1.0000         .10000E-03   10000.    
    22 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    .82719       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .84014       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5210E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6529.891     FROM MIGRAD    STATUS=CONVERGED    616 CALLS     2937 TOTAL
                     EDM=   .28E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    15.660       -.76906E-06** at limit **
   2  Prefactor     10.185        8.4181       -.74459E-05    .10368E-04
   3  norm          3.3471        2.1730        .59874E-07    .23576E-04
   4  Prefactor     .10000E-03    7.3199       -.12590E-06** at limit **
   5  Prefactor     .10000E-03    66.769        .43788E-06** at limit **
   6  Prefactor     .10000E-03    3.6306       -.82129E-07** at limit **
   7  Prefactor     6.6307        21.380       -.15151E-04   -.17680E-04
   8  norm          2.5636        1.9846       -.60167E-07    .20647E-04
   9  norm          1.7003        .79579       -.54278E-07    .39806E-04
  10  Prefactor     22.870        22.259       -.23842E-05    .25337E-04
  11  Prefactor     .10339E-03    22.825       -.89299E-06** at limit **
  12  Prefactor     1.5465        1.2054       -.55308E-07   -.54144E-04
  13  Prefactor     1.8429        3.1714       -.65095E-06   -.86411E-03
  14  Prefactor     .10000E-03    1.1875        .82266E-07** at limit **
  15  Prefactor     .10000E-03    3.2602       -.55899E-07** at limit **
  16  norm          1.2926        .60948        .27596E-07    .37320E-03
  17  norm          .10000E-03    .25617        .33097E-07** at limit **
  18  Prefactor     .10000E-03    22.581        .45061E-06** at limit **
  19  Prefactor     .10000E-03    .65298        .11634E-07** at limit **
  20  norm          9.5513        7.2723       -.10907E-05    .36046E-04
  21  Prefactor     8.5348        11.851       -.25348E-05   -.24291E-04
  22  norm          .10000E-03    .63436E-01   -.40255E-07** at limit **
  23  norm          .10000E-03    5.0299       -.14690E-06** at limit **
  24  Normalizat    .82721        .13082        .22148E-05    .48798E-05
  25  Prefactor     .84001        .13905        .14022E-06    .19701E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 10.185
  norm       = 3.34707
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.6307
  norm       = 2.56364
  norm       = 1.70032
  Prefactor  = 22.8699
  Prefactor  = 0.00010339
  Prefactor  = 1.54645
  Prefactor  = 1.84287
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.29262
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 9.55126
  Prefactor  = 8.53483
  norm       = 0.0001
  norm       = 0.0001
  Normalizat = 0.827214
  Prefactor  = 0.840009
 **********
 **   18 **HESSE 
 **********

 FCN=   6529.891     FROM HESSE     STATUS=OK           437 CALLS     3374 TOTAL
                     EDM=   .57E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    15.684        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     10.185        8.3989        .12559E-03   -1.5070    
   3  norm          3.3471        2.1722        .93213E-04   -1.5342    
   4  Prefactor     .10000E-03    7.3348        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    66.782        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    3.6367        .15037E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     6.6307        21.413        .15588E-03   -1.5193    
   8  norm          2.5636        1.9835        .96895E-04   -1.5388    
   9  norm          1.7003        .79553        .47594E-04   -1.5447    
  10  Prefactor     22.870        22.238        .83761E-04   -1.4751    
  11  Prefactor     .10339E-03    25.130        .12081       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     1.5465        1.1998        .75714E-04   -1.5459    
  13  Prefactor     1.8429        3.1546        .17451E-03   -1.5436    
  14  Prefactor     .10000E-03    1.2012        .85558E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    3.2673        .14249E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          1.2926        .60736        .41207E-04   -1.5481    
  17  norm          .10000E-03    .26231        .79802E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    22.585        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    .66824        .63740E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          9.5513        7.2694        .12967E-03   -1.5090    
  21  Prefactor     8.5348        11.848        .13706E-03   -1.5124    
  22  norm          .10000E-03    .80904E-01    .39583E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          .10000E-03    5.1948        .35382E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    .82721        .15065        .21284E-03   -.99067    
  25  Prefactor     .84001        .16107        .22959E-03   -.98270    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.65349e-10
Minuit parameter uncertainties:
  1  8.62155e-05
  2  8.39989
  3  2.1722
  4  1.01514e-05
  5  2.4906e-05
  6  3.96891e-06
  7  21.4379
  8  1.98356
  9  0.795539
  10  22.2461
  11  0.0184675
  12  1.19983
  13  3.15488
  14  4.47862e-06
  15  3.61358e-06
  16  0.607359
  17  6.41131e-07
  18  5.13313e-08
  19  1.77839e-06
  20  7.27004
  21  11.8513
  22  7.42791e-07
  23  1.74245e-05
  24  0.150724
  25  0.161161
Done.

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

Extracting fit parameters...

4FGL J0338.9-2848
   Spectrum: PowerLaw
258    Prefactor:  2.287e+01  2.225e+01  1.000e-04  1.000e+04 ( 1.000e-14)
259        Index:  1.942e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
260        Scale:  2.410e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
518    Prefactor:  8.400e-01  1.612e-01  0.000e+00  1.000e+01 ( 1.000e+00)
519        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
520        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
514   Normalization:  8.272e-01  1.507e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 5.57
Ra Dec: 54.745 -28.801
Photon Index (Fixed Index): 1.94 +/- 0.00
Photon Flux (Fixed Index): 1.17e-08 +/- 1.14e-08
Energy Flux (Fixed Index): 9.39e-06 +/- 9.13e-06

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) = 6528.44701629
delta logL = 1.44413935059

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6528.31098375
delta logL = 1.58017188262

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6528.311     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      215 TOTAL
                     EDM=   .22E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.860        11.617        .30415E-02   -.59106E-04
   2  Index         .65728        .49015        .30940       -.17300E-04
   3  Normalizat    .83893        .12539        .44116E-01    .16556E-04
   4  Prefactor     .83371        .13701        .44155E-01    .23411E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.8599
  Index      = 0.657283
  Normalizat = 0.838931
  Prefactor  = 0.833709
 **********
 **   18 **HESSE 
 **********

 FCN=   6528.311     FROM HESSE     STATUS=OK            33 CALLS      248 TOTAL
                     EDM=   .65E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.860        17.282        .12166E-03   -1.5049    
   2  Index         .65728        .67135        .14748E-01   -1.0523    
   3  Normalizat    .83893        .14414        .21146E-03   -.98640    
   4  Prefactor     .83371        .15751        .23035E-03   -.98498    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.47191e-10
Minuit parameter uncertainties:
  1  17.2904
  2  0.679851
  3  0.144206
  4  0.157595
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/721094': 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) = 6528.31097951
delta logL = 1.58017612963

Extracting fit parameters...

4FGL J0338.9-2848
   Spectrum: PowerLaw
258    Prefactor:  1.086e+01  1.729e+01  1.000e-04  1.000e+04 ( 1.000e-14)
259        Index:  6.573e-01  6.799e-01  0.000e+00  1.000e+01 (-1.000e+00)
260        Scale:  2.410e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
518    Prefactor:  8.337e-01  1.576e-01  0.000e+00  1.000e+01 ( 1.000e+00)
519        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
520        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
514   Normalization:  8.389e-01  1.442e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.72
Ra Dec: 54.745 -28.801
Photon Index (Free Index): 0.66 +/- 0.68
Photon Flux (Free Index): 2.48e-09 +/- 2.54e-09
Energy Flux (Free Index): 6.99e-05 +/- 8.94e-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/721094/cmap_HighResolution_510969601_511228801_4FGL_J0338.9-2848_daily_bin1048.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.17e-08', energy_flux2='6.99e-05', photon_flux_error='1.14e-08', dlogl='1.58e+00', energy_flux='9.39e-06', photon_flux2='2.48e-09', job_status='DONE', time_completed='2021-08-18 21:29:57.793305', photon_index_error2='0.68', photon_index2='0.66', ts='5.57', fit_tolerance='1e-08', GAL='0.84', photon_index_error='0.00', energy_flux_error2='8.94e-05', EG='0.83', time_epoch_completed='1629347397.79', return_code='0', job_id='721094', GAL2='0.83', EG2='0.84', return_code2='0', energy_flux_error='9.13e-06', photon_flux_error2='2.54e-09', ts2='8.72', photon_index='1.94' WHERE bin_id='1048' AND source_name='4FGL J0338.9-2848' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Aug 18 21:29:57 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0253>
Subject: Job 721094: <4FGL_J0338.9-2848_daily_bin1048> in cluster <slac> Done

Job <4FGL_J0338.9-2848_daily_bin1048> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Wed Aug 18 21:13:51 2021
Job was executed on host(s) <bullet0253>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Aug 18 21:14:36 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Aug 18 21:14:36 2021
Terminated at Wed Aug 18 21:29:59 2021
Results reported at Wed Aug 18 21:29:59 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0338.9-2848_daily_bin1048 54.7447 -28.8009 510969601 511228801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0338.9-2848 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   862.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             318.48 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   922 sec.
    Turnaround time :                            968 sec.

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

