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


Performing analysis on: 4FGL_J0338.5+1302_daily_bin973
RA = 54.6355, Dec = 13.0419
tmin = 491529601, tmax = 491788801
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='706345', job_status='RUN', time_executed='2021-08-18 20:30:15.773624', time_epoch_executed='1629343815.77' WHERE source_name='4FGL J0338.5+1302' and cadence='daily' and bin_id='973'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/706345

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/706345/ft1_4FGL_J0338.5+1302_daily_bin973.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/706345/ft2_4FGL_J0338.5+1302_daily_bin973.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/706345/ft1_4FGL_J0338.5+1302_daily_bin973.fits outfile=/scratch/kocevski/706345/ft1_filteredMKT_4FGL_J0338.5+1302_daily_bin973.fits ra=54.6355 dec=13.0419 rad=12.0 tmin=491529601.0 tmax=491788801.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 5.65
user 3.26
sys 2.31

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/706345/ft2_4FGL_J0338.5+1302_daily_bin973.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/706345/ft2_4FGL_J0338.5+1302_daily_bin973.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/706345/ft1_filteredMKT_4FGL_J0338.5+1302_daily_bin973.fits evtable="EVENTS" outfile="/scratch/kocevski/706345/ft1_filtered_4FGL_J0338.5+1302_daily_bin973.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 2.74
user 0.33
sys 2.36

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/706345/ft1_filtered_4FGL_J0338.5+1302_daily_bin973.fits" evtable="EVENTS" scfile=/scratch/kocevski/706345/ft2_4FGL_J0338.5+1302_daily_bin973.fits sctable="SC_DATA" outfile=/scratch/kocevski/706345/ltcube_491529601_491788801_4FGL_J0338.5+1302_daily_bin973.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/706345/ft2_4FGL_J0338.5+1302_daily_bin973.fits
.....................!
real 14.16
user 11.34
sys 2.78

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/706345/ft1_filtered_4FGL_J0338.5+1302_daily_bin973.fits evtable="EVENTS" scfile=/scratch/kocevski/706345/ft2_4FGL_J0338.5+1302_daily_bin973.fits sctable="SC_DATA" expcube=/scratch/kocevski/706345/ltcube_491529601_491788801_4FGL_J0338.5+1302_daily_bin973.fits outfile=/scratch/kocevski/706345/expmap_491529601_491788801_4FGL_J0338.5+1302_daily_bin973.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/706345/ltcube_491529601_491788801_4FGL_J0338.5+1302_daily_bin973.fits
.....................!
real 193.10
user 184.87
sys 7.82

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
Added 157 point sources and 0 extended sources

Setting source of interest to:
4FGL J0338.5+1302 @ 54.6355 13.0419

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/706345/ft1_filtered_4FGL_J0338.5+1302_daily_bin973.fits scfile=/scratch/kocevski/706345/ft2_4FGL_J0338.5+1302_daily_bin973.fits outfile=/scratch/kocevski/706345/cmap_491529601_491788801_4FGL_J0338.5+1302_daily_bin973.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.6355 yref=13.0419 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 2.62
user 0.37
sys 2.20

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/706345/ft1_filtered_4FGL_J0338.5+1302_daily_bin973.fits scfile=/scratch/kocevski/706345/ft2_4FGL_J0338.5+1302_daily_bin973.fits outfile=/scratch/kocevski/706345/cmap_HighResolution_491529601_491788801_4FGL_J0338.5+1302_daily_bin973.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.6355 yref=13.0419 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 2.71
user 0.37
sys 2.32

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/706345/ft1_filtered_4FGL_J0338.5+1302_daily_bin973.fits evtable="EVENTS" scfile=/scratch/kocevski/706345/ft2_4FGL_J0338.5+1302_daily_bin973.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/706345/Model_4FGL_J0338.5+1302_daily_bin973.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 GAL_V02
Working on...
/scratch/kocevski/706345/ft1_filtered_4FGL_J0338.5+1302_daily_bin973.fits....................!
real 188.45
user 183.79
sys 4.13

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/706345/ft1_filtered_4FGL_J0338.5+1302_daily_bin973.fits', '/scratch/kocevski/706345/ft2_4FGL_J0338.5+1302_daily_bin973.fits', expMap='/scratch/kocevski/706345/expmap_491529601_491788801_4FGL_J0338.5+1302_daily_bin973.fits', expCube='/scratch/kocevski/706345/ltcube_491529601_491788801_4FGL_J0338.5+1302_daily_bin973.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/706345/Model_4FGL_J0338.5+1302_daily_bin973.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0338.5+1302'

4FGL J0338.5+1302
   Spectrum: LogParabola
285         norm:  1.629e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
286        alpha:  1.536e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
287         beta:  1.650e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
288           Eb:  3.451e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/706345/ft1_filtered_4FGL_J0338.5+1302_daily_bin973.fits
Spacecraft file(s): /scratch/kocevski/706345/ft2_4FGL_J0338.5+1302_daily_bin973.fits
Exposure map: /scratch/kocevski/706345/expmap_491529601_491788801_4FGL_J0338.5+1302_daily_bin973.fits
Exposure cube: /scratch/kocevski/706345/ltcube_491529601_491788801_4FGL_J0338.5+1302_daily_bin973.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/706345/Model_4FGL_J0338.5+1302_daily_bin973.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) = 13452.8082924

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .19022E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .16456E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .16786E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .37293E-02   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10235E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10241E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    1.3070       1.0000         .10000E-03   10000.    
    10 'norm      '    4.4566       1.0000         .10000E-03   10000.    
    11 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .61007       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .11454E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    12.967       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
    16 'Normalizat'    1.3596       1.0000         .10000E-01   10.000    
    17 'Prefactor '    .91923       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5140E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   13452.73     FROM MIGRAD    STATUS=CONVERGED    382 CALLS     1468 TOTAL
                     EDM=   .38E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    2.0855        .58723E-01** at limit **
   2  Prefactor     .10000E-03    2.0573        .90712E-01** at limit **
   3  norm          .10002E-03    3.7544        .90712E-01** at limit **
   4  Prefactor     .10000E-03    61.900        .90712E-02** at limit **
   5  Prefactor     .10000E-03    1.0988        .90712E-02** at limit **
   6  Prefactor     .10001E-03    2.3416        .97900E-01** at limit **
   7  Prefactor     .10000E-03    4.9633        .90712E-02** at limit **
   8  norm          .10000E-03    .97952        .38751E-01** at limit **
   9  Prefactor     1.3031        18.669        .96493E-02    .48654E-03
  10  norm          4.4556        4.9604        .47686E-02   -.25310E-03
  11  norm          .10000E-03    18.260        .90712E-02** at limit **
  12  Prefactor     .46647        27.992        .16738        .23211E-03
  13  Prefactor     .10000E-03    20.948        .90712E-02** at limit **
  14  Prefactor     12.969        11.580        .27809E-02    .17301E-04
  15  Prefactor     .10000E-03    14.819        .90712E-02** at limit **
  16  Normalizat    1.3598        .21586        .97309E-01    .31046E-03
  17  Prefactor     .91926        .58131E-01    .32140E-01   -.49266E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.00010002
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100007
  Prefactor  = 0.0001
  norm       = 0.000100001
  Prefactor  = 1.30309
  norm       = 4.45563
  norm       = 0.000100003
  Prefactor  = 0.466466
  Prefactor  = 0.000100001
  Prefactor  = 12.9686
  Prefactor  = 0.0001
  Normalizat = 1.35983
  Prefactor  = 0.919262
 **********
 **   18 **HESSE 
 **********

 FCN=   13452.73     FROM HESSE     STATUS=OK           237 CALLS     1705 TOTAL
                     EDM=   .36E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    6.2024        .32272E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    25.096        .32365E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10002E-03    20.238        .42757E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    61.912        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    1.1003        .11871E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10001E-03    40.010        .33563E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    4.9702        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    1.7601        .21650E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     1.3031        18.913        .38597E-03   -1.5480    
  10  norm          4.4556        4.9587        .19074E-03   -1.5286    
  11  norm          .10000E-03    18.269        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .46647        28.244        .16613       -1.5571    
  13  Prefactor     .10000E-03    21.032        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     12.969        11.570        .11124E-03   -1.4988    
  15  Prefactor     .10000E-03    14.859        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Normalizat    1.3598        .23835        .43109E-03   -.81798    
  17  Prefactor     .91926        .65579E-01    .14202E-03   -.95471    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.55868e-09
Minuit parameter uncertainties:
  1  3.48615e-05
  2  0.000147447
  3  0.0012677
  4  4.9269e-05
  5  2.11723e-05
  6  0.00106477
  7  7.16602e-05
  8  8.91654e-05
  9  9.93232
  10  4.95911
  11  0.000475481
  12  7.26231
  13  0.000224722
  14  11.5721
  15  1.02004e-05
  16  0.238549
  17  0.0655847
Done.

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

Extracting fit parameters...

4FGL J0338.5+1302
   Spectrum: LogParabola
285         norm:  4.456e+00  4.959e+00  1.000e-04  1.000e+04 ( 1.000e-13)
286        alpha:  1.536e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
287         beta:  1.650e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
288           Eb:  3.451e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
511    Prefactor:  9.193e-01  6.558e-02  0.000e+00  1.000e+01 ( 1.000e+00)
512        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
513        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
510   Normalization:  1.360e+00  2.385e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.41
Ra Dec: 54.636 13.042
Photon Index (Fixed Index): 1.54 +/- 0.00
Photon Flux (Fixed Index): 8.95e-09 +/- 9.96e-09
Energy Flux (Fixed Index): 2.78e-05 +/- 3.10e-05

TS (Fixed Index): 1.41
Ra Dec: 54.636 13.042
Photon Flux Upper Limit: 3.61e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.12e-04 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/706345/likelihoodResults_491529601_491788801_4FGL_J0338.5+1302_daily_bin973.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 13451.9364027
delta logL = 0.794230435442

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 13451.934757
delta logL = 0.795876043028

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    3.3676       1.0000         .10000E-03   10000.    
     2 'alpha     '    2.3603       1.0000          .0000       5.0000    
     3 'Normalizat'    1.3623       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .91408       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5140E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   13451.93     FROM MIGRAD    STATUS=FAILED        94 CALLS      293 TOTAL
                     EDM=   .27E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.3676        4.4936        .80569E-03   -.36114E-03
   2  alpha         2.3603        .71407        .15351E-01    .53836E-03
   3  Normalizat    1.3623        .23427        .43074E-03   -.31038E-04
   4  Prefactor     .91409        .65589E-01    .14231E-03    .27161E-05
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   13451.93     FROM SIMPLEX   STATUS=UNCHANGED     70 CALLS      363 TOTAL
                     EDM=   .18E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.3676        4.4936        .10138E-03   -1.5341    
   2  alpha         2.3603        .71407        .16945E-02   -.55891E-01
   3  Normalizat    1.3623        .23427        .28924E-03   -.81725    
   4  Prefactor     .91409        .65589E-01    .11682E-03   -.95651    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   13451.93     FROM MIGRAD    STATUS=CONVERGED     33 CALLS      396 TOTAL
                     EDM=   .15E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.3676        3.8662        .32228E-04   -.57147E-04
   2  alpha         2.3603        .61676        .30702E-02   -.66356E-05
   3  Normalizat    1.3623        .23420        .17230E-04   -.68622E-05
   4  Prefactor     .91409        .65623E-01    .56926E-05    .31954E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 3.36764
  alpha      = 2.36034
  Normalizat = 1.36233
  Prefactor  = 0.914086
 **********
 **   18 **HESSE 
 **********

 FCN=   13451.93     FROM HESSE     STATUS=OK            23 CALLS      419 TOTAL
                     EDM=   .19E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.3676        3.7901        .12891E-05   -1.5341    
   2  alpha         2.3603        .60469        .12281E-03   -.55892E-01
   3  Normalizat    1.3623        .23435        .34460E-05   -.81725    
   4  Prefactor     .91409        .65666E-01    .11385E-05   -.95651    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.90054e-12
Minuit parameter uncertainties:
  1  3.79033
  2  0.610764
  3  0.23453
  4  0.0656719
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/706345': 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) = 13451.934757
delta logL = 0.795876050082

Extracting fit parameters...

4FGL J0338.5+1302
   Spectrum: LogParabola
285         norm:  3.368e+00  3.790e+00  1.000e-04  1.000e+04 ( 1.000e-13)
286        alpha:  2.360e+00  6.108e-01  0.000e+00  5.000e+00 ( 1.000e+00)
287         beta:  1.650e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
288           Eb:  3.451e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
511    Prefactor:  9.141e-01  6.567e-02  0.000e+00  1.000e+01 ( 1.000e+00)
512        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
513        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
510   Normalization:  1.362e+00  2.345e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.01
Ra Dec: 54.636 13.042
Photon Index (Free Index): 2.36 +/- 0.61
Photon Flux (Free Index): 3.09e-08 +/- 3.08e-08
Energy Flux (Free Index): 1.95e-05 +/- 1.63e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/706345/cmap_HighResolution_491529601_491788801_4FGL_J0338.5+1302_daily_bin973.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.12e-04', comment='SUCCESS', photon_flux='8.95e-09', energy_flux2='1.95e-05', photon_flux_error='9.96e-09', dlogl='7.96e-01', energy_flux='2.78e-05', photon_flux2='3.09e-08', job_status='DONE', time_completed='2021-08-18 20:45:06.177624', photon_index_error2='0.61', photon_index2='2.36', ts='1.41', fit_tolerance='1e-08', GAL='0.92', photon_index_error='0.00', photon_flux_upper_limit='3.61e-08', energy_flux_error2='1.63e-05', EG='1.36', time_epoch_completed='1629344706.18', return_code='0', job_id='706345', GAL2='0.91', EG2='1.36', return_code2='0', energy_flux_error='3.10e-05', photon_flux_error2='3.08e-08', ts2='3.01', photon_index='1.54' WHERE bin_id='973' AND source_name='4FGL J0338.5+1302' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Aug 18 20:45:06 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0123>
Subject: Job 706345: <4FGL_J0338.5+1302_daily_bin973> in cluster <slac> Done

Job <4FGL_J0338.5+1302_daily_bin973> was submitted from host <rhel6-64a> by user <kocevski> in cluster <slac> at Wed Aug 18 20:29:14 2021
Job was executed on host(s) <bullet0123>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Aug 18 20:29:16 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Aug 18 20:29:16 2021
Terminated at Wed Aug 18 20:45:07 2021
Results reported at Wed Aug 18 20:45:07 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0338.5+1302_daily_bin973 54.6355 13.0419 491529601 491788801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0338.5+1302 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   917.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             348.22 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   950 sec.
    Turnaround time :                            953 sec.

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

