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


Performing analysis on: 4FGL_J0338.5+1302_daily_bin1007
RA = 54.6355, Dec = 13.0419
tmin = 500342401, tmax = 500601601
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='706400', job_status='RUN', time_executed='2021-08-18 20:32:58.089718', time_epoch_executed='1629343978.09' WHERE source_name='4FGL J0338.5+1302' and cadence='daily' and bin_id='1007'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/706400

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/706400/ft1_4FGL_J0338.5+1302_daily_bin1007.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/706400/ft2_4FGL_J0338.5+1302_daily_bin1007.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/706400/ft1_4FGL_J0338.5+1302_daily_bin1007.fits outfile=/scratch/kocevski/706400/ft1_filteredMKT_4FGL_J0338.5+1302_daily_bin1007.fits ra=54.6355 dec=13.0419 rad=12.0 tmin=500342401.0 tmax=500601601.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.73
user 4.44
sys 1.27

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/706400/ft2_4FGL_J0338.5+1302_daily_bin1007.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/706400/ft1_filteredMKT_4FGL_J0338.5+1302_daily_bin1007.fits evtable="EVENTS" outfile="/scratch/kocevski/706400/ft1_filtered_4FGL_J0338.5+1302_daily_bin1007.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.93
user 0.32
sys 1.24

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/706400/ft1_filtered_4FGL_J0338.5+1302_daily_bin1007.fits" evtable="EVENTS" scfile=/scratch/kocevski/706400/ft2_4FGL_J0338.5+1302_daily_bin1007.fits sctable="SC_DATA" outfile=/scratch/kocevski/706400/ltcube_500342401_500601601_4FGL_J0338.5+1302_daily_bin1007.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/706400/ft2_4FGL_J0338.5+1302_daily_bin1007.fits
.....................!
real 13.32
user 11.68
sys 1.53

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/706400/ft1_filtered_4FGL_J0338.5+1302_daily_bin1007.fits evtable="EVENTS" scfile=/scratch/kocevski/706400/ft2_4FGL_J0338.5+1302_daily_bin1007.fits sctable="SC_DATA" expcube=/scratch/kocevski/706400/ltcube_500342401_500601601_4FGL_J0338.5+1302_daily_bin1007.fits outfile=/scratch/kocevski/706400/expmap_500342401_500601601_4FGL_J0338.5+1302_daily_bin1007.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/706400/ltcube_500342401_500601601_4FGL_J0338.5+1302_daily_bin1007.fits
.....................!
real 196.33
user 189.48
sys 6.41

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/706400/ft1_filtered_4FGL_J0338.5+1302_daily_bin1007.fits scfile=/scratch/kocevski/706400/ft2_4FGL_J0338.5+1302_daily_bin1007.fits outfile=/scratch/kocevski/706400/cmap_500342401_500601601_4FGL_J0338.5+1302_daily_bin1007.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 1.61
user 0.37
sys 1.22

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/706400/ft1_filtered_4FGL_J0338.5+1302_daily_bin1007.fits scfile=/scratch/kocevski/706400/ft2_4FGL_J0338.5+1302_daily_bin1007.fits outfile=/scratch/kocevski/706400/cmap_HighResolution_500342401_500601601_4FGL_J0338.5+1302_daily_bin1007.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 1.67
user 0.39
sys 1.23

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/706400/ft1_filtered_4FGL_J0338.5+1302_daily_bin1007.fits evtable="EVENTS" scfile=/scratch/kocevski/706400/ft2_4FGL_J0338.5+1302_daily_bin1007.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/706400/Model_4FGL_J0338.5+1302_daily_bin1007.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/706400/ft1_filtered_4FGL_J0338.5+1302_daily_bin1007.fits.....................!
real 143.49
user 140.20
sys 2.60

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/706400/ft1_filtered_4FGL_J0338.5+1302_daily_bin1007.fits', '/scratch/kocevski/706400/ft2_4FGL_J0338.5+1302_daily_bin1007.fits', expMap='/scratch/kocevski/706400/expmap_500342401_500601601_4FGL_J0338.5+1302_daily_bin1007.fits', expCube='/scratch/kocevski/706400/ltcube_500342401_500601601_4FGL_J0338.5+1302_daily_bin1007.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/706400/Model_4FGL_J0338.5+1302_daily_bin1007.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/706400/ft1_filtered_4FGL_J0338.5+1302_daily_bin1007.fits
Spacecraft file(s): /scratch/kocevski/706400/ft2_4FGL_J0338.5+1302_daily_bin1007.fits
Exposure map: /scratch/kocevski/706400/expmap_500342401_500601601_4FGL_J0338.5+1302_daily_bin1007.fits
Exposure cube: /scratch/kocevski/706400/ltcube_500342401_500601601_4FGL_J0338.5+1302_daily_bin1007.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/706400/Model_4FGL_J0338.5+1302_daily_bin1007.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) = 10384.9157416

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    4.1453       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    17.623       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    11.383       1.0000         .10000E-03   10000.    
     6 'Prefactor '    3.6720       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .53236E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .83482       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .38445E-02   1.0000         .10000E-03   10000.    
    11 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .11270E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    21.542       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10134E-03   1.0000         .10000E-03   10000.    
    16 'Normalizat'    .76296       1.0000         .10000E-01   10.000    
    17 'Prefactor '    1.0420       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.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   10384.90     FROM MIGRAD    STATUS=CONVERGED    341 CALLS     1394 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          4.1454        3.8213        .77299E-07    .56930E-05
   2  Prefactor     .10000E-03    3.0242       -.35451E-07** at limit **
   3  norm          17.623        13.057        .19018E-06   -.85750E-04
   4  Prefactor     .10002E-03    71.582        .27913E-05** at limit **
   5  Prefactor     11.383        6.6409       -.63202E-07   -.29473E-03
   6  Prefactor     3.6720        4.2501       -.37003E-06   -.25364E-03
   7  Prefactor     .10040E-03    14.943        .35212E-05** at limit **
   8  norm          .83473        2.3964        .21217E-05    .45207E-03
   9  Prefactor     .10000E-03    11.791       -.52952E-07** at limit **
  10  norm          .10000E-03    3.1247       -.12392E-06** at limit **
  11  norm          .10000E-03    19.895        .20037E-06** at limit **
  12  Prefactor     .10002E-03    80.289       -.30407E-05** at limit **
  13  Prefactor     .10000E-03    14.127       -.10069E-06** at limit **
  14  Prefactor     21.532        17.961        .99155E-07    .21266E-04
  15  Prefactor     .10000E-03    26.618       -.31903E-06** at limit **
  16  Normalizat    .76295        .26423       -.26239E-05   -.23634E-03
  17  Prefactor     1.0420        .72397E-01    .20953E-06   -.67599E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 4.14536
  Prefactor  = 0.0001
  norm       = 17.6234
  Prefactor  = 0.00010002
  Prefactor  = 11.383
  Prefactor  = 3.67203
  Prefactor  = 0.000100396
  norm       = 0.834726
  Prefactor  = 0.0001
  norm       = 0.000100001
  norm       = 0.0001
  Prefactor  = 0.00010002
  Prefactor  = 0.0001
  Prefactor  = 21.5322
  Prefactor  = 0.0001
  Normalizat = 0.762946
  Prefactor  = 1.04204
 **********
 **   18 **HESSE 
 **********

 FCN=   10384.90     FROM HESSE     STATUS=OK           225 CALLS     1619 TOTAL
                     EDM=   .82E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          4.1454        3.8194        .18552E-03   -1.5301    
   2  Prefactor     .10000E-03    3.0654        .17306E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          17.623        13.027        .95408E-04   -1.4868    
   4  Prefactor     .10002E-03    72.889        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     11.383        6.6367        .11874E-03   -1.5033    
   6  Prefactor     3.6720        4.2559        .21078E-03   -1.5325    
   7  Prefactor     .10040E-03    51.406        .56334E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .83473        2.4706        .25249E-03   -1.5525    
   9  Prefactor     .10000E-03    11.861        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    22.880        .35067E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    19.908        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10002E-03    81.858        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    14.162        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     21.532        17.946        .86298E-04   -1.4780    
  15  Prefactor     .10000E-03    26.726        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Normalizat    .76295        .27812        .56109E-03   -1.0146    
  17  Prefactor     1.0420        .76871E-01    .13676E-03   -.91341    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.20306e-09
Minuit parameter uncertainties:
  1  3.81966
  2  3.22154e-06
  3  13.0296
  4  0.00238872
  5  6.63718
  6  4.25628
  7  0.00903213
  8  2.47091
  9  2.55871e-06
  10  0.000299918
  11  9.51504e-05
  12  0.00256333
  13  3.02776e-05
  14  17.9505
  15  0.000162048
  16  0.278635
  17  0.076879
Done.

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

Extracting fit parameters...

4FGL J0338.5+1302
   Spectrum: LogParabola
285         norm:  1.000e-04  2.999e-04  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:  1.042e+00  7.688e-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:  7.629e-01  2.786e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 54.636 13.042
Photon Flux Upper Limit: 2.91e-08 ph cm-2 s-1
Energy Flux Upper Limit: 9.07e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/706400/likelihoodResults_500342401_500601601_4FGL_J0338.5+1302_daily_bin1007.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) = 10384.8980672
delta logL = -0.00020247455177

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 10384.8978695
delta logL = -4.78121182823e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10348E-02   1.0000         .10000E-03   10000.    
     2 'alpha     '    1.4069       1.0000          .0000       5.0000    
     3 'Normalizat'    .76225       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0422       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.

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   10384.90     FROM MIGRAD    STATUS=FAILED       121 CALLS      291 TOTAL
                     EDM=   .56E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .28231E-03    91.580        .67219E-01** at limit **
   2  alpha         1.0261        4.3821        .19099       -.14945E-04
   3  Normalizat    .76295        .36763E-01    .56109E-03    .21133E-03
   4  Prefactor     1.0420        .10437E-01    .13676E-03    .22595E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   10384.90     FROM SIMPLEX   STATUS=PROGRESS     106 CALLS      397 TOTAL
                     EDM=   .96E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .20080        91.580        .74288E-03   -.21190E-01
   2  alpha         1.0631        4.3821        .55465E-03   -.14945E-04
   3  Normalizat    .76317        .36763E-01    .78727E-05    .21133E-03
   4  Prefactor     1.0421        .10437E-01    .25030E-06    .22595E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   10384.90     FROM MIGRAD    STATUS=CONVERGED     72 CALLS      469 TOTAL
                     EDM=   .58E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .20696        17.392         .0000        .39708E-02
   2  alpha         1.1010        2.7420         .0000       -.15397E-04
   3  Normalizat    .76337        .27008         .0000        .16209E-05
   4  Prefactor     1.0418        .76830E-01     .0000        .13301E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.206962
  alpha      = 1.101
  Normalizat = 0.76337
  Prefactor  = 1.04182
 **********
 **   18 **HESSE 
 **********

 FCN=   10384.90     FROM HESSE     STATUS=OK            27 CALLS      496 TOTAL
                     EDM=   .16E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .20696        16.102        .70825E-03   -1.5617    
   2  alpha         1.1010        2.8032        .15280E-01   -.59390    
   3  Normalizat    .76337        .27028        .44887E-05   -1.0144    
   4  Prefactor     1.0418        .76858E-01    .10940E-05   -.91348    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.59541e-10
Minuit parameter uncertainties:
  1  3.65115
  2  3.34976
  3  0.270754
  4  0.0768663
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/706400': 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) = 10384.8961951
delta logL = 0.00166953798362

Extracting fit parameters...

4FGL J0338.5+1302
   Spectrum: LogParabola
285         norm:  2.070e-01  3.651e+00  1.000e-04  1.000e+04 ( 1.000e-13)
286        alpha:  1.101e+00  3.350e+00  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:  1.042e+00  7.687e-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:  7.634e-01  2.708e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 54.636 13.042

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/706400/cmap_HighResolution_500342401_500601601_4FGL_J0338.5+1302_daily_bin1007.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.07e-05', job_status='DONE', photon_flux_upper_limit='2.91e-08', time_completed='2021-08-18 20:45:25.336366', job_id='706400', GAL2='1.04', fit_tolerance='1e-08', EG2='0.76', EG='0.76', time_epoch_completed='1629344725.34', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.04', dlogl='1.67e-03', ts2='0.00', photon_index_error='0.00', photon_index='1.54' WHERE bin_id='1007' AND source_name='4FGL J0338.5+1302' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Aug 18 20:45:25 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0140>
Subject: Job 706400: <4FGL_J0338.5+1302_daily_bin1007> in cluster <slac> Done

Job <4FGL_J0338.5+1302_daily_bin1007> was submitted from host <rhel6-64a> by user <kocevski> in cluster <slac> at Wed Aug 18 20:29:19 2021
Job was executed on host(s) <bullet0140>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Aug 18 20:29:20 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:20 2021
Terminated at Wed Aug 18 20:45:26 2021
Results reported at Wed Aug 18 20:45:26 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0338.5+1302_daily_bin1007 54.6355 13.0419 500342401 500601601 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 :                                   758.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             294.45 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   965 sec.
    Turnaround time :                            967 sec.

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

