/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/font_manager.py:281: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  'Matplotlib is building the font cache using fc-list. '
/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 30 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 = 7439
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1338.9+1153_daily_bin1015
RA = 204.732, Dec = 11.8956
tmin = 502416001, tmax = 502675201
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='846087', job_status='RUN', time_executed='2021-09-08 07:07:06.609359', time_epoch_executed='1631110026.61' WHERE source_name='4FGL J1338.9+1153' and cadence='daily' and bin_id='1015'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/846087

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/846087/ft1_4FGL_J1338.9+1153_daily_bin1015.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/846087/ft2_4FGL_J1338.9+1153_daily_bin1015.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/846087/ft1_4FGL_J1338.9+1153_daily_bin1015.fits outfile=/scratch/kocevski/846087/ft1_filteredMKT_4FGL_J1338.9+1153_daily_bin1015.fits ra=204.732 dec=11.8956 rad=12.0 tmin=502416001.0 tmax=502675201.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 3.97
user 3.35
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/846087/ft2_4FGL_J1338.9+1153_daily_bin1015.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/846087/ft2_4FGL_J1338.9+1153_daily_bin1015.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/846087/ft1_filteredMKT_4FGL_J1338.9+1153_daily_bin1015.fits evtable="EVENTS" outfile="/scratch/kocevski/846087/ft1_filtered_4FGL_J1338.9+1153_daily_bin1015.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 0.53
user 0.34
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/846087/ft1_filtered_4FGL_J1338.9+1153_daily_bin1015.fits" evtable="EVENTS" scfile=/scratch/kocevski/846087/ft2_4FGL_J1338.9+1153_daily_bin1015.fits sctable="SC_DATA" outfile=/scratch/kocevski/846087/ltcube_502416001_502675201_4FGL_J1338.9+1153_daily_bin1015.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/846087/ft2_4FGL_J1338.9+1153_daily_bin1015.fits
.....................!
real 16.75
user 16.34
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/846087/ft1_filtered_4FGL_J1338.9+1153_daily_bin1015.fits evtable="EVENTS" scfile=/scratch/kocevski/846087/ft2_4FGL_J1338.9+1153_daily_bin1015.fits sctable="SC_DATA" expcube=/scratch/kocevski/846087/ltcube_502416001_502675201_4FGL_J1338.9+1153_daily_bin1015.fits outfile=/scratch/kocevski/846087/expmap_502416001_502675201_4FGL_J1338.9+1153_daily_bin1015.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/846087/ltcube_502416001_502675201_4FGL_J1338.9+1153_daily_bin1015.fits
.....................!
real 192.09
user 186.10
sys 4.95

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

Setting source of interest to:
4FGL J1338.9+1153 @ 204.732 11.8956

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/846087/ft1_filtered_4FGL_J1338.9+1153_daily_bin1015.fits scfile=/scratch/kocevski/846087/ft2_4FGL_J1338.9+1153_daily_bin1015.fits outfile=/scratch/kocevski/846087/cmap_502416001_502675201_4FGL_J1338.9+1153_daily_bin1015.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=204.732 yref=11.8956 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 0.56
user 0.40
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/846087/ft1_filtered_4FGL_J1338.9+1153_daily_bin1015.fits scfile=/scratch/kocevski/846087/ft2_4FGL_J1338.9+1153_daily_bin1015.fits outfile=/scratch/kocevski/846087/cmap_HighResolution_502416001_502675201_4FGL_J1338.9+1153_daily_bin1015.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=204.732 yref=11.8956 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 0.56
user 0.40
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/846087/ft1_filtered_4FGL_J1338.9+1153_daily_bin1015.fits evtable="EVENTS" scfile=/scratch/kocevski/846087/ft2_4FGL_J1338.9+1153_daily_bin1015.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/846087/Model_4FGL_J1338.9+1153_daily_bin1015.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/846087/ft1_filtered_4FGL_J1338.9+1153_daily_bin1015.fits.....................!
real 48.04
user 46.57
sys 1.19

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/846087/ft1_filtered_4FGL_J1338.9+1153_daily_bin1015.fits', '/scratch/kocevski/846087/ft2_4FGL_J1338.9+1153_daily_bin1015.fits', expMap='/scratch/kocevski/846087/expmap_502416001_502675201_4FGL_J1338.9+1153_daily_bin1015.fits', expCube='/scratch/kocevski/846087/ltcube_502416001_502675201_4FGL_J1338.9+1153_daily_bin1015.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/846087/Model_4FGL_J1338.9+1153_daily_bin1015.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1338.9+1153'

4FGL J1338.9+1153
   Spectrum: PowerLaw
309    Prefactor:  8.644e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
310        Index:  2.035e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
311        Scale:  2.291e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/846087/ft1_filtered_4FGL_J1338.9+1153_daily_bin1015.fits
Spacecraft file(s): /scratch/kocevski/846087/ft2_4FGL_J1338.9+1153_daily_bin1015.fits
Exposure map: /scratch/kocevski/846087/expmap_502416001_502675201_4FGL_J1338.9+1153_daily_bin1015.fits
Exposure cube: /scratch/kocevski/846087/ltcube_502416001_502675201_4FGL_J1338.9+1153_daily_bin1015.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/846087/Model_4FGL_J1338.9+1153_daily_bin1015.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) = 5997.00058671

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    5.5739       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    7.4533       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .88628E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    13.499       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10194E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    18.338       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    20.897       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    9.3633       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2404       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0012       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5220E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5996.941     FROM MIGRAD    STATUS=CONVERGED    373 CALLS     1609 TOTAL
                     EDM=   .20E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    16.033       -.82790E-07** at limit **
   2  Prefactor     5.5745        8.5239        .39017E-05    .81298E-05
   3  Prefactor     .10000E-03    3.6707       -.67483E-07** at limit **
   4  norm          .10000E-03    3.4364        .53251E-07** at limit **
   5  Prefactor     7.4532        8.7539        .15934E-05   -.55215E-05
   6  Prefactor     .10000E-03    19.423       -.22160E-06** at limit **
   7  norm          .10000E-03    6.8985        .76058E-06** at limit **
   8  Prefactor     13.453        48.037       -.14179E-05   -.12614E-03
   9  Prefactor     .10000E-03    1.1569       -.17311E-07** at limit **
  10  Prefactor     .10000E-03    10.861       -.15561E-06** at limit **
  11  Prefactor     .10000E-03    3.6244        .71540E-06** at limit **
  12  Prefactor     18.343        15.844        .33920E-06   -.12460E-04
  13  Prefactor     .10000E-03    5.6787        .13628E-06** at limit **
  14  Prefactor     20.897        15.933        .45668E-07   -.81394E-05
  15  Prefactor     .10000E-03    14.656        .16251E-06** at limit **
  16  Prefactor     .10000E-03    15.220        .16056E-06** at limit **
  17  Prefactor     9.3637        7.6829        .47967E-07   -.66334E-05
  18  Normalizat    1.2403        .19664       -.11804E-05   -.11494E-03
  19  Prefactor     1.0013        .15689        .46551E-06   -.20186E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 5.57454
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 7.45319
  Prefactor  = 0.0001
  norm       = 0.000100003
  Prefactor  = 13.4531
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 18.343
  Prefactor  = 0.0001
  Prefactor  = 20.8966
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.3637
  Normalizat = 1.24025
  Prefactor  = 1.0013
 **********
 **   18 **HESSE 
 **********

 FCN=   5996.941     FROM HESSE     STATUS=OK           264 CALLS     1873 TOTAL
                     EDM=   .61E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    16.037        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     5.5745        8.5540        .85083E-03   -1.5236    
   3  Prefactor     .10000E-03    3.6772        .14491E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .10000E-03    3.4469        .14010E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     7.4532        8.7581        .73452E-03   -1.5162    
   6  Prefactor     .10000E-03    19.456        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    22.636        .38573E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     13.453        48.009        .10902E-03   -1.4974    
   9  Prefactor     .10000E-03    1.1598        .81329E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    10.866        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    8.7980        .28114E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     18.343        15.818        .93528E-04   -1.4851    
  13  Prefactor     .10000E-03    5.7039        .18021E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     20.897        15.929        .87619E-04   -1.4793    
  15  Prefactor     .10000E-03    14.676        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    15.235        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     9.3637        7.6832        .13097E-03   -1.5096    
  18  Normalizat    1.2403        .22911        .25458E-03   -.85368    
  19  Prefactor     1.0013        .18518        .22653E-03   -.92686    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.10534e-10
Minuit parameter uncertainties:
  1  5.93709e-07
  2  8.55586
  3  8.48606e-06
  4  7.66482e-07
  5  8.75962
  6  5.36557e-05
  7  0.000515064
  8  48.1471
  9  8.20987e-08
  10  5.78811e-05
  11  0.00024406
  12  15.822
  13  2.86039e-06
  14  15.9323
  15  2.3406e-05
  16  3.38929e-05
  17  7.684
  18  0.229292
  19  0.185293
Done.

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

Extracting fit parameters...

4FGL J1338.9+1153
   Spectrum: PowerLaw
309    Prefactor:  1.345e+01  4.815e+01  1.000e-04  1.000e+04 ( 1.000e-14)
310        Index:  2.035e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
311        Scale:  2.291e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
519    Prefactor:  1.001e+00  1.853e-01  0.000e+00  1.000e+01 ( 1.000e+00)
520        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
521        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
518   Normalization:  1.240e+00  2.293e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.09
Ra Dec: 204.732 11.896
Photon Flux Upper Limit: 8.31e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.25e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/846087/likelihoodResults_502416001_502675201_4FGL_J1338.9+1153_daily_bin1015.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) = 5996.90797477
delta logL = 0.0334994700352

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5996.90469339
delta logL = 0.0367808540914

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.298       1.0000         .10000E-03   10000.    
     2 'Index     '    2.4495       1.0000          .0000       10.000    
     3 'Normalizat'    1.2335       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0030       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5220E+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=   5996.905     FROM MIGRAD    STATUS=FAILED        89 CALLS      276 TOTAL
                     EDM=   .30E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.296        64.975        .12486E-03   -.25950E-04
   2  Index         2.4494        2.0807        .12855E-01    .33741E-03
   3  Normalizat    1.2335        .23056        .25517E-03   -.18486E-03
   4  Prefactor     1.0029        .18593        .22635E-03   -.23755E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5996.905     FROM SIMPLEX   STATUS=UNCHANGED     79 CALLS      355 TOTAL
                     EDM=   .14E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.296        64.975        .25156E-03   -1.5066    
   2  Index         2.4494        2.0807        .11562E-02   -.53532    
   3  Normalizat    1.2335        .23056        .28364E-03   -.85573    
   4  Prefactor     1.0029        .18593        .29592E-03   -.92632    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5996.905     FROM MIGRAD    STATUS=CONVERGED     29 CALLS      384 TOTAL
                     EDM=   .52E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.296        39.614        .49943E-05   -.18210E-04
   2  Index         2.4494        1.6224        .25710E-02    .13548E-04
   3  Normalizat    1.2335        .22944        .51034E-04   -.41613E-04
   4  Prefactor     1.0029        .18524        .45270E-04   -.51633E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.2962
  Index      = 2.44944
  Normalizat = 1.23353
  Prefactor  = 1.00292
 **********
 **   18 **HESSE 
 **********

 FCN=   5996.905     FROM HESSE     STATUS=OK            25 CALLS      409 TOTAL
                     EDM=   .56E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.296        38.535        .99887E-06   -1.5066    
   2  Index         2.4494        1.5752        .51420E-03   -.53532    
   3  Normalizat    1.2335        .22936        .10207E-04   -.85573    
   4  Prefactor     1.0029        .18520        .90540E-05   -.92632    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.64749e-12
Minuit parameter uncertainties:
  1  38.6278
  2  1.61276
  3  0.229546
  4  0.185315
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/846087': 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) = 5996.90469336
delta logL = 0.0367808837091

Extracting fit parameters...

4FGL J1338.9+1153
   Spectrum: PowerLaw
309    Prefactor:  1.030e+01  3.863e+01  1.000e-04  1.000e+04 ( 1.000e-14)
310        Index:  2.449e+00  1.613e+00  0.000e+00  1.000e+01 (-1.000e+00)
311        Scale:  2.291e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
519    Prefactor:  1.003e+00  1.853e-01  0.000e+00  1.000e+01 ( 1.000e+00)
520        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
521        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
518   Normalization:  1.234e+00  2.295e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.09
Ra Dec: 204.732 11.896

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/846087/cmap_HighResolution_502416001_502675201_4FGL_J1338.9+1153_daily_bin1015.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.25e-03', job_status='DONE', photon_flux_upper_limit='8.31e-08', time_completed='2021-09-08 07:16:39.339231', job_id='846087', GAL2='1.00', fit_tolerance='1e-08', EG2='1.23', EG='1.24', time_epoch_completed='1631110599.34', return_code2='0', ts='0.09', comment='SUCCESS', return_code='0', GAL='1.00', dlogl='3.68e-02', ts2='0.16', photon_index_error='0.00', photon_index='2.04' WHERE bin_id='1015' AND source_name='4FGL J1338.9+1153' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  8 07:16:39 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0287>
Subject: Job 846087: <4FGL_J1338.9+1153_daily_bin1015> in cluster <slac> Done

Job <4FGL_J1338.9+1153_daily_bin1015> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Wed Sep  8 07:05:46 2021
Job was executed on host(s) <bullet0287>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  8 07:06:12 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep  8 07:06:12 2021
Terminated at Wed Sep  8 07:16:40 2021
Results reported at Wed Sep  8 07:16:40 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1338.9+1153_daily_bin1015 204.732 11.8956 502416001 502675201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1338.9+1153 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   537.30 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             358.48 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   627 sec.
    Turnaround time :                            654 sec.

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

