/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 170 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 = 7684
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J2313.5+3945_daily_bin316
RA = 348.4, Dec = 39.7644
tmin = 321235201, tmax = 321494401
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='708630', job_status='RUN', time_executed='2021-09-29 09:13:44.549040', time_epoch_executed='1632932024.55' WHERE source_name='4FGL J2313.5+3945' and cadence='daily' and bin_id='316'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/708630

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/708630/ft1_4FGL_J2313.5+3945_daily_bin316.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/708630/ft2_4FGL_J2313.5+3945_daily_bin316.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/708630/ft1_4FGL_J2313.5+3945_daily_bin316.fits outfile=/scratch/kocevski/708630/ft1_filteredMKT_4FGL_J2313.5+3945_daily_bin316.fits ra=348.4 dec=39.7644 rad=12.0 tmin=321235201.0 tmax=321494401.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.61
user 3.39
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/708630/ft2_4FGL_J2313.5+3945_daily_bin316.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/708630/ft2_4FGL_J2313.5+3945_daily_bin316.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/708630/ft1_filteredMKT_4FGL_J2313.5+3945_daily_bin316.fits evtable="EVENTS" outfile="/scratch/kocevski/708630/ft1_filtered_4FGL_J2313.5+3945_daily_bin316.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.49
user 0.31
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/708630/ft1_filtered_4FGL_J2313.5+3945_daily_bin316.fits" evtable="EVENTS" scfile=/scratch/kocevski/708630/ft2_4FGL_J2313.5+3945_daily_bin316.fits sctable="SC_DATA" outfile=/scratch/kocevski/708630/ltcube_321235201_321494401_4FGL_J2313.5+3945_daily_bin316.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/708630/ft2_4FGL_J2313.5+3945_daily_bin316.fits
.....................!
real 11.69
user 11.34
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/708630/ft1_filtered_4FGL_J2313.5+3945_daily_bin316.fits evtable="EVENTS" scfile=/scratch/kocevski/708630/ft2_4FGL_J2313.5+3945_daily_bin316.fits sctable="SC_DATA" expcube=/scratch/kocevski/708630/ltcube_321235201_321494401_4FGL_J2313.5+3945_daily_bin316.fits outfile=/scratch/kocevski/708630/expmap_321235201_321494401_4FGL_J2313.5+3945_daily_bin316.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/708630/ltcube_321235201_321494401_4FGL_J2313.5+3945_daily_bin316.fits
.....................!
real 192.56
user 187.00
sys 5.15

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.
Extended source CTB 109 in ROI with RadialDisk spatial model.
Added 161 point sources and 2 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 J2313.5+3945 @ 348.4 39.7644

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/708630/ft1_filtered_4FGL_J2313.5+3945_daily_bin316.fits scfile=/scratch/kocevski/708630/ft2_4FGL_J2313.5+3945_daily_bin316.fits outfile=/scratch/kocevski/708630/cmap_321235201_321494401_4FGL_J2313.5+3945_daily_bin316.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=348.4 yref=39.7644 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.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/708630/ft1_filtered_4FGL_J2313.5+3945_daily_bin316.fits scfile=/scratch/kocevski/708630/ft2_4FGL_J2313.5+3945_daily_bin316.fits outfile=/scratch/kocevski/708630/cmap_HighResolution_321235201_321494401_4FGL_J2313.5+3945_daily_bin316.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=348.4 yref=39.7644 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.37
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/708630/ft1_filtered_4FGL_J2313.5+3945_daily_bin316.fits evtable="EVENTS" scfile=/scratch/kocevski/708630/ft2_4FGL_J2313.5+3945_daily_bin316.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/708630/Model_4FGL_J2313.5+3945_daily_bin316.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 CTB 109
adding source EG_v02
adding source FHES J2304.0+5406
adding source GAL_V02
Working on...
/scratch/kocevski/708630/ft1_filtered_4FGL_J2313.5+3945_daily_bin316.fits.....................!
real 97.45
user 96.05
sys 1.17

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/708630/ft1_filtered_4FGL_J2313.5+3945_daily_bin316.fits', '/scratch/kocevski/708630/ft2_4FGL_J2313.5+3945_daily_bin316.fits', expMap='/scratch/kocevski/708630/expmap_321235201_321494401_4FGL_J2313.5+3945_daily_bin316.fits', expCube='/scratch/kocevski/708630/ltcube_321235201_321494401_4FGL_J2313.5+3945_daily_bin316.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/708630/Model_4FGL_J2313.5+3945_daily_bin316.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2313.5+3945'

4FGL J2313.5+3945
   Spectrum: PowerLaw
406    Prefactor:  4.195e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
407        Index:  2.758e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
408        Scale:  4.854e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/708630/ft1_filtered_4FGL_J2313.5+3945_daily_bin316.fits
Spacecraft file(s): /scratch/kocevski/708630/ft2_4FGL_J2313.5+3945_daily_bin316.fits
Exposure map: /scratch/kocevski/708630/expmap_321235201_321494401_4FGL_J2313.5+3945_daily_bin316.fits
Exposure cube: /scratch/kocevski/708630/ltcube_321235201_321494401_4FGL_J2313.5+3945_daily_bin316.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/708630/Model_4FGL_J2313.5+3945_daily_bin316.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) = 8206.29687074

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    5.1226       1.0000         .10000E-03   10000.    
     3 'norm      '    19.665       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    7.1221       1.0000         .10000E-03   10000.    
    10 'Prefactor '    27.053       1.0000         .10000E-03   10000.    
    11 'norm      '    7.7683       1.0000         .10000E-03   10000.    
    12 'Prefactor '    18.073       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10014E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10532E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10067E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    34.826       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .13910E-03   1.0000         .10000E-03   10000.    
    23 'Normalizat'    .60418       1.0000         .10000E-01   10.000    
    24 'Prefactor '    1.0962       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5410E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   8206.293     FROM MIGRAD    STATUS=CONVERGED    530 CALLS     2641 TOTAL
                     EDM=   .43E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    68.743        .15373E-05** at limit **
   2  Prefactor     5.1133        20.217       -.11612E-05   -.34778E-04
   3  norm          19.670        16.612       -.46887E-05    .56364E-04
   4  Prefactor     .10000E-03    2.7737       -.33708E-07** at limit **
   5  Prefactor     .10000E-03    22.783       -.23307E-05** at limit **
   6  Prefactor     .10000E-03    2.7440        .21356E-07** at limit **
   7  norm          .10000E-03    1.8246        .69127E-08** at limit **
   8  Prefactor     .10000E-03    7.0920       -.19523E-05** at limit **
   9  Prefactor     7.1222        5.9671        .57441E-07    .10733E-04
  10  Prefactor     27.054        22.568        .31795E-06    .50372E-05
  11  norm          7.7680        2.0850        .39574E-07   -.54993E-04
  12  Prefactor     18.072        13.508        .28629E-06   -.14659E-04
  13  Prefactor     .10000E-03    8.0747        .19504E-05** at limit **
  14  norm          .10000E-03    1.1545       -.28847E-08** at limit **
  15  norm          .10000E-03    5.8399        .43152E-07** at limit **
  16  Prefactor     .10000E-03    19.218        .53990E-06** at limit **
  17  norm          .10000E-03    1.2109        .18457E-08** at limit **
  18  Prefactor     .10000E-03    7.2586        .20722E-05** at limit **
  19  Prefactor     .10000E-03    24.432        .14490E-05** at limit **
  20  Prefactor     .10000E-03    12.175        .40683E-06** at limit **
  21  Prefactor     34.854        46.354        .32166E-04    .82936E-04
  22  Prefactor     .10001E-03    7.8538       -.39195E-05** at limit **
  23  Normalizat    .60409        .23921       -.27642E-05   -.34593E-04
  24  Prefactor     1.0963        .89787E-01    .16805E-06    .75586E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 5.11326
  norm       = 19.6696
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 7.12224
  Prefactor  = 27.0541
  norm       = 7.76797
  Prefactor  = 18.0719
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 34.8535
  Prefactor  = 0.000100006
  Normalizat = 0.60409
  Prefactor  = 1.09626
 **********
 **   18 **HESSE 
 **********

 FCN=   8206.293     FROM HESSE     STATUS=OK           387 CALLS     3028 TOTAL
                     EDM=   .86E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    69.137        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     5.1133        20.188        .17764E-03   -1.5256    
   3  norm          19.670        16.560        .90319E-04   -1.4821    
   4  Prefactor     .10000E-03    2.7855        .14730E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    22.782        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    2.7697        .14649E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    1.8607        .11942E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    7.0934        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     7.1222        5.9627        .15031E-03   -1.5174    
  10  Prefactor     27.054        22.566        .77022E-04   -1.4667    
  11  norm          7.7680        2.0829        .64538E-04   -1.5150    
  12  Prefactor     18.072        13.472        .94211E-04   -1.4857    
  13  Prefactor     .10000E-03    8.0797        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    1.1560        .95052E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    5.8526        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    19.635        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    1.2337        .97275E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    7.2634        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    24.444        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    12.181        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     34.854        46.433        .67907E-04   -1.4527    
  22  Prefactor     .10001E-03    8.3606        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Normalizat    .60409        .25376        .49045E-03   -1.0781    
  24  Prefactor     1.0963        .96381E-01    .14532E-03   -.89586    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.64723e-10
Minuit parameter uncertainties:
  1  0.000109768
  2  20.2146
  3  16.5642
  4  5.18632e-06
  5  4.9776e-06
  6  3.61801e-06
  7  2.08361e-06
  8  3.29524e-06
  9  5.96317
  10  22.573
  11  2.08289
  12  13.4745
  13  2.78309e-06
  14  5.96672e-07
  15  1.84712e-06
  16  3.55355e-05
  17  7.7078e-08
  18  2.80833e-06
  19  9.95386e-06
  20  9.23331e-07
  21  46.4807
  22  0.000465655
  23  0.254249
  24  0.0963964
Done.

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

Extracting fit parameters...

4FGL J2313.5+3945
   Spectrum: PowerLaw
406    Prefactor:  1.807e+01  1.347e+01  1.000e-04  1.000e+04 ( 1.000e-12)
407        Index:  2.758e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
408        Scale:  4.854e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
538    Prefactor:  1.096e+00  9.640e-02  0.000e+00  1.000e+01 ( 1.000e+00)
539        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
540        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
533   Normalization:  6.041e-01  2.542e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.58
Ra Dec: 348.400 39.764
Photon Index (Fixed Index): 2.76 +/- 0.00
Photon Flux (Fixed Index): 8.03e-08 +/- 5.98e-08
Energy Flux (Fixed Index): 1.85e-05 +/- 1.38e-05

TS (Fixed Index): 2.58
Ra Dec: 348.400 39.764
Photon Flux Upper Limit: 1.99e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.57e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/708630/likelihoodResults_321235201_321494401_4FGL_J2313.5+3945_daily_bin316.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) = 8206.27142403
delta logL = 0.0219657987072

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 8206.26275783
delta logL = 0.0306320004202

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   8206.263     FROM MIGRAD    STATUS=CONVERGED     98 CALLS      258 TOTAL
                     EDM=   .56E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     16.260        16.167        .49649E-03   -.29035E-04
   2  Index         2.9665        .94208        .92780E-02    .35633E-03
   3  Normalizat    .59178        .25293        .49512E-03   -.47530E-04
   4  Prefactor     1.0992        .97066E-01    .14514E-03   -.19770E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 16.2601
  Index      = 2.96647
  Normalizat = 0.591779
  Prefactor  = 1.09918
 **********
 **   18 **HESSE 
 **********

 FCN=   8206.263     FROM HESSE     STATUS=OK            25 CALLS      283 TOTAL
                     EDM=   .11E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     16.260        15.083        .19860E-04   -1.4901    
   2  Index         2.9665        .87879        .18556E-02   -.41885    
   3  Normalizat    .59178        .25276        .19805E-04   -1.0833    
   4  Prefactor     1.0992        .96986E-01    .58056E-05   -.89493    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.08077e-11
Minuit parameter uncertainties:
  1  15.087
  2  0.884305
  3  0.253252
  4  0.0970011
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/708630': 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) = 8206.26275704
delta logL = 0.0306327896942

Extracting fit parameters...

4FGL J2313.5+3945
   Spectrum: PowerLaw
406    Prefactor:  1.626e+01  1.509e+01  1.000e-04  1.000e+04 ( 1.000e-12)
407        Index:  2.966e+00  8.843e-01  0.000e+00  1.000e+01 (-1.000e+00)
408        Scale:  4.854e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
538    Prefactor:  1.099e+00  9.700e-02  0.000e+00  1.000e+01 ( 1.000e+00)
539        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
540        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
533   Normalization:  5.918e-01  2.533e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.67
Ra Dec: 348.400 39.764
Photon Index (Free Index): 2.97 +/- 0.88
Photon Flux (Free Index): 8.98e-08 +/- 7.18e-08
Energy Flux (Free Index): 1.82e-05 +/- 1.32e-05

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/708630/cmap_HighResolution_321235201_321494401_4FGL_J2313.5+3945_daily_bin316.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.57e-02', comment='SUCCESS', photon_flux='8.03e-08', energy_flux2='1.82e-05', photon_flux_error='5.98e-08', dlogl='3.06e-02', energy_flux='1.85e-05', photon_flux2='8.98e-08', job_status='DONE', time_completed='2021-09-29 09:27:02.313025', photon_index_error2='0.88', photon_index2='2.97', ts='2.58', fit_tolerance='1e-08', GAL='1.10', photon_index_error='0.00', photon_flux_upper_limit='1.99e-07', energy_flux_error2='1.32e-05', EG='0.60', time_epoch_completed='1632932822.31', return_code='0', job_id='708630', GAL2='1.10', EG2='0.59', return_code2='0', energy_flux_error='1.38e-05', photon_flux_error2='7.18e-08', ts2='2.67', photon_index='2.76' WHERE bin_id='316' AND source_name='4FGL J2313.5+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 29 09:27:02 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0253>
Subject: Job 708630: <4FGL_J2313.5+3945_daily_bin316> in cluster <slac> Done

Job <4FGL_J2313.5+3945_daily_bin316> was submitted from host <rhel6-64n> by user <kocevski> in cluster <slac> at Wed Sep 29 09:10:43 2021
Job was executed on host(s) <bullet0253>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep 29 09:10:44 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep 29 09:10:44 2021
Terminated at Wed Sep 29 09:27:03 2021
Results reported at Wed Sep 29 09:27:03 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2313.5+3945_daily_bin316 348.4 39.7644 321235201 321494401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2313.5+3945 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   797.12 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             294.91 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   978 sec.
    Turnaround time :                            980 sec.

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

