/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 200 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 = 7424
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1338.9+1153_daily_bin80
RA = 204.732, Dec = 11.8956
tmin = 260064001, tmax = 260323201
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='838936', job_status='RUN', time_executed='2021-09-08 06:49:26.473815', time_epoch_executed='1631108966.47' WHERE source_name='4FGL J1338.9+1153' and cadence='daily' and bin_id='80'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/838936

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/838936/ft1_4FGL_J1338.9+1153_daily_bin80.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/838936/ft2_4FGL_J1338.9+1153_daily_bin80.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/838936/ft1_4FGL_J1338.9+1153_daily_bin80.fits outfile=/scratch/kocevski/838936/ft1_filteredMKT_4FGL_J1338.9+1153_daily_bin80.fits ra=204.732 dec=11.8956 rad=12.0 tmin=260064001.0 tmax=260323201.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 1.50
user 1.29
sys 0.17

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/838936/ft2_4FGL_J1338.9+1153_daily_bin80.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/838936/ft1_filteredMKT_4FGL_J1338.9+1153_daily_bin80.fits evtable="EVENTS" outfile="/scratch/kocevski/838936/ft1_filtered_4FGL_J1338.9+1153_daily_bin80.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.50
user 0.31
sys 0.18

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/838936/ft1_filtered_4FGL_J1338.9+1153_daily_bin80.fits evtable="EVENTS" scfile=/scratch/kocevski/838936/ft2_4FGL_J1338.9+1153_daily_bin80.fits sctable="SC_DATA" expcube=/scratch/kocevski/838936/ltcube_260064001_260323201_4FGL_J1338.9+1153_daily_bin80.fits outfile=/scratch/kocevski/838936/expmap_260064001_260323201_4FGL_J1338.9+1153_daily_bin80.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/838936/ltcube_260064001_260323201_4FGL_J1338.9+1153_daily_bin80.fits
.....................!
real 192.08
user 186.06
sys 5.07

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/838936/ft1_filtered_4FGL_J1338.9+1153_daily_bin80.fits scfile=/scratch/kocevski/838936/ft2_4FGL_J1338.9+1153_daily_bin80.fits outfile=/scratch/kocevski/838936/cmap_260064001_260323201_4FGL_J1338.9+1153_daily_bin80.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.54
user 0.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/838936/ft1_filtered_4FGL_J1338.9+1153_daily_bin80.fits scfile=/scratch/kocevski/838936/ft2_4FGL_J1338.9+1153_daily_bin80.fits outfile=/scratch/kocevski/838936/cmap_HighResolution_260064001_260323201_4FGL_J1338.9+1153_daily_bin80.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.88
user 0.39
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10078E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    13.507       1.0000         .10000E-03   10000.    
     3 'Prefactor '    13.920       1.0000         .10000E-03   10000.    
     4 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    1.6225       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    13.133       1.0000         .10000E-03   10000.    
     8 'Prefactor '    16.504       1.0000         .10000E-03   10000.    
     9 'Prefactor '    5.7034       1.0000         .10000E-03   10000.    
    10 'Prefactor '    21.778       1.0000         .10000E-03   10000.    
    11 'Prefactor '    1.8682       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .66208E-02   1.0000         .10000E-03   10000.    
    13 'Prefactor '    3.7552       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10123E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .11445E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .98386       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0675       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=   9106.140     FROM MIGRAD    STATUS=CONVERGED    380 CALLS     1630 TOTAL
                     EDM=   .67E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    25.976       -.92770E-06** at limit **
   2  Prefactor     13.506        11.438       -.21930E-06   -.24479E-04
   3  Prefactor     13.918        12.452       -.25820E-06   -.22160E-04
   4  norm          .10000E-03    1.8084        .13495E-08** at limit **
   5  Prefactor     1.6190        13.026       -.27465E-05   -.38770E-03
   6  Prefactor     .10000E-03    10.352       -.65106E-07** at limit **
   7  norm          13.131        8.0327       -.23235E-06   -.43844E-04
   8  Prefactor     16.491        25.931       -.12601E-04    .43708E-05
   9  Prefactor     5.7026        3.2653       -.43065E-07   -.21095E-03
  10  Prefactor     21.772        17.409       -.13157E-05   -.41467E-05
  11  Prefactor     1.8683        2.6945       -.19335E-06   -.65597E-03
  12  Prefactor     .10007E-03    3.8515       -.35803E-06** at limit **
  13  Prefactor     3.7555        7.8433       -.82785E-06   -.25065E-03
  14  Prefactor     .10000E-03    5.5033       -.61924E-09** at limit **
  15  Prefactor     .10000E-03    14.281        .14294E-06** at limit **
  16  Prefactor     .10000E-03    42.354        .56192E-05** at limit **
  17  Prefactor     .10000E-03    5.1568       -.31019E-07** at limit **
  18  Normalizat    .98398        .16419        .11550E-05    .31805E-04
  19  Prefactor     1.0675        .12601        .20536E-06    .11007E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 13.5055
  Prefactor  = 13.9176
  norm       = 0.0001
  Prefactor  = 1.61903
  Prefactor  = 0.0001
  norm       = 13.1315
  Prefactor  = 16.4906
  Prefactor  = 5.7026
  Prefactor  = 21.7724
  Prefactor  = 1.86832
  Prefactor  = 0.000100065
  Prefactor  = 3.7555
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.983983
  Prefactor  = 1.06752
 **********
 **   18 **HESSE 
 **********

 FCN=   9106.140     FROM HESSE     STATUS=OK           274 CALLS     1904 TOTAL
                     EDM=   .25E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    25.997        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     13.506        11.434        .10899E-03   -1.4973    
   3  Prefactor     13.918        12.452        .10736E-03   -1.4962    
   4  norm          .10000E-03    1.8144        .12527E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     1.6190        13.922        .33220E-03   -1.5453    
   6  Prefactor     .10000E-03    10.361        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          13.131        8.0519        .11053E-03   -1.4983    
   8  Prefactor     16.491        25.339        .98589E-04   -1.4896    
   9  Prefactor     5.7026        3.2661        .12478E-03   -1.5230    
  10  Prefactor     21.772        17.413        .85829E-04   -1.4774    
  11  Prefactor     1.8683        2.6864        .18281E-03   -1.5435    
  12  Prefactor     .10007E-03    45.997        .36118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     3.7555        7.8823        .20835E-03   -1.5320    
  14  Prefactor     .10000E-03    5.5642        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    14.334        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    42.652        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    5.2556        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .98398        .19115        .27108E-03   -.93569    
  19  Prefactor     1.0675        .14729        .21123E-03   -.90511    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.49899e-09
Minuit parameter uncertainties:
  1  1.052e-06
  2  11.4363
  3  12.4544
  4  5.8973e-07
  5  9.4978
  6  2.13285e-06
  7  8.05252
  8  25.3553
  9  3.2662
  10  17.4168
  11  2.68655
  12  0.00346837
  13  7.88447
  14  1.60092e-06
  15  1.60297e-05
  16  0.000117784
  17  9.79844e-06
  18  0.191285
  19  0.147346
Done.

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

Extracting fit parameters...

4FGL J1338.9+1153
   Spectrum: PowerLaw
309    Prefactor:  1.649e+01  2.536e+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.068e+00  1.473e-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.840e-01  1.913e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/838936/likelihoodResults_260064001_260323201_4FGL_J1338.9+1153_daily_bin80.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) = 9105.93285171
delta logL = 0.207381560187

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 9105.92394912
delta logL = 0.216284148437

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    7.3585       1.0000         .10000E-03   10000.    
     2 'Index     '    2.8347       1.0000          .0000       10.000    
     3 'Normalizat'    .96202       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0759       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=   9105.924     FROM MIGRAD    STATUS=FAILED        98 CALLS      328 TOTAL
                     EDM=   .14E-05    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     7.3670        277.46        .14786E-03   -.55823E-04
   2  Index         2.8345        6.3587        .78508E-02    .85962E-03
   3  Normalizat    .96183        .24724        .27383E-03   -.21514E-03
   4  Prefactor     1.0761        .17240        .21047E-03    .31611E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   9105.924     FROM SIMPLEX   STATUS=UNCHANGED     95 CALLS      423 TOTAL
                     EDM=   .13E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     7.3670        277.46        .20575E-03   -1.5165    
   2  Index         2.8345        6.3587        .81315E-03   -.44793    
   3  Normalizat    .96183        .24724        .30447E-03   -.94320    
   4  Prefactor     1.0761        .17240        .22238E-03   -.90235    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   9105.924     FROM MIGRAD    STATUS=CONVERGED     29 CALLS      452 TOTAL
                     EDM=   .61E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     7.3672        19.505        .59142E-05    .39983E-04
   2  Index         2.8345        1.2772        .15702E-02   -.36941E-04
   3  Normalizat    .96183        .18605        .10953E-04   -.16980E-03
   4  Prefactor     1.0761        .14775        .42093E-04    .27224E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 7.36724
  Index      = 2.83448
  Normalizat = 0.961833
  Prefactor  = 1.07606
 **********
 **   18 **HESSE 
 **********

 FCN=   9105.924     FROM HESSE     STATUS=OK            23 CALLS      475 TOTAL
                     EDM=   .60E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     7.3672        17.842        .11828E-05   -1.5165    
   2  Index         2.8345        1.1696        .62806E-04   -.44793    
   3  Normalizat    .96183        .18526        .21907E-05   -.94320    
   4  Prefactor     1.0761        .14742        .84187E-05   -.90235    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.01278e-10
Minuit parameter uncertainties:
  1  17.8549
  2  1.18312
  3  0.185383
  4  0.147477
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/838936': 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) = 9105.92394836
delta logL = 0.216284909675

Extracting fit parameters...

4FGL J1338.9+1153
   Spectrum: PowerLaw
309    Prefactor:  7.367e+00  1.785e+01  1.000e-04  1.000e+04 ( 1.000e-14)
310        Index:  2.834e+00  1.183e+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.076e+00  1.475e-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.618e-01  1.854e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.12
Ra Dec: 204.732 11.896
Photon Index (Free Index): 2.83 +/- 1.18
Photon Flux (Free Index): 2.88e-08 +/- 4.14e-08
Energy Flux (Free Index): 6.30e-06 +/- 7.10e-06

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/838936/cmap_HighResolution_260064001_260323201_4FGL_J1338.9+1153_daily_bin80.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.87e-03', comment='SUCCESS', energy_flux2='6.30e-06', dlogl='2.16e-01', photon_flux2='2.88e-08', job_status='DONE', time_completed='2021-09-08 07:00:09.563706', photon_index_error2='1.18', photon_index2='2.83', ts='0.68', fit_tolerance='1e-08', GAL='1.07', photon_index_error='0.00', photon_flux_upper_limit='5.14e-08', energy_flux_error2='7.10e-06', EG='0.98', time_epoch_completed='1631109609.56', return_code='0', job_id='838936', GAL2='1.08', EG2='0.96', return_code2='0', photon_flux_error2='4.14e-08', ts2='1.12', photon_index='2.04' WHERE bin_id='80' AND source_name='4FGL J1338.9+1153' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  8 07:00:09 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0038>
Subject: Job 838936: <4FGL_J1338.9+1153_daily_bin80> in cluster <slac> Done

Job <4FGL_J1338.9+1153_daily_bin80> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Wed Sep  8 06:45:23 2021
Job was executed on host(s) <bullet0038>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  8 06:45:57 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep  8 06:45:57 2021
Terminated at Wed Sep  8 07:00:10 2021
Results reported at Wed Sep  8 07:00:10 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1338.9+1153_daily_bin80 204.732 11.8956 260064001 260323201 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 :                                   641.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             292.70 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   854 sec.
    Turnaround time :                            887 sec.

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

