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


Performing analysis on: 4FGL_J1338.9+1153_daily_bin1058
RA = 204.732, Dec = 11.8956
tmin = 513561601, tmax = 513820801
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='846170', job_status='RUN', time_executed='2021-09-08 07:09:56.187433', time_epoch_executed='1631110196.19' WHERE source_name='4FGL J1338.9+1153' and cadence='daily' and bin_id='1058'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/846170

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/846170/ft1_4FGL_J1338.9+1153_daily_bin1058.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/846170/ft2_4FGL_J1338.9+1153_daily_bin1058.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/846170/ft1_4FGL_J1338.9+1153_daily_bin1058.fits outfile=/scratch/kocevski/846170/ft1_filteredMKT_4FGL_J1338.9+1153_daily_bin1058.fits ra=204.732 dec=11.8956 rad=12.0 tmin=513561601.0 tmax=513820801.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.09
user 2.84
sys 0.20

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/846170/ft2_4FGL_J1338.9+1153_daily_bin1058.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/846170/ft1_filteredMKT_4FGL_J1338.9+1153_daily_bin1058.fits evtable="EVENTS" outfile="/scratch/kocevski/846170/ft1_filtered_4FGL_J1338.9+1153_daily_bin1058.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.46
user 0.30
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/846170/ft1_filtered_4FGL_J1338.9+1153_daily_bin1058.fits" evtable="EVENTS" scfile=/scratch/kocevski/846170/ft2_4FGL_J1338.9+1153_daily_bin1058.fits sctable="SC_DATA" outfile=/scratch/kocevski/846170/ltcube_513561601_513820801_4FGL_J1338.9+1153_daily_bin1058.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/846170/ft2_4FGL_J1338.9+1153_daily_bin1058.fits
.....................!
real 16.88
user 16.52
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/846170/ft1_filtered_4FGL_J1338.9+1153_daily_bin1058.fits evtable="EVENTS" scfile=/scratch/kocevski/846170/ft2_4FGL_J1338.9+1153_daily_bin1058.fits sctable="SC_DATA" expcube=/scratch/kocevski/846170/ltcube_513561601_513820801_4FGL_J1338.9+1153_daily_bin1058.fits outfile=/scratch/kocevski/846170/expmap_513561601_513820801_4FGL_J1338.9+1153_daily_bin1058.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/846170/ltcube_513561601_513820801_4FGL_J1338.9+1153_daily_bin1058.fits
.....................!
real 154.03
user 149.03
sys 4.66

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/846170/ft1_filtered_4FGL_J1338.9+1153_daily_bin1058.fits scfile=/scratch/kocevski/846170/ft2_4FGL_J1338.9+1153_daily_bin1058.fits outfile=/scratch/kocevski/846170/cmap_513561601_513820801_4FGL_J1338.9+1153_daily_bin1058.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.48
user 0.31
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/846170/ft1_filtered_4FGL_J1338.9+1153_daily_bin1058.fits scfile=/scratch/kocevski/846170/ft2_4FGL_J1338.9+1153_daily_bin1058.fits outfile=/scratch/kocevski/846170/cmap_HighResolution_513561601_513820801_4FGL_J1338.9+1153_daily_bin1058.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.49
user 0.32
sys 0.16

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/846170/ft1_filtered_4FGL_J1338.9+1153_daily_bin1058.fits', '/scratch/kocevski/846170/ft2_4FGL_J1338.9+1153_daily_bin1058.fits', expMap='/scratch/kocevski/846170/expmap_513561601_513820801_4FGL_J1338.9+1153_daily_bin1058.fits', expCube='/scratch/kocevski/846170/ltcube_513561601_513820801_4FGL_J1338.9+1153_daily_bin1058.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/846170/Model_4FGL_J1338.9+1153_daily_bin1058.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/846170/ft1_filtered_4FGL_J1338.9+1153_daily_bin1058.fits
Spacecraft file(s): /scratch/kocevski/846170/ft2_4FGL_J1338.9+1153_daily_bin1058.fits
Exposure map: /scratch/kocevski/846170/expmap_513561601_513820801_4FGL_J1338.9+1153_daily_bin1058.fits
Exposure cube: /scratch/kocevski/846170/ltcube_513561601_513820801_4FGL_J1338.9+1153_daily_bin1058.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/846170/Model_4FGL_J1338.9+1153_daily_bin1058.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) = 6312.29533141

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10041E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    5.7125       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10026E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10067E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    9.9678       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .21319E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    2.7362       1.0000         .10000E-03   10000.    
    12 'Prefactor '    7.0292       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .52553E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10021E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    4.8595       1.0000         .10000E-03   10000.    
    17 'Prefactor '    5.8550       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .92867       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1048       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=   6312.187     FROM MIGRAD    STATUS=CONVERGED    396 CALLS     1635 TOTAL
                     EDM=   .63E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    55.025        .25615E-06** at limit **
   2  Prefactor     5.7107        9.4322        .96308E-06   -.68602E-03
   3  Prefactor     .10000E-03    10.633        .30108E-06** at limit **
   4  norm          .10000E-03    2.2800       -.44114E-07** at limit **
   5  Prefactor     .10000E-03    12.170       -.38156E-05** at limit **
   6  Prefactor     .10000E-03    19.557        .38366E-07** at limit **
   7  norm          9.9687        9.4512        .16092E-06    .52880E-04
   8  Prefactor     .10000E-03    189.22       -.20558E-05** at limit **
   9  Prefactor     .10000E-03    2.4207        .61309E-07** at limit **
  10  Prefactor     .10000E-03    11.968        .45365E-05** at limit **
  11  Prefactor     2.7361        2.7880        .90427E-07    .12934E-03
  12  Prefactor     7.0305        11.768        .38074E-07    .42297E-04
  13  Prefactor     .10003E-03    6.9321       -.96131E-06** at limit **
  14  Prefactor     .10000E-03    2.6053        .74118E-07** at limit **
  15  Prefactor     .10000E-03    11.091       -.17686E-05** at limit **
  16  Prefactor     4.8583        13.494        .91604E-06   -.34504E-03
  17  Prefactor     5.8547        6.7562        .55147E-06   -.80347E-03
  18  Normalizat    .92875        .19196       -.13825E-06    .34929E-03
  19  Prefactor     1.1048        .15262        .72859E-06    .41285E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 5.71071
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 9.96869
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 2.73607
  Prefactor  = 7.03047
  Prefactor  = 0.000100033
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.8583
  Prefactor  = 5.85474
  Normalizat = 0.928754
  Prefactor  = 1.10478
 **********
 **   18 **HESSE 
 **********

 FCN=   6312.187     FROM HESSE     STATUS=OK           262 CALLS     1897 TOTAL
                     EDM=   .36E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    55.244        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     5.7107        11.192        .84029E-03   -1.5230    
   3  Prefactor     .10000E-03    10.696        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .10000E-03    2.2829        .11710E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    12.582        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    19.597        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          9.9687        9.4552        .12692E-03   -1.5076    
   8  Prefactor     .10000E-03    193.18        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    2.4596        .12059E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    12.189        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     2.7361        2.7925        .13025E-03   -1.5377    
  12  Prefactor     7.0305        11.760        .15131E-03   -1.5178    
  13  Prefactor     .10003E-03    43.840        .39350E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    2.6071        .12524E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    11.162        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     4.8583        14.564        .91239E-03   -1.5267    
  17  Prefactor     5.8547        7.4612        .82985E-03   -1.5224    
  18  Normalizat    .92875        .22772        .27336E-03   -.95457    
  19  Prefactor     1.1048        .18108        .20278E-03   -.89314    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.5711e-09
Minuit parameter uncertainties:
  1  4.50038e-06
  2  11.1958
  3  3.07494e-06
  4  2.76969e-06
  5  0.000240741
  6  8.28347e-06
  7  9.45661
  8  0.00075104
  9  4.19739e-06
  10  0.000258855
  11  2.7926
  12  11.7638
  13  0.00240941
  14  9.75535e-07
  15  0.000106545
  16  14.5745
  17  7.46237
  18  0.227954
  19  0.181181
Done.

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

Extracting fit parameters...

4FGL J1338.9+1153
   Spectrum: PowerLaw
309    Prefactor:  1.000e-04  7.510e-04  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.105e+00  1.812e-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:  9.288e-01  2.280e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/846170/likelihoodResults_513561601_513820801_4FGL_J1338.9+1153_daily_bin1058.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) = 6312.18698525
delta logL = -2.45265000558e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6312.17218009
delta logL = 0.0147806391105

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.4068       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0658       1.0000          .0000       10.000    
     3 'Normalizat'    .91899       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1077       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=   6312.172     FROM MIGRAD    STATUS=FAILED        78 CALLS      299 TOTAL
                     EDM=   .19E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.4063        1883.6        .36547E-03   -.19912E-03
   2  Index         3.0658        5.0878        .10389E-01   -.98264E-04
   3  Normalizat    .91900        .19728        .27469E-03   -.37711E-03
   4  Prefactor     1.1077        .15517        .20255E-03   -.39667E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6312.172     FROM SIMPLEX   STATUS=UNCHANGED     98 CALLS      397 TOTAL
                     EDM=   .15E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.4063        1883.6        .54012E-03   -.19912E-03
   2  Index         3.0658        5.0878        .39869E-02   -.98264E-04
   3  Normalizat    .91900        .19728        .27509E-03   -.37711E-03
   4  Prefactor     1.1077        .15517        .88699E-04   -.39667E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6312.172     FROM MIGRAD    STATUS=CONVERGED     30 CALLS      427 TOTAL
                     EDM=   .10E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.4052        50.389        .14619E-04   -.46381E-03
   2  Index         3.0661        6.4969        .41556E-03   -.65958E-04
   3  Normalizat    .91900        .23346        .54939E-04   -.42306E-03
   4  Prefactor     1.1077        .18265        .40511E-04   -.49694E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.40525
  Index      = 3.06611
  Normalizat = 0.919003
  Prefactor  = 1.10767
 **********
 **   18 **HESSE 
 **********

 FCN=   6312.172     FROM HESSE     STATUS=OK            23 CALLS      450 TOTAL
                     EDM=   .10E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.4052        47.696        .29237E-05   -1.5471    
   2  Index         3.0661        3.8189        .16623E-04   -.39713    
   3  Normalizat    .91900        .23346        .10988E-04   -.95796    
   4  Prefactor     1.1077        .18263        .81022E-05   -.89222    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.004e-09
Minuit parameter uncertainties:
  1  16.3874
  2  4.49995
  3  0.233715
  4  0.182733
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/846170': 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) = 6312.17218007
delta logL = 0.0147806504719

Extracting fit parameters...

4FGL J1338.9+1153
   Spectrum: PowerLaw
309    Prefactor:  1.405e+00  1.639e+01  1.000e-04  1.000e+04 ( 1.000e-14)
310        Index:  3.066e+00  4.500e+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.108e+00  1.827e-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:  9.190e-01  2.337e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
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/846170/cmap_HighResolution_513561601_513820801_4FGL_J1338.9+1153_daily_bin1058.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.29e-03', job_status='DONE', photon_flux_upper_limit='7.03e-08', time_completed='2021-09-08 07:17:40.868331', job_id='846170', GAL2='1.11', fit_tolerance='1e-08', EG2='0.92', EG='0.93', time_epoch_completed='1631110660.87', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.10', dlogl='1.48e-02', ts2='0.03', photon_index_error='0.00', photon_index='2.04' WHERE bin_id='1058' AND source_name='4FGL J1338.9+1153' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  8 07:17:40 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0026>
Subject: Job 846170: <4FGL_J1338.9+1153_daily_bin1058> in cluster <slac> Done

Job <4FGL_J1338.9+1153_daily_bin1058> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Wed Sep  8 07:05:52 2021
Job was executed on host(s) <bullet0026>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  8 07:06:19 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:19 2021
Terminated at Wed Sep  8 07:17:41 2021
Results reported at Wed Sep  8 07:17:41 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1338.9+1153_daily_bin1058 204.732 11.8956 513561601 513820801 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 :                                   457.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             214.78 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   682 sec.
    Turnaround time :                            709 sec.

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

