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


Performing analysis on: 4FGL_J2358.3+3830_daily_bin744
RA = 359.588, Dec = 38.5097
tmin = 432172801, tmax = 432432001
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='222984', job_status='RUN', time_executed='2021-09-30 10:55:31.878122', time_epoch_executed='1633024531.88' WHERE source_name='4FGL J2358.3+3830' and cadence='daily' and bin_id='744'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/222984

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/222984/ft1_4FGL_J2358.3+3830_daily_bin744.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/222984/ft2_4FGL_J2358.3+3830_daily_bin744.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/222984/ft1_4FGL_J2358.3+3830_daily_bin744.fits outfile=/scratch/kocevski/222984/ft1_filteredMKT_4FGL_J2358.3+3830_daily_bin744.fits ra=359.588 dec=38.5097 rad=12.0 tmin=432172801.0 tmax=432432001.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 5.00
user 4.77
sys 0.22

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/222984/ft2_4FGL_J2358.3+3830_daily_bin744.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/222984/ft2_4FGL_J2358.3+3830_daily_bin744.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/222984/ft1_filteredMKT_4FGL_J2358.3+3830_daily_bin744.fits evtable="EVENTS" outfile="/scratch/kocevski/222984/ft1_filtered_4FGL_J2358.3+3830_daily_bin744.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.50
user 0.32
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/222984/ft1_filtered_4FGL_J2358.3+3830_daily_bin744.fits" evtable="EVENTS" scfile=/scratch/kocevski/222984/ft2_4FGL_J2358.3+3830_daily_bin744.fits sctable="SC_DATA" outfile=/scratch/kocevski/222984/ltcube_432172801_432432001_4FGL_J2358.3+3830_daily_bin744.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/222984/ft2_4FGL_J2358.3+3830_daily_bin744.fits
.....................!
real 12.10
user 11.73
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/222984/ft1_filtered_4FGL_J2358.3+3830_daily_bin744.fits evtable="EVENTS" scfile=/scratch/kocevski/222984/ft2_4FGL_J2358.3+3830_daily_bin744.fits sctable="SC_DATA" expcube=/scratch/kocevski/222984/ltcube_432172801_432432001_4FGL_J2358.3+3830_daily_bin744.fits outfile=/scratch/kocevski/222984/expmap_432172801_432432001_4FGL_J2358.3+3830_daily_bin744.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/222984/ltcube_432172801_432432001_4FGL_J2358.3+3830_daily_bin744.fits
.....................!
real 191.49
user 186.02
sys 5.12

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
Extended source FHES J2304.0+5406 in ROI with RadialGaussian spatial model.
Added 154 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J2358.3+3830 @ 359.588 38.5097

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/222984/ft1_filtered_4FGL_J2358.3+3830_daily_bin744.fits scfile=/scratch/kocevski/222984/ft2_4FGL_J2358.3+3830_daily_bin744.fits outfile=/scratch/kocevski/222984/cmap_432172801_432432001_4FGL_J2358.3+3830_daily_bin744.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=359.588 yref=38.5097 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.52
user 0.36
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/222984/ft1_filtered_4FGL_J2358.3+3830_daily_bin744.fits scfile=/scratch/kocevski/222984/ft2_4FGL_J2358.3+3830_daily_bin744.fits outfile=/scratch/kocevski/222984/cmap_HighResolution_432172801_432432001_4FGL_J2358.3+3830_daily_bin744.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=359.588 yref=38.5097 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.54
user 0.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/222984/ft1_filtered_4FGL_J2358.3+3830_daily_bin744.fits evtable="EVENTS" scfile=/scratch/kocevski/222984/ft2_4FGL_J2358.3+3830_daily_bin744.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/222984/Model_4FGL_J2358.3+3830_daily_bin744.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 FHES J2304.0+5406
adding source GAL_V02
Working on...
/scratch/kocevski/222984/ft1_filtered_4FGL_J2358.3+3830_daily_bin744.fits.....................!
real 78.02
user 76.56
sys 1.26

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/222984/ft1_filtered_4FGL_J2358.3+3830_daily_bin744.fits', '/scratch/kocevski/222984/ft2_4FGL_J2358.3+3830_daily_bin744.fits', expMap='/scratch/kocevski/222984/expmap_432172801_432432001_4FGL_J2358.3+3830_daily_bin744.fits', expCube='/scratch/kocevski/222984/ltcube_432172801_432432001_4FGL_J2358.3+3830_daily_bin744.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/222984/Model_4FGL_J2358.3+3830_daily_bin744.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2358.3+3830'

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  8.894e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
489        Index:  2.175e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/222984/ft1_filtered_4FGL_J2358.3+3830_daily_bin744.fits
Spacecraft file(s): /scratch/kocevski/222984/ft2_4FGL_J2358.3+3830_daily_bin744.fits
Exposure map: /scratch/kocevski/222984/expmap_432172801_432432001_4FGL_J2358.3+3830_daily_bin744.fits
Exposure cube: /scratch/kocevski/222984/ltcube_432172801_432432001_4FGL_J2358.3+3830_daily_bin744.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/222984/Model_4FGL_J2358.3+3830_daily_bin744.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) = 7041.46323716

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    28.699       1.0000         .10000E-03   10000.    
     2 'Prefactor '    9.5761       1.0000         .10000E-03   10000.    
     3 'norm      '    6.8228       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10306E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    3.8666       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .15668E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    5.6399       1.0000         .10000E-03   10000.    
     8 'Prefactor '    78.487       1.0000         .10000E-03   10000.    
     9 'Prefactor '    15.397       1.0000         .10000E-03   10000.    
    10 'norm      '    4.7811       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10120E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    27.057       1.0000         .10000E-03   10000.    
    13 'norm      '    .10056E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10039E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    6.8181       1.0000         .10000E-03   10000.    
    16 'norm      '    15.442       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .11033E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    4.5691       1.0000         .10000E-03   10000.    
    19 'Prefactor '    1.4470       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    46.697       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .73324       1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.0358       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.0654       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5050E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7041.457     FROM MIGRAD    STATUS=CONVERGED    581 CALLS     2951 TOTAL
                     EDM=   .98E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     28.704        40.849        .32752E-06   -.98205E-05
   2  Prefactor     9.5596        25.166       -.17980E-05   -.12534E-04
   3  norm          6.8315        19.082        .16278E-06   -.16896E-04
   4  Prefactor     .10000E-03    11.030        .57565E-06** at limit **
   5  Prefactor     3.8687        7.4882        .45299E-06   -.95086E-05
   6  Prefactor     .10000E-03    1.8723        .96457E-06** at limit **
   7  Prefactor     5.6316        18.121       -.59359E-05   -.74928E-04
   8  Prefactor     78.496        35.301       -.36994E-07   -.56661E-04
   9  Prefactor     15.319        47.519        .11395E-05   -.22673E-04
  10  norm          4.7812        2.5670        .34833E-07   -.10414E-04
  11  Prefactor     .10000E-03    3.7233        .50459E-06** at limit **
  12  Prefactor     27.054        28.704        .27264E-06   -.71933E-06
  13  norm          .10000E-03    .74174        .38863E-07** at limit **
  14  Prefactor     .10000E-03    9.9924       -.11674E-06** at limit **
  15  norm          6.8219        6.3557       -.20080E-06    .13842E-03
  16  norm          15.440        12.338        .78741E-07    .49798E-06
  17  Prefactor     .10000E-03    77.951       -.10813E-05** at limit **
  18  norm          4.5686        3.6255        .96255E-07    .11076E-04
  19  Prefactor     1.4439        73.356        .64507E-06    .87092E-05
  20  Prefactor     .10000E-03    11.204       -.66414E-07** at limit **
  21  Prefactor     .10000E-03    38.086       -.11860E-06** at limit **
  22  Prefactor     46.753        56.802       -.22097E-05   -.16296E-04
  23  Prefactor     .72762        14.210        .32771E-05   -.20566E-04
  24  Normalizat    1.0355        .24632       -.26219E-05   -.50188E-04
  25  Prefactor     1.0656        .11258        .18242E-06   -.30333E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 28.7039
  Prefactor  = 9.55964
  norm       = 6.83148
  Prefactor  = 0.0001
  Prefactor  = 3.86874
  Prefactor  = 0.0001
  Prefactor  = 5.63155
  Prefactor  = 78.4962
  Prefactor  = 15.3194
  norm       = 4.78118
  Prefactor  = 0.0001
  Prefactor  = 27.0545
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 6.82185
  norm       = 15.4403
  Prefactor  = 0.000100002
  norm       = 4.5686
  Prefactor  = 1.44394
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 46.7526
  Prefactor  = 0.727619
  Normalizat = 1.03553
  Prefactor  = 1.06558
 **********
 **   18 **HESSE 
 **********

 FCN=   7041.457     FROM HESSE     STATUS=OK           433 CALLS     3384 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     28.704        40.742        .74785E-04   -1.4636    
   2  Prefactor     9.5596        25.050        .12950E-03   -1.5089    
   3  norm          6.8315        19.037        .15361E-03   -1.5185    
   4  Prefactor     .10000E-03    11.299        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     3.8687        7.5082        .20521E-03   -1.5315    
   6  Prefactor     .10000E-03    6.1143        .20849E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     5.6316        18.256        .16915E-03   -1.5233    
   8  Prefactor     78.496        35.417        .45330E-04   -1.3934    
   9  Prefactor     15.319        47.585        .10207E-03   -1.4925    
  10  norm          4.7812        2.5677        .95945E-04   -1.5271    
  11  Prefactor     .10000E-03    3.7436        .15808E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     27.054        28.695        .77017E-04   -1.4667    
  13  norm          .10000E-03    1.2583        .14026E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    10.063        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          6.8219        6.2948        .76829E-03   -1.5186    
  16  norm          15.440        12.346        .10192E-03   -1.4922    
  17  Prefactor     .10000E-03    79.829        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          4.5686        3.6237        .13625E-03   -1.5280    
  19  Prefactor     1.4439        74.657        .35833E-03   -1.5468    
  20  Prefactor     .10000E-03    11.204        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    38.151        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     46.753        57.480        .58675E-04   -1.4339    
  23  Prefactor     .72762        14.756        .24377E-02   -1.5537    
  24  Normalizat    1.0355        .27775        .36819E-03   -.91850    
  25  Prefactor     1.0656        .12877        .17510E-03   -.90574    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.05571e-08
Minuit parameter uncertainties:
  1  40.7814
  2  25.0775
  3  19.0537
  4  1.62403e-05
  5  7.51004
  6  5.18432e-05
  7  18.2737
  8  35.4268
  9  47.7028
  10  2.56775
  11  7.7605e-06
  12  28.7099
  13  1.82351e-05
  14  2.86143e-05
  15  6.2954
  16  12.3478
  17  0.000825246
  18  3.62387
  19  20.7922
  20  6.48376e-06
  21  9.13747e-05
  22  57.5478
  23  6.55474
  24  0.27814
  25  0.128812
Done.

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

Extracting fit parameters...

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  4.675e+01  5.755e+01  1.000e-04  1.000e+04 ( 1.000e-14)
489        Index:  2.175e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
502    Prefactor:  1.066e+00  1.288e-01  0.000e+00  1.000e+01 ( 1.000e+00)
503        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
504        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
497   Normalization:  1.036e+00  2.781e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.31
Ra Dec: 359.588 38.510
Photon Index (Fixed Index): 2.17 +/- 0.00
Photon Flux (Fixed Index): 3.13e-08 +/- 3.85e-08
Energy Flux (Fixed Index): 1.47e-05 +/- 1.81e-05

TS (Fixed Index): 1.31
Ra Dec: 359.588 38.510
Photon Flux Upper Limit: 1.17e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.87e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/222984/likelihoodResults_432172801_432432001_4FGL_J2358.3+3830_daily_bin744.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) = 7039.38545462
delta logL = 2.07139124094

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7039.19969652
delta logL = 2.25714933964

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7039.200     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      213 TOTAL
                     EDM=   .66E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY= 15.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     96.327        95.660        .12740E-04   -.77467E-04
   2  Index         1.1163        .47120        .31170E-04    .27712E-04
   3  Normalizat    1.0537        .22646       -.10859E-06   -.19092E-03
   4  Prefactor     1.0606        .10987       -.34640E-06   -.29820E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 96.3273
  Index      = 1.11627
  Normalizat = 1.05372
  Prefactor  = 1.06062
 **********
 **   18 **HESSE 
 **********

 FCN=   7039.200     FROM HESSE     STATUS=OK            29 CALLS      242 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     96.327        92.970        .20480E-03   -1.3742    
   2  Index         1.1163        .45793        .92087E-02   -.88948    
   3  Normalizat    1.0537        .25779        .36490E-03   -.91252    
   4  Prefactor     1.0606        .12529        .17533E-03   -.90735    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.08921e-10
Minuit parameter uncertainties:
  1  93.111
  2  0.459559
  3  0.258099
  4  0.125324
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/222984': 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) = 7039.19969326
delta logL = 2.25715260694

Extracting fit parameters...

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  9.633e+01  9.311e+01  1.000e-04  1.000e+04 ( 1.000e-14)
489        Index:  1.116e+00  4.596e-01  0.000e+00  1.000e+01 (-1.000e+00)
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
502    Prefactor:  1.061e+00  1.253e-01  0.000e+00  1.000e+01 ( 1.000e+00)
503        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
504        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
497   Normalization:  1.054e+00  2.581e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.82
Ra Dec: 359.588 38.510
Photon Index (Free Index): 1.12 +/- 0.46
Photon Flux (Free Index): 1.40e-08 +/- 1.38e-08
Energy Flux (Free Index): 1.49e-04 +/- 1.55e-04

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/222984/cmap_HighResolution_432172801_432432001_4FGL_J2358.3+3830_daily_bin744.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.87e-03', comment='SUCCESS', photon_flux='3.13e-08', energy_flux2='1.49e-04', photon_flux_error='3.85e-08', dlogl='2.26e+00', energy_flux='1.47e-05', photon_flux2='1.40e-08', job_status='DONE', time_completed='2021-09-30 11:07:58.800023', photon_index_error2='0.46', photon_index2='1.12', ts='1.31', fit_tolerance='1e-08', GAL='1.07', photon_index_error='0.00', photon_flux_upper_limit='1.17e-07', energy_flux_error2='1.55e-04', EG='1.04', time_epoch_completed='1633025278.8', return_code='0', job_id='222984', GAL2='1.06', EG2='1.05', return_code2='0', energy_flux_error='1.81e-05', photon_flux_error2='1.38e-08', ts2='5.82', photon_index='2.17' WHERE bin_id='744' AND source_name='4FGL J2358.3+3830' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep 30 11:07:58 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0034>
Subject: Job 222984: <4FGL_J2358.3+3830_daily_bin744> in cluster <slac> Done

Job <4FGL_J2358.3+3830_daily_bin744> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Sep 30 10:55:19 2021
Job was executed on host(s) <bullet0034>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep 30 10:55:20 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep 30 10:55:20 2021
Terminated at Thu Sep 30 11:07:59 2021
Results reported at Thu Sep 30 11:07:59 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2358.3+3830_daily_bin744 359.588 38.5097 432172801 432432001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2358.3+3830 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   746.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             350.72 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   759 sec.
    Turnaround time :                            760 sec.

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

