aklog: Couldn't determine realm of user:aklog: unknown RPC error (-1765328189)  while getting realm
/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 1 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 = 17242
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0958.4+5042_weekly_bin624
RA = 149.606, Dec = 50.7
tmin = 616377601, tmax = 616982401
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='147582', job_status='RUN', time_executed='2021-07-16 09:06:13.371571', time_epoch_executed='1626451573.37' WHERE source_name='4FGL J0958.4+5042' and cadence='weekly' and bin_id='624'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/147582

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/147582/ft1_4FGL_J0958.4+5042_weekly_bin624.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/147582/ft2_4FGL_J0958.4+5042_weekly_bin624.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/147582/ft1_4FGL_J0958.4+5042_weekly_bin624.fits outfile=/scratch/kocevski/147582/ft1_filteredMKT_4FGL_J0958.4+5042_weekly_bin624.fits ra=149.606 dec=50.7 rad=12.0 tmin=616377601.0 tmax=616982401.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 6.27
user 5.98
sys 0.26

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/147582/ft2_4FGL_J0958.4+5042_weekly_bin624.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/147582/ft2_4FGL_J0958.4+5042_weekly_bin624.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/147582/ft1_filteredMKT_4FGL_J0958.4+5042_weekly_bin624.fits evtable="EVENTS" outfile="/scratch/kocevski/147582/ft1_filtered_4FGL_J0958.4+5042_weekly_bin624.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.55
user 0.39
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/147582/ft1_filtered_4FGL_J0958.4+5042_weekly_bin624.fits" evtable="EVENTS" scfile=/scratch/kocevski/147582/ft2_4FGL_J0958.4+5042_weekly_bin624.fits sctable="SC_DATA" outfile=/scratch/kocevski/147582/ltcube_616377601_616982401_4FGL_J0958.4+5042_weekly_bin624.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/147582/ft2_4FGL_J0958.4+5042_weekly_bin624.fits
.....................!
real 32.24
user 31.67
sys 0.42

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/147582/ft1_filtered_4FGL_J0958.4+5042_weekly_bin624.fits evtable="EVENTS" scfile=/scratch/kocevski/147582/ft2_4FGL_J0958.4+5042_weekly_bin624.fits sctable="SC_DATA" expcube=/scratch/kocevski/147582/ltcube_616377601_616982401_4FGL_J0958.4+5042_weekly_bin624.fits outfile=/scratch/kocevski/147582/expmap_616377601_616982401_4FGL_J0958.4+5042_weekly_bin624.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/147582/ltcube_616377601_616982401_4FGL_J0958.4+5042_weekly_bin624.fits
.....................!
real 192.88
user 187.01
sys 5.37

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

Setting source of interest to:
4FGL J0958.4+5042 @ 149.606 50.7

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/147582/ft1_filtered_4FGL_J0958.4+5042_weekly_bin624.fits scfile=/scratch/kocevski/147582/ft2_4FGL_J0958.4+5042_weekly_bin624.fits outfile=/scratch/kocevski/147582/cmap_616377601_616982401_4FGL_J0958.4+5042_weekly_bin624.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=149.606 yref=50.7 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.60
user 0.42
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/147582/ft1_filtered_4FGL_J0958.4+5042_weekly_bin624.fits scfile=/scratch/kocevski/147582/ft2_4FGL_J0958.4+5042_weekly_bin624.fits outfile=/scratch/kocevski/147582/cmap_HighResolution_616377601_616982401_4FGL_J0958.4+5042_weekly_bin624.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=149.606 yref=50.7 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.42
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/147582/ft1_filtered_4FGL_J0958.4+5042_weekly_bin624.fits evtable="EVENTS" scfile=/scratch/kocevski/147582/ft2_4FGL_J0958.4+5042_weekly_bin624.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/147582/Model_4FGL_J0958.4+5042_weekly_bin624.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/147582/ft1_filtered_4FGL_J0958.4+5042_weekly_bin624.fits.....................!
real 32.16
user 30.74
sys 1.26

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/147582/ft1_filtered_4FGL_J0958.4+5042_weekly_bin624.fits', '/scratch/kocevski/147582/ft2_4FGL_J0958.4+5042_weekly_bin624.fits', expMap='/scratch/kocevski/147582/expmap_616377601_616982401_4FGL_J0958.4+5042_weekly_bin624.fits', expCube='/scratch/kocevski/147582/ltcube_616377601_616982401_4FGL_J0958.4+5042_weekly_bin624.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/147582/Model_4FGL_J0958.4+5042_weekly_bin624.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0958.4+5042'

4FGL J0958.4+5042
   Spectrum: PowerLaw
369    Prefactor:  1.235e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
370        Index:  2.663e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
371        Scale:  5.744e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/147582/ft1_filtered_4FGL_J0958.4+5042_weekly_bin624.fits
Spacecraft file(s): /scratch/kocevski/147582/ft2_4FGL_J0958.4+5042_weekly_bin624.fits
Exposure map: /scratch/kocevski/147582/expmap_616377601_616982401_4FGL_J0958.4+5042_weekly_bin624.fits
Exposure cube: /scratch/kocevski/147582/ltcube_616377601_616982401_4FGL_J0958.4+5042_weekly_bin624.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/147582/Model_4FGL_J0958.4+5042_weekly_bin624.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) = 2627.00448605

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'norm      '    .10321E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    10000.       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .16276E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10177E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10169E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .11223E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .11396E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10039E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10363E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10126E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10383E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    3.1145       1.0000         .10000E-03   10000.    
    23 'norm      '    .10061E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    12.700       1.0000         .10000E-03   10000.    
    25 'Prefactor '    17.844       1.0000         .10000E-03   10000.    
    26 'norm      '    12.047       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .14331E-02   1.0000         .10000E-03   10000.    
    28 'norm      '    3.0898       1.0000         .10000E-03   10000.    
    29 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    30 'Prefactor '    3.8882       1.0000         .10000E-03   10000.    
    31 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    32 'norm      '    2.8689       1.0000         .10000E-03   10000.    
    33 'Prefactor '    182.45       1.0000         .10000E-03   10000.    
    34 'Prefactor '    227.45       1.0000         .10000E-03   10000.    
    35 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    36 'Prefactor '    .10104E-03   1.0000         .10000E-03   10000.    
    37 'Prefactor '    14.689       1.0000         .10000E-03   10000.    
    38 'Prefactor '    .10088E-03   1.0000         .10000E-03   10000.    
    39 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
    40 'Prefactor '    1.4545       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7370E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   2626.869     FROM MIGRAD    STATUS=CONVERGED    272 CALLS     5679 TOTAL
                     EDM=   .19E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.9758       -.27082E-06** at limit **
   2  norm          .10000E-03    13.964       -.74844E-07** at limit **
   3  norm          .10000E-03    7.8590       -.21556E-06** at limit **
   4  Prefactor     .10000E-03    8.4168       -.66818E-06** at limit **
   5  Prefactor    10000.0        53.196       -.99421E-05** at limit **
   6  Prefactor     .10168E-03    54.247        .71806E-05** at limit **
   7  Prefactor     .16668E-03    245.93       -.18429E-05** at limit **
   8  norm          .10000E-03    3.7293        .23471E-06** at limit **
   9  Prefactor     .10018E-03    15.057        .45043E-05** at limit **
  10  Prefactor     .10000E-03    17.131        .68793E-06** at limit **
  11  Prefactor     .18295E-03    245.43       -.15674E-05** at limit **
  12  Prefactor     .10001E-03    19.818        .33748E-05** at limit **
  13  Prefactor     .10002E-03    28.321       -.68784E-05** at limit **
  14  Prefactor     .10001E-03    12.228       -.10016E-05** at limit **
  15  norm          .10001E-03    13.310        .57960E-06** at limit **
  16  Prefactor     .10057E-03    17.307       -.28211E-05** at limit **
  17  Prefactor     .10000E-03    2.8535       -.37972E-06** at limit **
  18  Prefactor     .10015E-03    15.388        .95880E-06** at limit **
  19  norm          .10000E-03    21.503       -.75438E-06** at limit **
  20  Prefactor     .10459E-03    151.99       -.67936E-05** at limit **
  21  Prefactor     .10004E-03    11.501       -.15540E-05** at limit **
  22  norm          3.1137        1.6510       -.51282E-08   -.13088E-04
  23  norm          .10003E-03    15.347       -.44834E-05** at limit **
  24  Prefactor     12.693        1.0689        .29794E-07   -.63073E-04
  25  Prefactor     17.844        1.0378        .20756E-07   -.79791E-04
  26  norm          12.046        5.3394       -.16635E-06   -.31763E-03
  27  Prefactor     .10809E-03    28.731       -.37197E-05** at limit **
  28  norm          3.0875        7.8085        .87873E-10   -.76631E-03
  29  Prefactor     .10000E-03    9.3418        .41594E-06** at limit **
  30  Prefactor     3.8838        5.0576        .22564E-06    .23115E-03
  31  norm          .10000E-03    .79888        .95521E-07** at limit **
  32  norm          2.8663        2.7956        .11006E-07    .23160E-05
  33  Prefactor     182.44        3.7505        .42145E-07    .23122E-02
  34  Prefactor     227.47        3.3647       -.51938E-07   -.28759E-02
  35  norm          .10000E-03    1.7348        .14211E-06** at limit **
  36  Prefactor     .19647E-03    174.32       -.13670E-04** at limit **
  37  Prefactor     14.738        3.9972       -.66763E-06   -.43878E-03
  38  Prefactor     .10003E-03    13.220        .29463E-05** at limit **
  39  Normalizat    .10000E-01    .11719        .24196E-05** at limit **
  40  Prefactor     1.4542        .16750        .25044E-06    .44397E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 10000
  Prefactor  = 0.000101676
  Prefactor  = 0.000166683
  norm       = 0.0001
  Prefactor  = 0.00010018
  Prefactor  = 0.0001
  Prefactor  = 0.000182952
  Prefactor  = 0.000100008
  Prefactor  = 0.000100017
  Prefactor  = 0.00010001
  norm       = 0.000100013
  Prefactor  = 0.000100572
  Prefactor  = 0.0001
  Prefactor  = 0.000100148
  norm       = 0.000100003
  Prefactor  = 0.000104586
  Prefactor  = 0.00010004
  norm       = 3.11372
  norm       = 0.000100027
  Prefactor  = 12.6932
  Prefactor  = 17.8439
  norm       = 12.0459
  Prefactor  = 0.000108094
  norm       = 3.08751
  Prefactor  = 0.0001
  Prefactor  = 3.88379
  norm       = 0.0001
  norm       = 2.8663
  Prefactor  = 182.439
  Prefactor  = 227.467
  norm       = 0.0001
  Prefactor  = 0.000196467
  Prefactor  = 14.738
  Prefactor  = 0.000100034
  Normalizat = 0.01
  Prefactor  = 1.45424
 **********
 **   18 **HESSE 
 **********

 FCN=   2626.869     FROM HESSE     STATUS=OK          1051 CALLS     6730 TOTAL
                     EDM=   .69E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    4.9751        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          .10000E-03    13.964        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    7.8580        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    8.4111        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor    10000.0        110.73        .90712E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10168E-03    94.378        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .16668E-03    770.14        .90712E-02   -1.5706    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    3.7279        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10018E-03    35.961        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    17.108        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .18295E-03    786.48        .90712E-02   -1.5706    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10001E-03    48.453        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10002E-03    59.040        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10001E-03    26.579        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10001E-03    50.640        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10057E-03    31.732        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    2.8513        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10015E-03    26.489        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    21.555        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10459E-03    181.16        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10004E-03    52.476        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          3.1137        1.6511        .57439E-02   -1.5355    
  23  norm          .10003E-03    54.212        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     12.693        13.449        .28100E-02   -1.4995    
  25  Prefactor     17.844        26.168        .23704E-02   -1.4863    
  26  norm          12.046        5.3768        .28854E-02   -1.5014    
  27  Prefactor     .10809E-03    576.72        .10253E-01   -1.5709    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          3.0875        7.8887        .57681E-02   -1.5357    
  29  Prefactor     .10000E-03    9.2945        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Prefactor     3.8838        5.0910        .51156E-02   -1.5314    
  31  norm          .10000E-03    .79439        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  32  norm          2.8663        2.8398        .59997E-02   -1.5369    
  33  Prefactor     182.44        106.32        .74718E-03   -1.2998    
  34  Prefactor     227.47        202.37        .67073E-03   -1.2680    
  35  norm          .10000E-03    1.6908        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  36  Prefactor     .19647E-03    376.68        .90712E-02   -1.5710    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  37  Prefactor     14.738        24.198        .26127E-02   -1.4940    
  38  Prefactor     .10003E-03    35.096        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  39  Normalizat    .10000E-01    .10154        .16810       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  40  Prefactor     1.4542        .19715        .50028E-01   -.78830    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.86807e-07
Minuit parameter uncertainties:
  1  2.76305e-05
  2  1.70362e-05
  3  2.76779e-05
  4  8.89791e-05
  5  0.0219887
  6  0.025192
  7  0.459264
  8  2.07214e-05
  9  0.00508539
  10  1.20485e-05
  11  0.517789
  12  0.00125664
  13  0.0019799
  14  0.00103368
  15  0.00164817
  16  0.00852868
  17  2.93155e-05
  18  0.00396195
  19  0.000535382
  20  0.057821
  21  0.00288386
  22  1.65112
  23  0.00242226
  24  13.4522
  25  26.1844
  26  5.37704
  27  0.137995
  28  7.89137
  29  5.82615e-05
  30  5.09153
  31  3.89354e-06
  32  2.8399
  33  106.436
  34  202.998
  35  8.44953e-06
  36  0.38368
  37  24.2143
  38  0.00219934
  39  1.11615e-06
  40  0.197256
Done.

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

Extracting fit parameters...

4FGL J0958.4+5042
   Spectrum: PowerLaw
369    Prefactor:  1.269e+01  1.345e+01  1.000e-04  1.000e+04 ( 1.000e-12)
370        Index:  2.663e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
371        Scale:  5.744e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
734    Prefactor:  1.454e+00  1.973e-01  0.000e+00  1.000e+01 ( 1.000e+00)
735        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
736        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
733   Normalization:  1.000e-02  1.116e-06  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.51
Ra Dec: 149.606 50.700
Photon Index (Fixed Index): 2.66 +/- 0.00
Photon Flux (Fixed Index): 8.03e-08 +/- 8.50e-08
Energy Flux (Fixed Index): 1.99e-05 +/- 2.11e-05

TS (Fixed Index): 1.51
Ra Dec: 149.606 50.700
Photon Flux Upper Limit: 2.98e-07 ph cm-2 s-1
Energy Flux Upper Limit: 2.34e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/147582/likelihoodResults_616377601_616982401_4FGL_J0958.4+5042_weekly_bin624.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) = 2626.60651401
delta logL = 0.262394128031

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 2626.46412268
delta logL = 0.404785456145

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   2626.464     FROM MIGRAD    STATUS=CONVERGED     62 CALLS      227 TOTAL
                     EDM=   .11E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     22.648        27.380        .21030E-02   -.15867E-04
   2  Index         1.8960        .71914        .18790       -.20738E-04
   3  Normalizat    .10000E-01    .10280        .16772    ** at limit **
   4  Prefactor     1.4480        .18043        .50080E-01   -.32521E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 22.6483
  Index      = 1.89596
  Normalizat = 0.01
  Prefactor  = 1.44802
 **********
 **   18 **HESSE 
 **********

 FCN=   2626.464     FROM HESSE     STATUS=OK            33 CALLS      260 TOTAL
                     EDM=   .25E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     22.648        20.560        .84119E-04   -1.4756    
   2  Index         1.8960        .65003        .69266E-02   -.66977    
   3  Normalizat    .10000E-01    .12268        .88075E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     1.4480        .15640        .22135E-03   -.79006    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.5405e-12
Minuit parameter uncertainties:
  1  20.5668
  2  0.653049
  3  4.96176e-08
  4  0.156452
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/147582': 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) = 2626.46412031
delta logL = 0.404787832173

Extracting fit parameters...

4FGL J0958.4+5042
   Spectrum: PowerLaw
369    Prefactor:  2.265e+01  2.057e+01  1.000e-04  1.000e+04 ( 1.000e-12)
370        Index:  1.896e+00  6.530e-01  0.000e+00  1.000e+01 (-1.000e+00)
371        Scale:  5.744e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
734    Prefactor:  1.448e+00  1.565e-01  0.000e+00  1.000e+01 ( 1.000e+00)
735        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
736        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
733   Normalization:  1.000e-02  4.962e-08  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.33
Ra Dec: 149.606 50.700
Photon Index (Free Index): 1.90 +/- 0.65
Photon Flux (Free Index): 6.94e-08 +/- 7.02e-08
Energy Flux (Free Index): 6.30e-05 +/- 1.03e-04

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/147582/cmap_HighResolution_616377601_616982401_4FGL_J0958.4+5042_weekly_bin624.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.34e-02', comment='SUCCESS', photon_flux='8.03e-08', energy_flux2='6.30e-05', photon_flux_error='8.50e-08', dlogl='4.05e-01', energy_flux='1.99e-05', photon_flux2='6.94e-08', job_status='DONE', time_completed='2021-07-16 09:21:01.261986', photon_index_error2='0.65', photon_index2='1.90', ts='1.51', fit_tolerance='1e-08', GAL='1.45', photon_index_error='0.00', photon_flux_upper_limit='2.98e-07', energy_flux_error2='1.03e-04', EG='0.01', time_epoch_completed='1626452461.26', return_code='0', job_id='147582', GAL2='1.45', EG2='0.01', return_code2='0', energy_flux_error='2.11e-05', photon_flux_error2='7.02e-08', ts2='2.33', photon_index='2.66' WHERE bin_id='624' AND source_name='4FGL J0958.4+5042' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Fri Jul 16 09:21:01 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0045>
Subject: Job 147582: <4FGL_J0958.4+5042_weekly_bin624> in cluster <slac> Done

Job <4FGL_J0958.4+5042_weekly_bin624> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Fri Jul 16 09:05:41 2021
Job was executed on host(s) <bullet0045>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Jul 16 09:06:04 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri Jul 16 09:06:04 2021
Terminated at Fri Jul 16 09:21:02 2021
Results reported at Fri Jul 16 09:21:02 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0958.4+5042_weekly_bin624 149.606 50.7 616377601 616982401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0958.4+5042 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   842.00 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             331.39 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   897 sec.
    Turnaround time :                            921 sec.

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

