/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/font_manager.py:281: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  'Matplotlib is building the font cache using fc-list. '
/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 36 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 = 7389
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0958.4+5042_daily_bin1280
RA = 149.606, Dec = 50.7
tmin = 571104001, tmax = 571363201
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='635921', job_status='RUN', time_executed='2021-09-01 08:50:08.309022', time_epoch_executed='1630511408.31' WHERE source_name='4FGL J0958.4+5042' and cadence='daily' and bin_id='1280'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/635921

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/635921/ft1_4FGL_J0958.4+5042_daily_bin1280.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/635921/ft2_4FGL_J0958.4+5042_daily_bin1280.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/635921/ft1_4FGL_J0958.4+5042_daily_bin1280.fits outfile=/scratch/kocevski/635921/ft1_filteredMKT_4FGL_J0958.4+5042_daily_bin1280.fits ra=149.606 dec=50.7 rad=12.0 tmin=571104001.0 tmax=571363201.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Done.
real 3.18
user 2.79
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/635921/ft1_filtered_4FGL_J0958.4+5042_daily_bin1280.fits" evtable="EVENTS" scfile=/scratch/kocevski/635921/ft2_4FGL_J0958.4+5042_daily_bin1280.fits sctable="SC_DATA" outfile=/scratch/kocevski/635921/ltcube_571104001_571363201_4FGL_J0958.4+5042_daily_bin1280.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/635921/ft2_4FGL_J0958.4+5042_daily_bin1280.fits
.....................!
real 13.13
user 12.57
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/635921/ft1_filtered_4FGL_J0958.4+5042_daily_bin1280.fits evtable="EVENTS" scfile=/scratch/kocevski/635921/ft2_4FGL_J0958.4+5042_daily_bin1280.fits sctable="SC_DATA" expcube=/scratch/kocevski/635921/ltcube_571104001_571363201_4FGL_J0958.4+5042_daily_bin1280.fits outfile=/scratch/kocevski/635921/expmap_571104001_571363201_4FGL_J0958.4+5042_daily_bin1280.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/635921/ltcube_571104001_571363201_4FGL_J0958.4+5042_daily_bin1280.fits
.....................!
real 190.95
user 185.38
sys 4.81

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/635921/ft1_filtered_4FGL_J0958.4+5042_daily_bin1280.fits scfile=/scratch/kocevski/635921/ft2_4FGL_J0958.4+5042_daily_bin1280.fits outfile=/scratch/kocevski/635921/cmap_571104001_571363201_4FGL_J0958.4+5042_daily_bin1280.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.80
user 0.36
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/635921/ft1_filtered_4FGL_J0958.4+5042_daily_bin1280.fits scfile=/scratch/kocevski/635921/ft2_4FGL_J0958.4+5042_daily_bin1280.fits outfile=/scratch/kocevski/635921/cmap_HighResolution_571104001_571363201_4FGL_J0958.4+5042_daily_bin1280.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.58
user 0.38
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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      '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    10000.       1.0000         .10000E-03   10000.    
    10 'Prefactor '    10000.       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    10000.       1.0000         .10000E-03   10000.    
    13 'Prefactor '    10000.       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    10000.       1.0000         .10000E-03   10000.    
    16 'Prefactor '    10000.       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    10000.       1.0000         .10000E-03   10000.    
    19 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    10000.       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    29 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    30 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    31 'norm      '    7.1647       1.0000         .10000E-03   10000.    
    32 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    33 'Prefactor '    25.579       1.0000         .10000E-03   10000.    
    34 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    35 'norm      '    8.5990       1.0000         .10000E-03   10000.    
    36 'Prefactor '    18.299       1.0000         .10000E-03   10000.    
    37 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    38 'Prefactor '    648.04       1.0000         .10000E-03   10000.    
    39 'Normalizat'    .10004E-01   1.0000         .10000E-01   10.000    
    40 'Prefactor '    .20922       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.

 FCN=   528.5116     FROM MIGRAD    STATUS=CONVERGED   1196 CALLS    10076 TOTAL
                     EDM=   .32E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    16.449        .15364E-05** at limit **
   2  norm          .10000E-03    24.375        .55781E-05** at limit **
   3  norm          .10000E-03    18.788       -.34988E-06** at limit **
   4  Prefactor     .10000E-03    23.880       -.13684E-04** at limit **
   5  Prefactor     .10000E-03    52.315        .65583E-06** at limit **
   6  Prefactor     .10000E-03    160.65       -.31237E-04** at limit **
   7  Prefactor     .10000E-03    699.28        .30571E-04** at limit **
   8  norm          .10000E-03    916.68       -.18611E-03** at limit **
   9  Prefactor    10000.0        8251.9        .18968E-02** at limit **
  10  Prefactor    10000.0        8182.5        .16474E-02** at limit **
  11  Prefactor     .10000E-03    6277.1       -.11153E-02** at limit **
  12  Prefactor    10000.0        7351.1        .15027E-02** at limit **
  13  Prefactor    10000.0        6555.1        .12575E-02** at limit **
  14  Prefactor     .10000E-03    24.590        .11139E-04** at limit **
  15  norm         10000.0        9967.9        .18525E-02** at limit **
  16  Prefactor    10000.0        9774.0        .18050E-02** at limit **
  17  Prefactor     .10000E-03    12.387        .38622E-07** at limit **
  18  Prefactor    10000.0        642.56       -.84317E-04** at limit **
  19  norm          .10000E-03    213.34       -.35753E-04** at limit **
  20  Prefactor    10000.0        9987.0        .18488E-02** at limit **
  21  Prefactor     .10000E-03    323.04        .13877E-03** at limit **
  22  norm          .10000E-03    3.0110       -.21028E-06** at limit **
  23  norm          .10000E-03    897.02       -.16679E-03** at limit **
  24  Prefactor     .10000E-03    155.38       -.19945E-04** at limit **
  25  Prefactor     .10000E-03    446.49        .20305E-03** at limit **
  26  norm          .10000E-03    16.703       -.67972E-05** at limit **
  27  Prefactor     .10000E-03    75.199       -.62540E-04** at limit **
  28  norm          .10000E-03    90.483        .88439E-04** at limit **
  29  Prefactor     .10000E-03    16.767        .43894E-05** at limit **
  30  Prefactor     .10000E-03    51.835        .64603E-05** at limit **
  31  norm          7.1647        4.2942       -.32672E-07    .73612E-04
  32  norm          .10000E-03    2.0966       -.11489E-06** at limit **
  33  Prefactor     25.439        962.55       -.25968E-03    .23211E-04
  34  Prefactor     .10000E-03    197.07       -.50981E-04** at limit **
  35  norm          8.5991        4.5123       -.26542E-06    .40593E-03
  36  Prefactor     18.305        83.464        .17764E-04    .47943E-04
  37  Prefactor     .10000E-03    27.909       -.43481E-05** at limit **
  38  Prefactor     648.09        430.20        .20329E-04    .67496E-04
  39  Normalizat    .10000E-01    .66980       -.11509E-04** at limit **
  40  Prefactor     .20917        .28370        .22127E-04    .11057E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 10000
  Prefactor  = 10000
  Prefactor  = 0.0001
  Prefactor  = 10000
  Prefactor  = 10000
  Prefactor  = 0.0001
  norm       = 10000
  Prefactor  = 10000
  Prefactor  = 0.0001
  Prefactor  = 10000
  norm       = 0.0001
  Prefactor  = 10000
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 7.16468
  norm       = 0.0001
  Prefactor  = 25.4388
  Prefactor  = 0.0001
  norm       = 8.59907
  Prefactor  = 18.3046
  Prefactor  = 0.0001
  Prefactor  = 648.089
  Normalizat = 0.01
  Prefactor  = 0.209172
 **********
 **   18 **HESSE 
 **********

 FCN=   528.5116     FROM HESSE     STATUS=OK           947 CALLS    11023 TOTAL
                     EDM=   .45E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    16.449        .91121E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          .10000E-03    24.374        .11094E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    18.788        .97388E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    23.880        .10981E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    52.315        .16260E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    160.65        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    699.28        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    916.67        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor    10000.0        8251.9        .18142E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor    10000.0        8183.8        .18142E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    6277.0        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor    10000.0        7350.9        .18142E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor    10000.0        6555.1        .18142E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    24.589        .11143E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm         10000.0        9967.9        .18142E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor    10000.0        9774.0        .18142E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    12.387        .79070E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor    10000.0        642.60        .18142E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    213.34        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor    10000.0        9987.0        .18142E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    323.03        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          .10000E-03    3.0111        .38977E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          .10000E-03    897.02        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    155.38        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    446.48        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          .10000E-03    16.710        .91820E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    75.200        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .10000E-03    90.480        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     .10000E-03    16.790        .91964E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Prefactor     .10000E-03    52.105        .16178E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  31  norm          7.1647        4.2917        .35934E-04   -1.5173    
  32  norm          .10000E-03    2.1032        .32518E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  33  Prefactor     25.439        972.92        .79206E-04   -1.4699    
  34  Prefactor     .10000E-03    197.08        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  35  norm          8.5991        4.5099        .34009E-04   -1.5121    
  36  Prefactor     18.305        81.953        .93628E-04   -1.4852    
  37  Prefactor     .10000E-03    27.930        .11870E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  38  Prefactor     648.09        431.41        .81242E-04   -1.0560    
  39  Normalizat    .10000E-01    6.2085        .89448E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  40  Prefactor     .20917        .23027        .31100E-03   -1.2805    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.52544e-10
Minuit parameter uncertainties:
  1  1.79295e-08
  2  2.48264e-08
  3  1.72011e-08
  4  1.64388e-08
  5  8.57536e-08
  6  2.89571e-07
  7  1.29189e-06
  8  2.70138e-05
  9  0.0157287
  10  0.0373046
  11  0.000226019
  12  0.00238919
  13  0.000210475
  14  4.32428e-08
  15  0.00402755
  16  0.000256488
  17  5.17285e-08
  18  0.000175057
  19  2.87643e-06
  20  0.00296996
  21  4.3844e-06
  22  1.1241e-06
  23  0.000259979
  24  8.91728e-05
  25  3.327e-05
  26  2.9214e-05
  27  8.9731e-06
  28  3.31654e-05
  29  1.35193e-05
  30  0.000366401
  31  4.29193
  32  1.8827e-06
  33  320.419
  34  3.45656e-05
  35  4.51004
  36  77.6403
  37  1.77802e-05
  38  433.654
  39  4.50103e-05
  40  0.231279
Done.

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

Extracting fit parameters...

4FGL J0958.4+5042
   Spectrum: PowerLaw
369    Prefactor:  1.000e-04  8.917e-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.092e-01  2.313e-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.501e-05  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 149.606 50.700
Photon Flux Upper Limit: 5.48e-06 ph cm-2 s-1
Energy Flux Upper Limit: 4.30e-01 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/635921/likelihoodResults_571104001_571363201_4FGL_J0958.4+5042_daily_bin1280.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) = 528.511663153
delta logL = -3.19274348612e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 528.511633034
delta logL = -1.8077690811e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .16177E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    3.4605       1.0000          .0000       10.000    
     3 'Normalizat'    .10006E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .20917       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=   528.5116     FROM MIGRAD    STATUS=CONVERGED    108 CALLS      312 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .11078E-03    231.72        .18142E-01** at limit **
   2  Index         3.1727        6.2828        .50000        .18445E-05
   3  Normalizat    .10000E-01    .10903E-01    .89417E-02** at limit **
   4  Prefactor     .20917        .12745E-01    .31098E-03    .40469E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000110776
  Index      = 3.17269
  Normalizat = 0.01
  Prefactor  = 0.20917
 **********
 **   18 **HESSE 
 **********

 FCN=   528.5116     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      341 TOTAL
                     EDM=   .78E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .11078E-03    1574.2        .23753E-02   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         3.1727        6.4782        .50000       -.37413    
   3  Normalizat    .10000E-01    .81831E-01    .35767E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .20917        .34468E-01    .12439E-04   -1.2805    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 7.81722e-09
Minuit parameter uncertainties:
  1  0.267856
  2  3194.4
  3  1.3977e-05
  4  0.0344717
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/635921': 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) = 528.511631401
delta logL = -1.75116042556e-07

Extracting fit parameters...

4FGL J0958.4+5042
   Spectrum: PowerLaw
369    Prefactor:  1.108e-04  2.679e-01  1.000e-04  1.000e+04 ( 1.000e-12)
370        Index:  3.173e+00  3.194e+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.092e-01  3.447e-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:  1.000e-02  1.398e-05  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/635921/cmap_HighResolution_571104001_571363201_4FGL_J0958.4+5042_daily_bin1280.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.30e-01', job_status='DONE', photon_flux_upper_limit='5.48e-06', time_completed='2021-09-01 08:58:15.108830', job_id='635921', GAL2='0.21', fit_tolerance='1e-08', EG2='0.01', EG='0.01', time_epoch_completed='1630511895.11', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.21', dlogl='-1.75e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.66' WHERE bin_id='1280' AND source_name='4FGL J0958.4+5042' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  1 08:58:15 PDT 2021


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

Job <4FGL_J0958.4+5042_daily_bin1280> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Wed Sep  1 08:46:11 2021
Job was executed on host(s) <bullet0255>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  1 08:46:13 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep  1 08:46:13 2021
Terminated at Wed Sep  1 08:58:15 2021
Results reported at Wed Sep  1 08:58:15 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0958.4+5042_daily_bin1280 149.606 50.7 571104001 571363201 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 :                                   475.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             240.48 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   722 sec.
    Turnaround time :                            724 sec.

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

