/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: Dan/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 107 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 = 17363
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1338.0+6534_weekly_bin703
RA = 204.516, Dec = 65.5696
tmin = 664156801, tmax = 664761601
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='620395', job_status='RUN', time_executed='2022-01-25 06:10:42.229680', time_epoch_executed='1643119842.23' WHERE source_name='4FGL J1338.0+6534' and cadence='weekly' and bin_id='703'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/620395

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/620395/ft1_4FGL_J1338.0+6534_weekly_bin703.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/620395/ft2_4FGL_J1338.0+6534_weekly_bin703.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/620395/ft1_4FGL_J1338.0+6534_weekly_bin703.fits outfile=/scratch/kocevski/620395/ft1_filteredMKT_4FGL_J1338.0+6534_weekly_bin703.fits ra=204.516 dec=65.5696 rad=12.0 tmin=664156801.0 tmax=664761601.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 8.11
user 7.78
sys 0.29

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/620395/ft2_4FGL_J1338.0+6534_weekly_bin703.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/620395/ft2_4FGL_J1338.0+6534_weekly_bin703.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/620395/ft1_filteredMKT_4FGL_J1338.0+6534_weekly_bin703.fits evtable="EVENTS" outfile="/scratch/kocevski/620395/ft1_filtered_4FGL_J1338.0+6534_weekly_bin703.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.56
user 0.38
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/620395/ft1_filtered_4FGL_J1338.0+6534_weekly_bin703.fits" evtable="EVENTS" scfile=/scratch/kocevski/620395/ft2_4FGL_J1338.0+6534_weekly_bin703.fits sctable="SC_DATA" outfile=/scratch/kocevski/620395/ltcube_664156801_664761601_4FGL_J1338.0+6534_weekly_bin703.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/620395/ft2_4FGL_J1338.0+6534_weekly_bin703.fits
.....................!
real 26.26
user 25.84
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/620395/ft1_filtered_4FGL_J1338.0+6534_weekly_bin703.fits evtable="EVENTS" scfile=/scratch/kocevski/620395/ft2_4FGL_J1338.0+6534_weekly_bin703.fits sctable="SC_DATA" expcube=/scratch/kocevski/620395/ltcube_664156801_664761601_4FGL_J1338.0+6534_weekly_bin703.fits outfile=/scratch/kocevski/620395/expmap_664156801_664761601_4FGL_J1338.0+6534_weekly_bin703.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/620395/ltcube_664156801_664761601_4FGL_J1338.0+6534_weekly_bin703.fits
.....................!
real 190.01
user 184.73
sys 4.93

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

Setting source of interest to:
4FGL J1338.0+6534 @ 204.516 65.5696

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/620395/ft1_filtered_4FGL_J1338.0+6534_weekly_bin703.fits scfile=/scratch/kocevski/620395/ft2_4FGL_J1338.0+6534_weekly_bin703.fits outfile=/scratch/kocevski/620395/cmap_664156801_664761601_4FGL_J1338.0+6534_weekly_bin703.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.516 yref=65.5696 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.59
user 0.41
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/620395/ft1_filtered_4FGL_J1338.0+6534_weekly_bin703.fits scfile=/scratch/kocevski/620395/ft2_4FGL_J1338.0+6534_weekly_bin703.fits outfile=/scratch/kocevski/620395/cmap_HighResolution_664156801_664761601_4FGL_J1338.0+6534_weekly_bin703.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.516 yref=65.5696 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.57
user 0.42
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/620395/ft1_filtered_4FGL_J1338.0+6534_weekly_bin703.fits evtable="EVENTS" scfile=/scratch/kocevski/620395/ft2_4FGL_J1338.0+6534_weekly_bin703.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/620395/Model_4FGL_J1338.0+6534_weekly_bin703.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/620395/ft1_filtered_4FGL_J1338.0+6534_weekly_bin703.fits.....................!
real 131.13
user 129.14
sys 1.32

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/620395/ft1_filtered_4FGL_J1338.0+6534_weekly_bin703.fits', '/scratch/kocevski/620395/ft2_4FGL_J1338.0+6534_weekly_bin703.fits', expMap='/scratch/kocevski/620395/expmap_664156801_664761601_4FGL_J1338.0+6534_weekly_bin703.fits', expCube='/scratch/kocevski/620395/ltcube_664156801_664761601_4FGL_J1338.0+6534_weekly_bin703.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/620395/Model_4FGL_J1338.0+6534_weekly_bin703.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1338.0+6534'

4FGL J1338.0+6534
   Spectrum: PowerLaw
386    Prefactor:  1.099e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
387        Index:  2.723e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
388        Scale:  6.179e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/620395/ft1_filtered_4FGL_J1338.0+6534_weekly_bin703.fits
Spacecraft file(s): /scratch/kocevski/620395/ft2_4FGL_J1338.0+6534_weekly_bin703.fits
Exposure map: /scratch/kocevski/620395/expmap_664156801_664761601_4FGL_J1338.0+6534_weekly_bin703.fits
Exposure cube: /scratch/kocevski/620395/ltcube_664156801_664761601_4FGL_J1338.0+6534_weekly_bin703.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/620395/Model_4FGL_J1338.0+6534_weekly_bin703.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) = 16923.6032203

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.832       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .11513E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    8.1902       1.0000         .10000E-03   10000.    
     5 'norm      '    .10169E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    2.5529       1.0000         .10000E-03   10000.    
     7 'norm      '    1.4837       1.0000         .10000E-03   10000.    
     8 'Prefactor '    29.935       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .12008E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    35.988       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .14312E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    19.078       1.0000         .10000E-03   10000.    
    16 'Prefactor '    34.917       1.0000         .10000E-03   10000.    
    17 'Prefactor '    4.4735       1.0000         .10000E-03   10000.    
    18 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    5.3343       1.0000         .10000E-03   10000.    
    20 'norm      '    .66559       1.0000         .10000E-03   10000.    
    21 'Prefactor '    22.982       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .27129E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    11.804       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    3.8295       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    29 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    30 'Normalizat'    1.0149       1.0000         .10000E-01   10.000    
    31 'Prefactor '    .99986       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7420E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   16923.59     FROM MIGRAD    STATUS=CONVERGED    785 CALLS     4138 TOTAL
                     EDM=   .97E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.831        5.4647       -.30394E-06   -.64367E-03
   2  Prefactor     .10000E-03    3.7445       -.62769E-06** at limit **
   3  Prefactor     .10000E-03    4.2050       -.31060E-06** at limit **
   4  Prefactor     8.1928        25.982        .48958E-05   -.28643E-05
   5  norm          .10000E-03    .79449        .56668E-08** at limit **
   6  Prefactor     2.5531        2.8261       -.99379E-07   -.23307E-03
   7  norm          1.4838        1.1395       -.24577E-07   -.19397E-03
   8  Prefactor     29.935        21.946       -.69340E-07    .14409E-04
   9  Prefactor     .10000E-03    10.985       -.26111E-05** at limit **
  10  Prefactor     .10000E-03    17.436       -.12201E-05** at limit **
  11  Prefactor     .10000E-03    4.0803        .19438E-06** at limit **
  12  Prefactor     35.992        38.507        .45439E-05    .11298E-03
  13  Prefactor     .10000E-03    1.0404       -.13242E-07** at limit **
  14  Prefactor     .10000E-03    3.4327        .19078E-06** at limit **
  15  Prefactor     19.080        21.579        .77780E-06    .11672E-03
  16  Prefactor     34.916        8.3284        .14343E-06    .82656E-04
  17  Prefactor     4.4733        4.1297       -.23241E-06   -.64807E-03
  18  norm          .10000E-03    10.195        .24220E-05** at limit **
  19  Prefactor     5.3342        7.7618       -.13778E-06   -.15752E-03
  20  norm          .66564        1.4065       -.91562E-06   -.18888E-02
  21  Prefactor     22.978        19.202       -.22968E-05    .62552E-05
  22  Prefactor     .10000E-03    538.08       -.21069E-03** at limit **
  23  Prefactor     .10000E-03    7.8609       -.19705E-05** at limit **
  24  Prefactor     11.802        24.822       -.25572E-05   -.94372E-05
  25  Prefactor     .10000E-03    8.3563        .18428E-05** at limit **
  26  Prefactor     3.8295        4.7805       -.45239E-07   -.41169E-04
  27  Prefactor     .10000E-03    23.320        .78871E-08** at limit **
  28  Prefactor     .10000E-03    3.8548        .22624E-06** at limit **
  29  Prefactor     .10000E-03    19.006        .29457E-05** at limit **
  30  Normalizat    1.0149        .10046       -.21315E-06    .60970E-03
  31  Prefactor     .99983        .11128        .31695E-06    .32626E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.8315
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 8.19284
  norm       = 0.0001
  Prefactor  = 2.55313
  norm       = 1.4838
  Prefactor  = 29.9352
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 35.9916
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 19.0798
  Prefactor  = 34.9156
  Prefactor  = 4.47329
  norm       = 0.0001
  Prefactor  = 5.33422
  norm       = 0.665643
  Prefactor  = 22.9783
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  Prefactor  = 11.802
  Prefactor  = 0.0001
  Prefactor  = 3.82949
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.01493
  Prefactor  = 0.999827
 **********
 **   18 **HESSE 
 **********

 FCN=   16923.59     FROM HESSE     STATUS=OK           628 CALLS     4766 TOTAL
                     EDM=   .17E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.831        5.4659        .60868E-03   -1.5050    
   2  Prefactor     .10000E-03    3.7488        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    17.265        .51510E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     8.1928        25.932        .14009E-03   -1.5135    
   5  norm          .10000E-03    1.9379        .22547E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     2.5531        2.8122        .21591E-03   -1.5388    
   7  norm          1.4838        1.1411        .11417E-03   -1.5464    
   8  Prefactor     29.935        21.948        .73229E-04   -1.4613    
   9  Prefactor     .10000E-03    11.402        .36285E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    17.479        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    4.0822        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     35.992        38.389        .66805E-04   -1.4507    
  13  Prefactor     .10000E-03    2.7727        .22793E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    3.4767        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     19.080        21.510        .91697E-04   -1.4834    
  16  Prefactor     34.916        7.4990        .67818E-04   -1.4525    
  17  Prefactor     4.4733        4.1274        .19037E-03   -1.5285    
  18  norm          .10000E-03    10.194        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     5.3342        7.7563        .17401E-03   -1.5246    
  20  norm          .66564        1.6376        .21291E-02   -1.5545    
  21  Prefactor     22.978        19.202        .83555E-04   -1.4749    
  22  Prefactor     .10000E-03    529.36        .21432E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    7.9238        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     11.802        24.831        .11660E-03   -1.5021    
  25  Prefactor     .10000E-03    8.3892        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     3.8295        4.7763        .20624E-03   -1.5317    
  27  Prefactor     .10000E-03    23.839        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     .10000E-03    3.8939        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     .10000E-03    19.646        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Normalizat    1.0149        .11897        .22294E-03   -.92532    
  31  Prefactor     .99983        .13247        .25717E-03   -.92735    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.72714e-09
Minuit parameter uncertainties:
  1  5.46618
  2  3.48431e-06
  3  0.00025231
  4  25.9679
  5  2.17299e-06
  6  2.81233
  7  1.14112
  8  21.9541
  9  1.62015e-05
  10  1.05122e-07
  11  3.09813e-07
  12  38.4156
  13  2.49775e-06
  14  9.0178e-07
  15  21.5185
  16  7.49923
  17  4.12761
  18  7.38511e-07
  19  7.7578
  20  1.63775
  21  19.2073
  22  0.00190479
  23  7.60847e-06
  24  24.8528
  25  5.54258e-07
  26  4.77675
  27  1.10912e-05
  28  1.66731e-06
  29  5.00717e-05
  30  0.119002
  31  0.13251
Done.

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

Extracting fit parameters...

4FGL J1338.0+6534
   Spectrum: PowerLaw
386    Prefactor:  1.000e-04  2.498e-06  1.000e-04  1.000e+04 ( 1.000e-12)
387        Index:  2.723e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
388        Scale:  6.179e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
739    Prefactor:  9.998e-01  1.325e-01  0.000e+00  1.000e+01 ( 1.000e+00)
740        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
741        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
738   Normalization:  1.015e+00  1.190e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 204.516 65.570
Photon Flux Upper Limit: 4.32e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.40e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/620395/likelihoodResults_664156801_664761601_4FGL_J1338.0+6534_weekly_bin703.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) = 16923.592616
delta logL = -0.0017203369971

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 16923.5908961
delta logL = -4.41319571109e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10110E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.7119       1.0000          .0000       10.000    
     3 'Normalizat'    1.0150       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .99979       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7420E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   16923.59     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      226 TOTAL
                     EDM=   .17E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .84209E-01    .63199E-01** at limit **
   2  Index         2.7014        8.6356        .50000        .31921E-04
   3  Normalizat    1.0149        .75378E-03    .44216E-01    .54698E-03
   4  Prefactor     .99983        .86801E-03    .46265E-01    .36775E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Index      = 2.70137
  Normalizat = 1.01493
  Prefactor  = 0.999827
 **********
 **   18 **HESSE 
 **********

 FCN=   16923.59     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      259 TOTAL
                     EDM=   .13E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    23.723        .23053E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.7014        5.1330        .50000       -.47769    
   3  Normalizat    1.0149        .69240E-02    .22294E-03   -.92532    
   4  Prefactor     .99983        .79730E-02    .25717E-03   -.92735    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.32479e-06
Minuit parameter uncertainties:
  1  0.000283816
  2  167.133
  3  0.006924
  4  0.00797299
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/620395': 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): 102
logL (Free Index) = 16923.5908955
delta logL = 1.70912244357e-07

Extracting fit parameters...

4FGL J1338.0+6534
   Spectrum: PowerLaw
386    Prefactor:  1.000e-04  2.838e-04  1.000e-04  1.000e+04 ( 1.000e-12)
387        Index:  2.701e+00  1.671e+02  0.000e+00  1.000e+01 (-1.000e+00)
388        Scale:  6.179e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
739    Prefactor:  9.998e-01  7.973e-03  0.000e+00  1.000e+01 ( 1.000e+00)
740        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
741        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
738   Normalization:  1.015e+00  6.924e-03  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 204.516 65.570

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/620395/cmap_HighResolution_664156801_664761601_4FGL_J1338.0+6534_weekly_bin703.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.40e-03', job_status='DONE', photon_flux_upper_limit='4.32e-08', time_completed='2022-01-25 06:49:32.926035', job_id='620395', GAL2='1.00', fit_tolerance='1e-08', EG2='1.01', EG='1.01', time_epoch_completed='1643122172.93', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.00', dlogl='1.71e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.72' WHERE bin_id='703' AND source_name='4FGL J1338.0+6534' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jan 25 06:49:32 PST 2022

 <slac> at Tue Jan 25 00:19:45 2022
Job was executed on host(s) <bullet0013>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Jan 25 00:43:59 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Jan 25 00:43:59 2022
Terminated at Tue Jan 25 01:24:11 2022
Results reported at Tue Jan 25 01:24:11 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1338.0+6534_weekly_bin703 204.516 65.5696 664156801 664761601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1338.0+6534 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   2361.00 sec.
    Max Memory :                                 1096 MB
    Average Memory :                             339.40 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   2411 sec.
    Turnaround time :                            3866 sec.

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


------------------------------------------------------------
Sender: LSF System <lsf@bullet0190>
Subject: Job 620395: <4FGL_J1338.0+6534_weekly_bin703> in cluster <slac> Done

Job <4FGL_J1338.0+6534_weekly_bin703> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Tue Jan 25 00:09:34 2022
Job was executed on host(s) <bullet0190>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Jan 25 00:09:59 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Jan 25 00:09:59 2022
Terminated at Tue Jan 25 06:49:33 2022
Results reported at Tue Jan 25 06:49:33 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1338.0+6534_weekly_bin703 204.516 65.5696 664156801 664761601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1338.0+6534 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   2337.00 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             78.20 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   23974 sec.
    Turnaround time :                            23999 sec.

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

