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


Performing analysis on: 4FGL_J0958.4+5042_weekly_bin418
RA = 149.606, Dec = 50.7
tmin = 491788801, tmax = 492393601
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='146094', job_status='RUN', time_executed='2021-07-16 09:02:57.858776', time_epoch_executed='1626451377.86' WHERE source_name='4FGL J0958.4+5042' and cadence='weekly' and bin_id='418'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/146094

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/146094/ft1_4FGL_J0958.4+5042_weekly_bin418.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/146094/ft2_4FGL_J0958.4+5042_weekly_bin418.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/146094/ft1_4FGL_J0958.4+5042_weekly_bin418.fits outfile=/scratch/kocevski/146094/ft1_filteredMKT_4FGL_J0958.4+5042_weekly_bin418.fits ra=149.606 dec=50.7 rad=12.0 tmin=491788801.0 tmax=492393601.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.46
user 8.13
sys 0.30

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/146094/ft1_filtered_4FGL_J0958.4+5042_weekly_bin418.fits" evtable="EVENTS" scfile=/scratch/kocevski/146094/ft2_4FGL_J0958.4+5042_weekly_bin418.fits sctable="SC_DATA" outfile=/scratch/kocevski/146094/ltcube_491788801_492393601_4FGL_J0958.4+5042_weekly_bin418.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/146094/ft2_4FGL_J0958.4+5042_weekly_bin418.fits
.....................!
real 28.52
user 28.12
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/146094/ft1_filtered_4FGL_J0958.4+5042_weekly_bin418.fits evtable="EVENTS" scfile=/scratch/kocevski/146094/ft2_4FGL_J0958.4+5042_weekly_bin418.fits sctable="SC_DATA" expcube=/scratch/kocevski/146094/ltcube_491788801_492393601_4FGL_J0958.4+5042_weekly_bin418.fits outfile=/scratch/kocevski/146094/expmap_491788801_492393601_4FGL_J0958.4+5042_weekly_bin418.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/146094/ltcube_491788801_492393601_4FGL_J0958.4+5042_weekly_bin418.fits
.....................!
real 191.82
user 186.46
sys 5.02

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/146094/ft1_filtered_4FGL_J0958.4+5042_weekly_bin418.fits scfile=/scratch/kocevski/146094/ft2_4FGL_J0958.4+5042_weekly_bin418.fits outfile=/scratch/kocevski/146094/cmap_491788801_492393601_4FGL_J0958.4+5042_weekly_bin418.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.59
user 0.41
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/146094/ft1_filtered_4FGL_J0958.4+5042_weekly_bin418.fits scfile=/scratch/kocevski/146094/ft2_4FGL_J0958.4+5042_weekly_bin418.fits outfile=/scratch/kocevski/146094/cmap_HighResolution_491788801_492393601_4FGL_J0958.4+5042_weekly_bin418.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.60
user 0.42
sys 0.18

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/146094/ft1_filtered_4FGL_J0958.4+5042_weekly_bin418.fits', '/scratch/kocevski/146094/ft2_4FGL_J0958.4+5042_weekly_bin418.fits', expMap='/scratch/kocevski/146094/expmap_491788801_492393601_4FGL_J0958.4+5042_weekly_bin418.fits', expCube='/scratch/kocevski/146094/ltcube_491788801_492393601_4FGL_J0958.4+5042_weekly_bin418.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/146094/Model_4FGL_J0958.4+5042_weekly_bin418.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/146094/ft1_filtered_4FGL_J0958.4+5042_weekly_bin418.fits
Spacecraft file(s): /scratch/kocevski/146094/ft2_4FGL_J0958.4+5042_weekly_bin418.fits
Exposure map: /scratch/kocevski/146094/expmap_491788801_492393601_4FGL_J0958.4+5042_weekly_bin418.fits
Exposure cube: /scratch/kocevski/146094/ltcube_491788801_492393601_4FGL_J0958.4+5042_weekly_bin418.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/146094/Model_4FGL_J0958.4+5042_weekly_bin418.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) = 858.737645021

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     2 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    68.820       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    790.30       1.0000         .10000E-03   10000.    
     8 'norm      '    4.7340       1.0000         .10000E-03   10000.    
     9 'Prefactor '    1.8724       1.0000         .10000E-03   10000.    
    10 'Prefactor '    10.157       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10057E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    38.828       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10189E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    26.082       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10321E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    58.796       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    1.9825       1.0000         .10000E-03   10000.    
    23 'norm      '    115.72       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    31.320       1.0000         .10000E-03   10000.    
    26 'norm      '    .79256       1.0000         .10000E-03   10000.    
    27 'Prefactor '    28.204       1.0000         .10000E-03   10000.    
    28 'norm      '    .10073E-03   1.0000         .10000E-03   10000.    
    29 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    30 'Prefactor '    37.251       1.0000         .10000E-03   10000.    
    31 'norm      '    14.327       1.0000         .10000E-03   10000.    
    32 'norm      '    4.0935       1.0000         .10000E-03   10000.    
    33 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    34 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    35 'norm      '    .10151E-03   1.0000         .10000E-03   10000.    
    36 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    37 'Prefactor '    62.913       1.0000         .10000E-03   10000.    
    38 'Prefactor '    399.77       1.0000         .10000E-03   10000.    
    39 'Normalizat'    .69178       1.0000         .10000E-01   10.000    
    40 'Prefactor '    .22557E-01   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=   858.7222     FROM MIGRAD    STATUS=CONVERGED    129 CALLS     7345 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10008E-03    6.1624        .14629E-05** at limit **
   2  norm          .10000E-03    8.7413        .22290E-05** at limit **
   3  norm          .10002E-03    9.2514       -.52768E-06** at limit **
   4  Prefactor     68.819        1.1704       -.44286E-06    .10288E-02
   5  Prefactor     .10000E-03    3.5761       -.58651E-07** at limit **
   6  Prefactor     .10036E-03    24.465        .28024E-04** at limit **
   7  Prefactor     790.30        1.0026        .16796E-07   -.20706E-03
   8  norm          4.7386        2.4454       -.95939E-06   -.76796E-03
   9  Prefactor     1.8417        2.3843        .77132E-05   -.15692E-03
  10  Prefactor     10.154        1.0409        .52472E-06    .92344E-03
  11  Prefactor     .10005E-03    20.404       -.29256E-04** at limit **
  12  Prefactor     38.828        1.0058        .22080E-07    .62047E-03
  13  Prefactor     .10510E-03    57.074       -.11145E-04** at limit **
  14  Prefactor     .10009E-03    15.561       -.21788E-04** at limit **
  15  norm          26.088        1.6886        .15756E-05   -.74115E-03
  16  Prefactor     .19816E-03    120.35       -.93990E-04** at limit **
  17  Prefactor     .10001E-03    10.092        .24499E-05** at limit **
  18  Prefactor     .10007E-03    7.0084        .14249E-04** at limit **
  19  norm          .10005E-03    7.1357        .10507E-04** at limit **
  20  Prefactor     58.796        1.0101       -.10960E-06    .49830E-03
  21  Prefactor     .10156E-03    22.319       -.44725E-05** at limit **
  22  norm          1.9822        1.8158       -.56220E-06    .10382E-03
  23  norm          115.72        1.0066       -.48191E-07   -.79673E-04
  24  Prefactor     .10000E-03    11.999       -.17494E-04** at limit **
  25  Prefactor     31.328        2.3024        .22636E-05   -.17959E-02
  26  norm          .79023        6.9787       -.18283E-04   -.28358E-02
  27  Prefactor     28.188        3.8133       -.41392E-05    .28771E-02
  28  norm          .10016E-03    15.917        .72712E-05** at limit **
  29  Prefactor     .10700E-03    45.678        .57433E-04** at limit **
  30  Prefactor     37.238        1.4306       -.97639E-07    .35439E-03
  31  norm          14.326        1.2286       -.61517E-06   -.82833E-03
  32  norm          4.0914        4.8819       -.92424E-05   -.54414E-02
  33  Prefactor     .10341E-03    48.706        .64707E-04** at limit **
  34  Prefactor     .10679E-03    53.645       -.37808E-05** at limit **
  35  norm          .10000E-03    5.4683       -.70989E-06** at limit **
  36  Prefactor     .10126E-03    18.747       -.32201E-04** at limit **
  37  Prefactor     62.913        1.0147       -.15350E-06    .72499E-04
  38  Prefactor     399.77        1.0066       -.35665E-07    .41805E-03
  39  Normalizat    .69207        .44475        .43081E-05   -.58550E-04
  40  Prefactor     .22221E-01    2.2712        .47877E-04    .27293E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100077
  norm       = 0.000100003
  norm       = 0.000100017
  Prefactor  = 68.8187
  Prefactor  = 0.0001
  Prefactor  = 0.000100362
  Prefactor  = 790.302
  norm       = 4.73862
  Prefactor  = 1.8417
  Prefactor  = 10.1542
  Prefactor  = 0.00010005
  Prefactor  = 38.8276
  Prefactor  = 0.000105103
  Prefactor  = 0.000100089
  norm       = 26.0883
  Prefactor  = 0.000198155
  Prefactor  = 0.000100008
  Prefactor  = 0.000100066
  norm       = 0.000100047
  Prefactor  = 58.7957
  Prefactor  = 0.000101557
  norm       = 1.98223
  norm       = 115.716
  Prefactor  = 0.0001
  Prefactor  = 31.3284
  norm       = 0.790233
  Prefactor  = 28.1881
  norm       = 0.000100157
  Prefactor  = 0.000106995
  Prefactor  = 37.238
  norm       = 14.3257
  norm       = 4.09144
  Prefactor  = 0.000103407
  Prefactor  = 0.000106791
  norm       = 0.0001
  Prefactor  = 0.00010126
  Prefactor  = 62.9131
  Prefactor  = 399.766
  Normalizat = 0.692071
  Prefactor  = 0.0222214
 **********
 **   18 **HESSE 
 **********

 FCN=   858.7222     FROM HESSE     STATUS=NOT POSDEF  1055 CALLS     8400 TOTAL
                     EDM=   .23E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10008E-03    15.239        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          .10000E-03    7.7270        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10002E-03    8.3383        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     68.819        75.641        .12096E-02   -1.4047    
   5  Prefactor     .10000E-03    3.1505        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10036E-03    34.639        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     790.30        438.09        .37066E-03   -1.0009    
   8  norm          4.7386        5.6381        .46234E-02   -1.5273    
   9  Prefactor     1.8417        67.323        .76087E-02   -1.5437    
  10  Prefactor     10.154        15.371        .31432E-02   -1.5071    
  11  Prefactor     .10005E-03    49.641        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     38.828        25.775        .16081E-02   -1.4461    
  13  Prefactor     .10510E-03    170.41        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10009E-03    16.483        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          26.088        83.348        .19610E-02   -1.4686    
  16  Prefactor     .19816E-03    279.07        .90712E-02   -1.5706    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10001E-03    9.0103        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10007E-03    13.410        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10005E-03    14.790        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     58.796        159.88        .13080E-02   -1.4173    
  21  Prefactor     .10156E-03    57.171        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          1.9822        1.8357        .73587E-02   -1.5426    
  23  norm          115.72        79.928        .93505E-03   -1.3552    
  24  Prefactor     .10000E-03    12.556        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     31.328        154.66        .17899E-02   -1.4588    
  26  norm          .79023        38.348        .12412E-01   -1.5530    
  27  Prefactor     28.188        104.83        .18859E-02   -1.4646    
  28  norm          .10016E-03    36.695        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     .10700E-03    120.77        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Prefactor     37.238        27.725        .16416E-02   -1.4487    
  31  norm          14.326        9.4881        .26455E-02   -1.4951    
  32  norm          4.0914        8.0976        .49815E-02   -1.5303    
  33  Prefactor     .10341E-03    78.139        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  34  Prefactor     .10679E-03    165.17        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  35  norm          .10000E-03    4.7981        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  36  Prefactor     .10126E-03    44.431        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  37  Prefactor     62.913        96.593        .12648E-02   -1.4120    
  38  Prefactor     399.77        423.91        .51045E-03   -1.1682    
  39  Normalizat    .69207        2.0377        .42181E-01   -1.0421    
  40  Prefactor     .22221E-01    7.4318        .19014       -1.4765    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.30385e-06
Minuit parameter uncertainties:
  1  0.00216294
  2  0.00029891
  3  0.000750979
  4  75.7473
  5  2.22994e-05
  6  0.00708136
  7  440.038
  8  5.63874
  9  22.2965
  10  15.3765
  11  0.00315055
  12  25.7824
  13  0.0591445
  14  0.0024294
  15  83.7229
  16  0.332573
  17  0.000544789
  18  0.00188728
  19  0.00166656
  20  161.072
  21  0.018889
  22  1.83578
  23  80.0025
  24  4.48497e-05
  25  139.801
  26  11.0166
  27  105.526
  28  0.0047988
  29  0.0582505
  30  27.7348
  31  9.48907
  32  8.09976
  33  0.0326769
  34  0.0671667
  35  1.17339e-05
  36  0.0149768
  37  96.8351
  38  427.291
  39  2.37346
  40  2.2741
Done.

MINUIT Return Code (Fixed Index): 102
logL (Fixed Index) = 858.722187571

Extracting fit parameters...

4FGL J0958.4+5042
   Spectrum: PowerLaw
369    Prefactor:  1.000e-04  4.485e-05  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:  2.222e-02  2.274e+00  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:  6.921e-01  2.373e+00  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/146094/likelihoodResults_491788801_492393601_4FGL_J0958.4+5042_weekly_bin418.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) = 858.722512311
delta logL = -0.0003247408074

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 858.722187536
delta logL = 3.45168018612e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.6451       1.0000          .0000       10.000    
     3 'Normalizat'    .69203       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .22282E-01   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.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   858.7222     FROM MIGRAD    STATUS=CONVERGED    107 CALLS      270 TOTAL
                     EDM=   .23E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    123.12        .10956E-01** at limit **
   2  Index         2.1402        6.0543        .50000        .14450E-06
   3  Normalizat    .69207        .26748E-01    .25748E-03   -.83915E-03
   4  Prefactor     .22209E-01    .28516E-01    .11064E-01   -.13673E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.14022
  Normalizat = 0.692065
  Prefactor  = 0.022209
 **********
 **   18 **HESSE 
 **********

 FCN=   858.7222     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      299 TOTAL
                     EDM=   .20E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1020.3        .12126E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.1402        8.9295        .50000       -.60889    
   3  Normalizat    .69207        .83065E-01    .51495E-04   -1.0421    
   4  Prefactor     .22209E-01    .88219E-01    .44257E-03   -1.4765    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.02949e-09
Minuit parameter uncertainties:
  1  0.00123752
  2  1743.35
  3  0.0830801
  4  0.0887432
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/146094': 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) = 858.722186853
delta logL = 7.17289935892e-07

Extracting fit parameters...

4FGL J0958.4+5042
   Spectrum: PowerLaw
369    Prefactor:  1.000e-04  1.238e-03  1.000e-04  1.000e+04 ( 1.000e-12)
370        Index:  2.140e+00  1.743e+03  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:  2.221e-02  8.874e-02  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:  6.921e-01  8.308e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 149.606 50.700

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/146094/cmap_HighResolution_491788801_492393601_4FGL_J0958.4+5042_weekly_bin418.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.48e-02', job_status='DONE', photon_flux_upper_limit='3.16e-07', time_completed='2021-07-16 09:13:31.323384', job_id='146094', GAL2='0.02', fit_tolerance='1e-08', EG2='0.69', EG='0.69', time_epoch_completed='1626452011.32', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='102', GAL='0.02', dlogl='7.17e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.66' WHERE bin_id='418' AND source_name='4FGL J0958.4+5042' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Fri Jul 16 09:13:31 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0255>
Subject: Job 146094: <4FGL_J0958.4+5042_weekly_bin418> in cluster <slac> Done

Job <4FGL_J0958.4+5042_weekly_bin418> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Fri Jul 16 09:00:27 2021
Job was executed on host(s) <bullet0255>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Jul 16 09:02:01 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:02:01 2021
Terminated at Fri Jul 16 09:13:32 2021
Results reported at Fri Jul 16 09:13:32 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0958.4+5042_weekly_bin418 149.606 50.7 491788801 492393601 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 :                                   589.12 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             302.91 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   692 sec.
    Turnaround time :                            785 sec.

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

