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


Performing analysis on: 4FGL_J2313.5+3945_daily_bin403
RA = 348.4, Dec = 39.7644
tmin = 343785601, tmax = 344044801
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='709812', job_status='RUN', time_executed='2021-09-29 09:15:39.813702', time_epoch_executed='1632932139.81' WHERE source_name='4FGL J2313.5+3945' and cadence='daily' and bin_id='403'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/709812

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/709812/ft1_4FGL_J2313.5+3945_daily_bin403.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/709812/ft2_4FGL_J2313.5+3945_daily_bin403.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/709812/ft1_4FGL_J2313.5+3945_daily_bin403.fits outfile=/scratch/kocevski/709812/ft1_filteredMKT_4FGL_J2313.5+3945_daily_bin403.fits ra=348.4 dec=39.7644 rad=12.0 tmin=343785601.0 tmax=344044801.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.42
user 3.18
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/709812/ft2_4FGL_J2313.5+3945_daily_bin403.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/709812/ft1_filteredMKT_4FGL_J2313.5+3945_daily_bin403.fits evtable="EVENTS" outfile="/scratch/kocevski/709812/ft1_filtered_4FGL_J2313.5+3945_daily_bin403.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/709812/ft1_filtered_4FGL_J2313.5+3945_daily_bin403.fits" evtable="EVENTS" scfile=/scratch/kocevski/709812/ft2_4FGL_J2313.5+3945_daily_bin403.fits sctable="SC_DATA" outfile=/scratch/kocevski/709812/ltcube_343785601_344044801_4FGL_J2313.5+3945_daily_bin403.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/709812/ft2_4FGL_J2313.5+3945_daily_bin403.fits
.....................!
real 12.10
user 11.66
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/709812/ft1_filtered_4FGL_J2313.5+3945_daily_bin403.fits evtable="EVENTS" scfile=/scratch/kocevski/709812/ft2_4FGL_J2313.5+3945_daily_bin403.fits sctable="SC_DATA" expcube=/scratch/kocevski/709812/ltcube_343785601_344044801_4FGL_J2313.5+3945_daily_bin403.fits outfile=/scratch/kocevski/709812/expmap_343785601_344044801_4FGL_J2313.5+3945_daily_bin403.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/709812/ltcube_343785601_344044801_4FGL_J2313.5+3945_daily_bin403.fits
.....................!
real 190.95
user 185.12
sys 5.23

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/709812/ft1_filtered_4FGL_J2313.5+3945_daily_bin403.fits scfile=/scratch/kocevski/709812/ft2_4FGL_J2313.5+3945_daily_bin403.fits outfile=/scratch/kocevski/709812/cmap_343785601_344044801_4FGL_J2313.5+3945_daily_bin403.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.54
user 0.36
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/709812/ft1_filtered_4FGL_J2313.5+3945_daily_bin403.fits scfile=/scratch/kocevski/709812/ft2_4FGL_J2313.5+3945_daily_bin403.fits outfile=/scratch/kocevski/709812/cmap_HighResolution_343785601_344044801_4FGL_J2313.5+3945_daily_bin403.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.39
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .16514E-02   1.0000         .10000E-03   10000.    
     4 'Prefactor '    1.9230       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    11.221       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    9.8714       1.0000         .10000E-03   10000.    
    11 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    4.7043       1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .33374E-02   1.0000         .10000E-03   10000.    
    17 'norm      '    1.7375       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 '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10030E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .41317E-03   1.0000         .10000E-03   10000.    
    23 'Normalizat'    1.5534       1.0000         .10000E-01   10.000    
    24 'Prefactor '    .77674       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.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   9722.441     FROM MIGRAD    STATUS=CONVERGED    987 CALLS     2803 TOTAL
                     EDM=   .42E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    9.7482        .18142E-02** at limit **
   2  Prefactor     .10000E-03    11.082        .18142E-02** at limit **
   3  norm          .10000E-03    143.11        .66662E-02** at limit **
   4  Prefactor     1.9301        6.4703        .29962E-03   -.52514E-04
   5  Prefactor     .10000E-03    16.561        .18142E-02** at limit **
   6  Prefactor     .10000E-03    1.5550        .11987E-02** at limit **
   7  norm          .10000E-03    .82963        .87525E-03** at limit **
   8  Prefactor     11.220        13.611        .11960E-03    .35361E-04
   9  Prefactor     .10000E-03    2.5458        .15298E-02** at limit **
  10  Prefactor     9.8704        18.252        .12754E-03    .28703E-04
  11  norm          .10000E-03    .34288        .55967E-03** at limit **
  12  Prefactor     .10000E-03    5.6408        .18142E-02** at limit **
  13  Prefactor     .10000E-03    16.171        .18142E-02** at limit **
  14  norm          4.7059        4.6468        .18553E-03   -.16594E-03
  15  norm          .10000E-03    7.5441        .18142E-02** at limit **
  16  Prefactor     .10005E-03    13.096        .82372E-01** at limit **
  17  norm          1.7374        2.1492        .15712E-03    .13705E-03
  18  Prefactor     .10000E-03    7.0152        .18142E-02** at limit **
  19  Prefactor     .10000E-03    11.258        .18142E-02** at limit **
  20  Prefactor     .10000E-03    13.132        .18142E-02** at limit **
  21  Prefactor     .10000E-03    196.91        .18142E-02** at limit **
  22  Prefactor     .10000E-03    44.440        .42726E-02** at limit **
  23  Normalizat    1.5534        .22943        .32153E-03   -.22841E-04
  24  Prefactor     .77674        .83032E-01    .15960E-03   -.26355E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 1.93012
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 11.2203
  Prefactor  = 0.0001
  Prefactor  = 9.87044
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 4.70594
  norm       = 0.0001
  Prefactor  = 0.000100047
  norm       = 1.7374
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  Normalizat = 1.55339
  Prefactor  = 0.776744
 **********
 **   18 **HESSE 
 **********

 FCN=   9722.441     FROM HESSE     STATUS=OK           383 CALLS     3186 TOTAL
                     EDM=   .42E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    9.7484        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    11.085        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    148.22        .26665E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     1.9301        6.4390        .11985E-04   -1.5430    
   5  Prefactor     .10000E-03    16.561        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    1.5551        .23975E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    .82966        .17505E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     11.220        13.611        .47839E-05   -1.5038    
   9  Prefactor     .10000E-03    2.5464        .30595E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     9.8704        18.250        .51016E-05   -1.5080    
  11  norm          .10000E-03    .34290        .11193E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    5.6449        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    16.174        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          4.7059        4.6346        .74212E-05   -1.5274    
  15  norm          .10000E-03    7.5468        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10005E-03    12.005        .87005E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          1.7374        2.1492        .62847E-05   -1.5444    
  18  Prefactor     .10000E-03    7.0156        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    11.258        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    13.132        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    197.00        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    45.548        .17090E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Normalizat    1.5534        .22930        .12861E-04   -.76289    
  24  Prefactor     .77674        .83070E-01    .63842E-05   -1.0059    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.24037e-11
Minuit parameter uncertainties:
  1  2.46334e-06
  2  1.40944e-05
  3  6.43398e-05
  4  6.44135
  5  3.91999e-06
  6  4.46186e-07
  7  5.12561e-08
  8  13.6152
  9  7.38035e-09
  10  18.2604
  11  1.96929e-08
  12  5.21794e-06
  13  6.20556e-06
  14  4.63496
  15  1.72061e-05
  16  0.00150449
  17  2.14926
  18  1.19662e-06
  19  4.99275e-06
  20  2.9486e-06
  21  0.0012252
  22  7.66529e-05
  23  0.22945
  24  0.083083
Done.

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

Extracting fit parameters...

4FGL J2313.5+3945
   Spectrum: PowerLaw
406    Prefactor:  1.000e-04  5.218e-06  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:  7.767e-01  8.308e-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:  1.553e+00  2.295e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 348.400 39.764
Photon Flux Upper Limit: 6.98e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.51e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/709812/likelihoodResults_343785601_344044801_4FGL_J2313.5+3945_daily_bin403.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9722.44148794
delta logL = -0.000845084550747

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9722.44064281
delta logL = 4.41777956439e-08

Fit tolerance = 1e-08

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

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

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   9722.441     FROM MIGRAD    STATUS=FAILED        88 CALLS      244 TOTAL
                     EDM=   .21E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10125E-03    179.90        .18142E-02** at limit **
   2  Index         2.6623        7.3969        .50000        .13335E-04
   3  Normalizat    1.5534        .30866E-01    .32153E-03   -.63998E-04
   4  Prefactor     .77674        .11366E-01    .15960E-03   -.69521E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   9722.441     FROM SIMPLEX   STATUS=UNCHANGED    132 CALLS      376 TOTAL
                     EDM=   .97E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10125E-03    179.90        .37180E-03** at limit **
   2  Index         2.6623        7.3969        .87499E-04    .13335E-04
   3  Normalizat    1.5534        .30866E-01    .74505E-06   -.63998E-04
   4  Prefactor     .77674        .11366E-01    .38469E-06   -.69521E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   9722.441     FROM MIGRAD    STATUS=CONVERGED     41 CALLS      417 TOTAL
                     EDM=   .21E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    955.62        .36285E-03** at limit **
   2  Index         2.4719        5.3065        .50000       -.28149E-07
   3  Normalizat    1.5534        .91112E-01    .12861E-04    .25246E-03
   4  Prefactor     .77674        .33553E-01    .63842E-05    .53565E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.47188
  Normalizat = 1.55339
  Prefactor  = 0.776744
 **********
 **   18 **HESSE 
 **********

 FCN=   9722.441     FROM HESSE     STATUS=OK            29 CALLS      446 TOTAL
                     EDM=   .83E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    7.3640        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4719        6.6833        .50000       -.53010    
   3  Normalizat    1.5534        .22373        .25722E-05   -.76289    
   4  Prefactor     .77674        .82420E-01    .12768E-05   -1.0059    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.33245e-11
Minuit parameter uncertainties:
  1  1.63327e-06
  2  147.513
  3  0.223877
  4  0.0824326
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/709812': 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) = 9722.44064221
delta logL = 6.41361111775e-07

Extracting fit parameters...

4FGL J2313.5+3945
   Spectrum: PowerLaw
406    Prefactor:  1.000e-04  1.633e-06  1.000e-04  1.000e+04 ( 1.000e-12)
407        Index:  2.472e+00  1.475e+02  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:  7.767e-01  8.243e-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:  1.553e+00  2.239e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 348.400 39.764

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/709812/cmap_HighResolution_343785601_344044801_4FGL_J2313.5+3945_daily_bin403.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.51e-03', job_status='DONE', photon_flux_upper_limit='6.98e-08', time_completed='2021-09-29 09:31:33.930047', job_id='709812', GAL2='0.78', fit_tolerance='1e-08', EG2='1.55', EG='1.55', time_epoch_completed='1632933093.93', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.78', dlogl='6.41e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.76' WHERE bin_id='403' AND source_name='4FGL J2313.5+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 29 09:31:33 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0073>
Subject: Job 709812: <4FGL_J2313.5+3945_daily_bin403> in cluster <slac> Done

Job <4FGL_J2313.5+3945_daily_bin403> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Wed Sep 29 09:15:14 2021
Job was executed on host(s) <bullet0073>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep 29 09:15:16 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:15:16 2021
Terminated at Wed Sep 29 09:31:34 2021
Results reported at Wed Sep 29 09:31:34 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2313.5+3945_daily_bin403 348.4 39.7644 343785601 344044801 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 :                                   950.00 sec.
    Max Memory :                                 1069 MB
    Average Memory :                             346.28 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.

