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


Performing analysis on: 4FGL_J2358.3+3830_daily_bin1606
RA = 359.588, Dec = 38.5097
tmin = 655603201, tmax = 655862401
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='506841', job_status='RUN', time_executed='2021-12-08 09:54:17.087496', time_epoch_executed='1638986057.09' WHERE source_name='4FGL J2358.3+3830' and cadence='daily' and bin_id='1606'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/506841

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/506841/ft1_4FGL_J2358.3+3830_daily_bin1606.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/506841/ft2_4FGL_J2358.3+3830_daily_bin1606.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/506841/ft1_4FGL_J2358.3+3830_daily_bin1606.fits outfile=/scratch/kocevski/506841/ft1_filteredMKT_4FGL_J2358.3+3830_daily_bin1606.fits ra=359.588 dec=38.5097 rad=12.0 tmin=655603201.0 tmax=655862401.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 4.26
user 4.03
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/506841/ft2_4FGL_J2358.3+3830_daily_bin1606.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/506841/ft1_filteredMKT_4FGL_J2358.3+3830_daily_bin1606.fits evtable="EVENTS" outfile="/scratch/kocevski/506841/ft1_filtered_4FGL_J2358.3+3830_daily_bin1606.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.34
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/506841/ft1_filtered_4FGL_J2358.3+3830_daily_bin1606.fits" evtable="EVENTS" scfile=/scratch/kocevski/506841/ft2_4FGL_J2358.3+3830_daily_bin1606.fits sctable="SC_DATA" outfile=/scratch/kocevski/506841/ltcube_655603201_655862401_4FGL_J2358.3+3830_daily_bin1606.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/506841/ft2_4FGL_J2358.3+3830_daily_bin1606.fits
.....................!
real 14.32
user 13.96
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/506841/ft1_filtered_4FGL_J2358.3+3830_daily_bin1606.fits evtable="EVENTS" scfile=/scratch/kocevski/506841/ft2_4FGL_J2358.3+3830_daily_bin1606.fits sctable="SC_DATA" expcube=/scratch/kocevski/506841/ltcube_655603201_655862401_4FGL_J2358.3+3830_daily_bin1606.fits outfile=/scratch/kocevski/506841/expmap_655603201_655862401_4FGL_J2358.3+3830_daily_bin1606.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/506841/ltcube_655603201_655862401_4FGL_J2358.3+3830_daily_bin1606.fits
.....................!
real 191.82
user 186.70
sys 3.92

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/506841/ft1_filtered_4FGL_J2358.3+3830_daily_bin1606.fits scfile=/scratch/kocevski/506841/ft2_4FGL_J2358.3+3830_daily_bin1606.fits outfile=/scratch/kocevski/506841/cmap_655603201_655862401_4FGL_J2358.3+3830_daily_bin1606.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.55
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/506841/ft1_filtered_4FGL_J2358.3+3830_daily_bin1606.fits scfile=/scratch/kocevski/506841/ft2_4FGL_J2358.3+3830_daily_bin1606.fits outfile=/scratch/kocevski/506841/cmap_HighResolution_655603201_655862401_4FGL_J2358.3+3830_daily_bin1606.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.55
user 0.40
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/506841/ft1_filtered_4FGL_J2358.3+3830_daily_bin1606.fits evtable="EVENTS" scfile=/scratch/kocevski/506841/ft2_4FGL_J2358.3+3830_daily_bin1606.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/506841/Model_4FGL_J2358.3+3830_daily_bin1606.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/506841/ft1_filtered_4FGL_J2358.3+3830_daily_bin1606.fits.....................!
real 64.71
user 63.33
sys 1.23

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/506841/ft1_filtered_4FGL_J2358.3+3830_daily_bin1606.fits', '/scratch/kocevski/506841/ft2_4FGL_J2358.3+3830_daily_bin1606.fits', expMap='/scratch/kocevski/506841/expmap_655603201_655862401_4FGL_J2358.3+3830_daily_bin1606.fits', expCube='/scratch/kocevski/506841/ltcube_655603201_655862401_4FGL_J2358.3+3830_daily_bin1606.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/506841/Model_4FGL_J2358.3+3830_daily_bin1606.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/506841/ft1_filtered_4FGL_J2358.3+3830_daily_bin1606.fits
Spacecraft file(s): /scratch/kocevski/506841/ft2_4FGL_J2358.3+3830_daily_bin1606.fits
Exposure map: /scratch/kocevski/506841/expmap_655603201_655862401_4FGL_J2358.3+3830_daily_bin1606.fits
Exposure cube: /scratch/kocevski/506841/ltcube_655603201_655862401_4FGL_J2358.3+3830_daily_bin1606.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/506841/Model_4FGL_J2358.3+3830_daily_bin1606.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) = 5603.20458979

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10041E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10106E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10056E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .22540E-01   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    26.703       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10051E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    1.0200       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.3432       1.0000         .10000E-03   10000.    
    13 'norm      '    .89251E-01   1.0000         .10000E-03   10000.    
    14 'Prefactor '    26.086       1.0000         .10000E-03   10000.    
    15 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10020E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    33.784       1.0000         .10000E-03   10000.    
    18 'norm      '    .77528       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10288E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    18.371       1.0000         .10000E-03   10000.    
    22 'Prefactor '    91.141       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .13555E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    .45083       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.1552       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=   5603.175     FROM MIGRAD    STATUS=CONVERGED    606 CALLS     2999 TOTAL
                     EDM=   .13E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    41.429        .50264E-05** at limit **
   2  Prefactor     .10000E-03    26.999       -.77296E-06** at limit **
   3  norm          .10000E-03    14.270       -.30398E-05** at limit **
   4  Prefactor     .10000E-03    3.1600        .10087E-06** at limit **
   5  Prefactor     .11873E-03    7.0689       -.15286E-05** at limit **
   6  Prefactor     .10000E-03    1.6486        .29021E-06** at limit **
   7  Prefactor     26.701        22.470       -.41426E-05   -.37390E-04
   8  Prefactor     .10000E-03    9.9669       -.57281E-05** at limit **
   9  Prefactor     .10000E-03    40.404       -.46895E-05** at limit **
  10  norm          1.0207        1.8850       -.16764E-06   -.56894E-03
  11  Prefactor     .10000E-03    5.0186       -.92268E-09** at limit **
  12  Prefactor     1.1803        323.25        .12950E-03   -.28739E-04
  13  norm          .95154E-01    .89000       -.12863E-05   -.51524E-03
  14  Prefactor     26.089        15.543       -.11529E-05   -.24683E-03
  15  norm          .10000E-03    5.5973       -.26410E-06** at limit **
  16  norm          .10000E-03    8.9490        .29752E-05** at limit **
  17  Prefactor     33.778        20.131        .17606E-05    .15576E-03
  18  norm          .77530        2.3336       -.70433E-06   -.11265E-02
  19  Prefactor     .10000E-03    6.4579        .30482E-07** at limit **
  20  Prefactor     .10000E-03    20.059        .23220E-05** at limit **
  21  Prefactor     18.368        28.230       -.32060E-06    .20842E-04
  22  Prefactor     91.125        67.413       -.12798E-04   -.14190E-03
  23  Prefactor     .10000E-03    11.238        .67046E-05** at limit **
  24  Normalizat    .45094        .25783        .35928E-05    .12917E-04
  25  Prefactor     1.1552        .12227       -.99183E-06    .69538E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.000118731
  Prefactor  = 0.0001
  Prefactor  = 26.7009
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.02071
  Prefactor  = 0.0001
  Prefactor  = 1.1803
  norm       = 0.0951544
  Prefactor  = 26.089
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 33.7775
  norm       = 0.775297
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 18.368
  Prefactor  = 91.1255
  Prefactor  = 0.000100004
  Normalizat = 0.450935
  Prefactor  = 1.1552
 **********
 **   18 **HESSE 
 **********

 FCN=   5603.175     FROM HESSE     STATUS=OK           433 CALLS     3432 TOTAL
                     EDM=   .34E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    41.586        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    27.173        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    14.288        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    3.1756        .12993E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .11873E-03    10.172        .53082E-01   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    1.6639        .93710E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     26.701        22.386        .77524E-04   -1.4674    
   8  Prefactor     .10000E-03    9.9709        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    40.516        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          1.0207        1.5134        .13565E-02   -1.5506    
  11  Prefactor     .10000E-03    5.0506        .16373E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     1.1803        309.97        .37801E-03   -1.5491    
  13  norm          .95154E-01    7.9709        .13220E-02   -1.5646    
  14  Prefactor     26.089        15.140        .78434E-04   -1.4686    
  15  norm          .10000E-03    5.6357        .17218E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    9.1080        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     33.778        20.007        .68942E-04   -1.4545    
  18  norm          .77530        2.2485        .18626E-03   -1.5532    
  19  Prefactor     .10000E-03    6.4595        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    20.064        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     18.368        28.192        .93444E-04   -1.4851    
  22  Prefactor     91.125        67.497        .42092E-04   -1.3796    
  23  Prefactor     .10000E-03    11.746        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    .45094        .26508        .45881E-03   -1.1475    
  25  Prefactor     1.1552        .12890        .14981E-03   -.87721    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.40305e-09
Minuit parameter uncertainties:
  1  6.50292e-05
  2  0.000103109
  3  0.000177521
  4  1.84794e-05
  5  0.0276107
  6  1.84346e-05
  7  22.3926
  8  5.36216e-06
  9  4.59654e-05
  10  1.51345
  11  7.9978e-07
  12  38.4563
  13  1.74112
  14  15.1425
  15  5.30392e-05
  16  5.73771e-06
  17  20.0107
  18  2.24877
  19  1.44205e-06
  20  5.2881e-06
  21  28.2121
  22  67.554
  23  0.000450314
  24  0.265822
  25  0.128932
Done.

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

Extracting fit parameters...

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  9.113e+01  6.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.155e+00  1.289e-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:  4.509e-01  2.658e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.64
Ra Dec: 359.588 38.510
Photon Index (Fixed Index): 2.17 +/- 0.00
Photon Flux (Fixed Index): 6.10e-08 +/- 4.52e-08
Energy Flux (Fixed Index): 2.87e-05 +/- 2.13e-05

TS (Fixed Index): 2.64
Ra Dec: 359.588 38.510
Photon Flux Upper Limit: 1.56e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.19e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/506841/likelihoodResults_655603201_655862401_4FGL_J2358.3+3830_daily_bin1606.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) = 5603.17492044
delta logL = 0.000238983998315

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5603.17445879
delta logL = 0.000700633250744

Fit tolerance = 1e-08

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

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

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5603.174     FROM MIGRAD    STATUS=CONVERGED     89 CALLS      259 TOTAL
                     EDM=   .66E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     94.505        129.52        .20681E-03    .10598E-03
   2  Index         2.1509        .72728        .55488E-02    .18033E-03
   3  Normalizat    .45261        .25257        .45801E-03   -.23730E-04
   4  Prefactor     1.1547        .12724        .14984E-03    .21973E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 94.505
  Index      = 2.15085
  Normalizat = 0.452611
  Prefactor  = 1.15466
 **********
 **   18 **HESSE 
 **********

 FCN=   5603.174     FROM HESSE     STATUS=OK            25 CALLS      284 TOTAL
                     EDM=   .45E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     94.505        113.28        .82726E-05   -1.3761    
   2  Index         2.1509        .63585        .22195E-03   -.60630    
   3  Normalizat    .45261        .25136        .18320E-04   -1.1466    
   4  Prefactor     1.1547        .12690        .29967E-04   -.87738    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.49958e-10
Minuit parameter uncertainties:
  1  113.544
  2  0.638411
  3  0.251995
  4  0.126934
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/506841': 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) = 5603.17445077
delta logL = 0.000708652821231

Extracting fit parameters...

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  9.451e+01  1.135e+02  1.000e-04  1.000e+04 ( 1.000e-14)
489        Index:  2.151e+00  6.384e-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.155e+00  1.269e-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:  4.526e-01  2.520e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.63
Ra Dec: 359.588 38.510
Photon Index (Free Index): 2.15 +/- 0.64
Photon Flux (Free Index): 6.00e-08 +/- 5.22e-08
Energy Flux (Free Index): 2.96e-05 +/- 3.27e-05

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/506841/cmap_HighResolution_655603201_655862401_4FGL_J2358.3+3830_daily_bin1606.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.19e-02', comment='SUCCESS', photon_flux='6.10e-08', energy_flux2='2.96e-05', photon_flux_error='4.52e-08', dlogl='7.09e-04', energy_flux='2.87e-05', photon_flux2='6.00e-08', job_status='DONE', time_completed='2021-12-08 10:05:18.722805', photon_index_error2='0.64', photon_index2='2.15', ts='2.64', fit_tolerance='1e-08', GAL='1.16', photon_index_error='0.00', photon_flux_upper_limit='1.56e-07', energy_flux_error2='3.27e-05', EG='0.45', time_epoch_completed='1638986718.72', return_code='0', job_id='506841', GAL2='1.15', EG2='0.45', return_code2='0', energy_flux_error='2.13e-05', photon_flux_error2='5.22e-08', ts2='2.63', photon_index='2.17' WHERE bin_id='1606' AND source_name='4FGL J2358.3+3830' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Dec  8 10:05:18 PST 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0211>
Subject: Job 506841: <4FGL_J2358.3+3830_daily_bin1606> in cluster <slac> Done

Job <4FGL_J2358.3+3830_daily_bin1606> was submitted from host <rhel6-64n> by user <kocevski> in cluster <slac> at Wed Dec  8 09:50:17 2021
Job was executed on host(s) <bullet0211>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Dec  8 09:50:44 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Dec  8 09:50:44 2021
Terminated at Wed Dec  8 10:05:19 2021
Results reported at Wed Dec  8 10:05:19 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2358.3+3830_daily_bin1606 359.588 38.5097 655603201 655862401 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 :                                   660.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             290.94 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   875 sec.
    Turnaround time :                            902 sec.

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

