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


Performing analysis on: 4FGL_J2313.5+3945_daily_bin315
RA = 348.4, Dec = 39.7644
tmin = 320976001, tmax = 321235201
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='708628', job_status='RUN', time_executed='2021-09-29 09:12:15.041114', time_epoch_executed='1632931935.04' WHERE source_name='4FGL J2313.5+3945' and cadence='daily' and bin_id='315'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/708628

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/708628/ft1_4FGL_J2313.5+3945_daily_bin315.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/708628/ft2_4FGL_J2313.5+3945_daily_bin315.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/708628/ft1_4FGL_J2313.5+3945_daily_bin315.fits outfile=/scratch/kocevski/708628/ft1_filteredMKT_4FGL_J2313.5+3945_daily_bin315.fits ra=348.4 dec=39.7644 rad=12.0 tmin=320976001.0 tmax=321235201.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.50
user 3.29
sys 0.19

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/708628/ft2_4FGL_J2313.5+3945_daily_bin315.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/708628/ft1_filteredMKT_4FGL_J2313.5+3945_daily_bin315.fits evtable="EVENTS" outfile="/scratch/kocevski/708628/ft1_filtered_4FGL_J2313.5+3945_daily_bin315.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.33
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/708628/ft1_filtered_4FGL_J2313.5+3945_daily_bin315.fits" evtable="EVENTS" scfile=/scratch/kocevski/708628/ft2_4FGL_J2313.5+3945_daily_bin315.fits sctable="SC_DATA" outfile=/scratch/kocevski/708628/ltcube_320976001_321235201_4FGL_J2313.5+3945_daily_bin315.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/708628/ft2_4FGL_J2313.5+3945_daily_bin315.fits
.....................!
real 11.99
user 11.66
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/708628/ft1_filtered_4FGL_J2313.5+3945_daily_bin315.fits evtable="EVENTS" scfile=/scratch/kocevski/708628/ft2_4FGL_J2313.5+3945_daily_bin315.fits sctable="SC_DATA" expcube=/scratch/kocevski/708628/ltcube_320976001_321235201_4FGL_J2313.5+3945_daily_bin315.fits outfile=/scratch/kocevski/708628/expmap_320976001_321235201_4FGL_J2313.5+3945_daily_bin315.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/708628/ltcube_320976001_321235201_4FGL_J2313.5+3945_daily_bin315.fits
.....................!
real 190.22
user 185.10
sys 4.82

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/708628/ft1_filtered_4FGL_J2313.5+3945_daily_bin315.fits scfile=/scratch/kocevski/708628/ft2_4FGL_J2313.5+3945_daily_bin315.fits outfile=/scratch/kocevski/708628/cmap_320976001_321235201_4FGL_J2313.5+3945_daily_bin315.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.52
user 0.36
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/708628/ft1_filtered_4FGL_J2313.5+3945_daily_bin315.fits scfile=/scratch/kocevski/708628/ft2_4FGL_J2313.5+3945_daily_bin315.fits outfile=/scratch/kocevski/708628/cmap_HighResolution_320976001_321235201_4FGL_J2313.5+3945_daily_bin315.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.54
user 0.37
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/708628/ft1_filtered_4FGL_J2313.5+3945_daily_bin315.fits evtable="EVENTS" scfile=/scratch/kocevski/708628/ft2_4FGL_J2313.5+3945_daily_bin315.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/708628/Model_4FGL_J2313.5+3945_daily_bin315.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/708628/ft1_filtered_4FGL_J2313.5+3945_daily_bin315.fits.....................!
real 110.09
user 108.75
sys 1.16

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/708628/ft1_filtered_4FGL_J2313.5+3945_daily_bin315.fits', '/scratch/kocevski/708628/ft2_4FGL_J2313.5+3945_daily_bin315.fits', expMap='/scratch/kocevski/708628/expmap_320976001_321235201_4FGL_J2313.5+3945_daily_bin315.fits', expCube='/scratch/kocevski/708628/ltcube_320976001_321235201_4FGL_J2313.5+3945_daily_bin315.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/708628/Model_4FGL_J2313.5+3945_daily_bin315.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/708628/ft1_filtered_4FGL_J2313.5+3945_daily_bin315.fits
Spacecraft file(s): /scratch/kocevski/708628/ft2_4FGL_J2313.5+3945_daily_bin315.fits
Exposure map: /scratch/kocevski/708628/expmap_320976001_321235201_4FGL_J2313.5+3945_daily_bin315.fits
Exposure cube: /scratch/kocevski/708628/ltcube_320976001_321235201_4FGL_J2313.5+3945_daily_bin315.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/708628/Model_4FGL_J2313.5+3945_daily_bin315.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) = 9304.84766915

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    25.856       1.0000         .10000E-03   10000.    
     2 'Prefactor '    1.5022       1.0000         .10000E-03   10000.    
     3 'norm      '    10.631       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    1.7459       1.0000         .10000E-03   10000.    
     7 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    5.5911       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    8.2791       1.0000         .10000E-03   10000.    
    12 'Prefactor '    13.772       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    1.6409       1.0000         .10000E-03   10000.    
    15 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .35548E-02   1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    20.860       1.0000         .10000E-03   10000.    
    20 'Prefactor '    22.857       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    15.159       1.0000         .10000E-03   10000.    
    23 'Normalizat'    .85776       1.0000         .10000E-01   10.000    
    24 'Prefactor '    1.0616       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.

 FCN=   9304.813     FROM MIGRAD    STATUS=CONVERGED    545 CALLS     2760 TOTAL
                     EDM=   .13E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     25.856        30.456         .0000       -.31692E-03
   2  Prefactor     1.4913        53.631         .0000        .26600E-02
   3  norm          10.632        17.161         .0000        .52009E-04
   4  Prefactor     .10000E-03    2.6576         .0000    ** at limit **
   5  Prefactor     .10009E-03    32.040         .0000    ** at limit **
   6  Prefactor     1.7465        4.7114         .0000        .29340E-01
   7  norm          .10000E-03    .93642         .0000    ** at limit **
   8  Prefactor     .10000E-03    15.774         .0000    ** at limit **
   9  Prefactor     5.5912        5.4217         .0000        .43786E-02
  10  Prefactor     .10003E-03    20.805         .0000    ** at limit **
  11  norm          8.2788        2.0977         .0000       -.40170E-03
  12  Prefactor     13.775        14.437         .0000        .19561E-03
  13  Prefactor     .10001E-03    21.004         .0000    ** at limit **
  14  norm          1.6367        4.6074         .0000        .32097E-01
  15  norm          .10000E-03    5.7240         .0000    ** at limit **
  16  Prefactor     .10001E-03    8.0832         .0000    ** at limit **
  17  norm          .10000E-03    1.3745         .0000    ** at limit **
  18  Prefactor     .10000E-03    5.9374         .0000    ** at limit **
  19  Prefactor     20.860        54.791         .0000        .15059E-03
  20  Prefactor     22.856        43.530         .0000        .69167E-03
  21  Prefactor     .10018E-03    23.377         .0000    ** at limit **
  22  Prefactor     15.160        10.664         .0000        .66927E-04
  23  Normalizat    .85761        .24651         .0000        .22213E-05
  24  Prefactor     1.0616        .85069E-01     .0000       -.14859E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 25.8558
  Prefactor  = 1.49132
  norm       = 10.6315
  Prefactor  = 0.0001
  Prefactor  = 0.000100088
  Prefactor  = 1.74647
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 5.5912
  Prefactor  = 0.000100033
  norm       = 8.27881
  Prefactor  = 13.7747
  Prefactor  = 0.000100009
  norm       = 1.63667
  norm       = 0.0001
  Prefactor  = 0.000100007
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 20.8597
  Prefactor  = 22.856
  Prefactor  = 0.000100179
  Prefactor  = 15.1603
  Normalizat = 0.857608
  Prefactor  = 1.06158
 **********
 **   18 **HESSE 
 **********

 FCN=   9304.813     FROM HESSE     STATUS=OK           395 CALLS     3155 TOTAL
                     EDM=   .18E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     25.856        30.395        .78781E-04   -1.4691    
   2  Prefactor     1.4913        54.007        .17465E-02   -1.5464    
   3  norm          10.632        17.126        .12288E-03   -1.5056    
   4  Prefactor     .10000E-03    2.6680        .15351E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10009E-03    32.064        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     1.7465        4.6824        .15870E-02   -1.5444    
   7  norm          .10000E-03    .93717        .91008E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    15.929        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     5.5912        5.4142        .84950E-03   -1.5235    
  10  Prefactor     .10003E-03    20.850        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          8.2788        2.0964        .66545E-04   -1.5132    
  12  Prefactor     13.775        14.433        .10793E-03   -1.4966    
  13  Prefactor     .10001E-03    21.149        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          1.6367        4.3842        .15886E-02   -1.5452    
  15  norm          .10000E-03    5.7430        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10001E-03    77.949        .48938E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    1.3971        .11035E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    5.9389        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     20.860        54.714        .87696E-04   -1.4794    
  20  Prefactor     22.856        43.796        .83782E-04   -1.4751    
  21  Prefactor     .10018E-03    23.381        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     15.160        10.653        .10287E-03   -1.4929    
  23  Normalizat    .85761        .26758        .44383E-03   -.97966    
  24  Prefactor     1.0616        .94600E-01    .15334E-03   -.90704    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.76431e-08
Minuit parameter uncertainties:
  1  30.4133
  2  17.9659
  3  17.1341
  4  4.88847e-06
  5  0.00336808
  6  4.68334
  7  8.24229e-06
  8  0.00015173
  9  5.41467
  10  0.00165415
  11  2.09639
  12  14.4366
  13  0.000880118
  14  4.38507
  15  3.00476e-05
  16  0.00146368
  17  1.07377e-05
  18  5.28394e-06
  19  54.8458
  20  43.858
  21  0.00409093
  22  10.6543
  23  0.26799
  24  0.0946148
Done.

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

Extracting fit parameters...

4FGL J2313.5+3945
   Spectrum: PowerLaw
406    Prefactor:  1.377e+01  1.444e+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.062e+00  9.461e-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:  8.576e-01  2.680e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.12
Ra Dec: 348.400 39.764
Photon Index (Fixed Index): 2.76 +/- 0.00
Photon Flux (Fixed Index): 6.12e-08 +/- 6.41e-08
Energy Flux (Fixed Index): 1.41e-05 +/- 1.48e-05

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

Saving results to:
/scratch/kocevski/708628/likelihoodResults_320976001_321235201_4FGL_J2313.5+3945_daily_bin315.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) = 9303.82403912
delta logL = 0.988851454238

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9303.78567803
delta logL = 1.02721253701

Fit tolerance = 1e-08

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

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

 FCN=   9303.786     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      257 TOTAL
                     EDM=   .26E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.6771        26.581        .62295E-02    .28677E-02
   2  Index         4.6147        3.3552        .19408        .40602E-03
   3  Normalizat    .78965        .68926E-01    .10389        .59482E-04
   4  Prefactor     1.0790        .26101E-01    .38444E-01   -.42612E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.67705
  Index      = 4.61468
  Normalizat = 0.789645
  Prefactor  = 1.07899
 **********
 **   18 **HESSE 
 **********

 FCN=   9303.786     FROM HESSE     STATUS=NOT POSDEF    31 CALLS      288 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.6771        54.752        .96553E-04   -1.5381    
   2  Index         4.6147        7.2689        .69049E-02   -.77140E-01
   3  Normalizat    .78965        .23429        .46047E-03   -1.0045    
   4  Prefactor     1.0790        .88627E-01    .15217E-03   -.90141    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.07774e-09
Minuit parameter uncertainties:
  1  24.2385
  2  6.57084
  3  0.234587
  4  0.0886391
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/708628': 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) = 9303.78567739
delta logL = 1.02721317459

Extracting fit parameters...

4FGL J2313.5+3945
   Spectrum: PowerLaw
406    Prefactor:  2.677e+00  2.424e+01  1.000e-04  1.000e+04 ( 1.000e-12)
407        Index:  4.615e+00  6.571e+00  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.079e+00  8.864e-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:  7.896e-01  2.346e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.37
Ra Dec: 348.400 39.764
Photon Index (Free Index): 4.61 +/- 6.57
Photon Flux (Free Index): 1.09e-07 +/- 8.68e-08
Energy Flux (Free Index): 1.51e-05 +/- 2.00e-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/708628/cmap_HighResolution_320976001_321235201_4FGL_J2313.5+3945_daily_bin315.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.46e-02', comment='SUCCESS', photon_flux='6.12e-08', energy_flux2='1.51e-05', photon_flux_error='6.41e-08', dlogl='1.03e+00', energy_flux='1.41e-05', photon_flux2='1.09e-07', job_status='DONE', time_completed='2021-09-29 09:27:17.279629', photon_index_error2='6.57', photon_index2='4.61', ts='1.12', fit_tolerance='1e-08', GAL='1.06', photon_index_error='0.00', photon_flux_upper_limit='1.85e-07', energy_flux_error2='2.00e-05', EG='0.86', time_epoch_completed='1632932837.28', return_code='0', job_id='708628', GAL2='1.08', EG2='0.79', return_code2='102', energy_flux_error='1.48e-05', photon_flux_error2='8.68e-08', ts2='3.37', photon_index='2.76' WHERE bin_id='315' AND source_name='4FGL J2313.5+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 29 09:27:17 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0276>
Subject: Job 708628: <4FGL_J2313.5+3945_daily_bin315> in cluster <slac> Done

Job <4FGL_J2313.5+3945_daily_bin315> 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) <bullet0276>, 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:18 2021
Results reported at Wed Sep 29 09:27:18 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2313.5+3945_daily_bin315 348.4 39.7644 320976001 321235201 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 :                                   898.23 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             299.06 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   993 sec.
    Turnaround time :                            995 sec.

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

