/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 51 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 = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J2313.5+3945_daily_bin821
RA = 348.4, Dec = 39.7644
tmin = 452131201, tmax = 452390401
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='712744', job_status='RUN', time_executed='2021-09-29 09:26:18.588482', time_epoch_executed='1632932778.59' WHERE source_name='4FGL J2313.5+3945' and cadence='daily' and bin_id='821'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/712744

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/712744/ft1_4FGL_J2313.5+3945_daily_bin821.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/712744/ft2_4FGL_J2313.5+3945_daily_bin821.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/712744/ft1_4FGL_J2313.5+3945_daily_bin821.fits outfile=/scratch/kocevski/712744/ft1_filteredMKT_4FGL_J2313.5+3945_daily_bin821.fits ra=348.4 dec=39.7644 rad=12.0 tmin=452131201.0 tmax=452390401.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.36
user 3.16
sys 0.19

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/712744/ft1_filtered_4FGL_J2313.5+3945_daily_bin821.fits evtable="EVENTS" scfile=/scratch/kocevski/712744/ft2_4FGL_J2313.5+3945_daily_bin821.fits sctable="SC_DATA" expcube=/scratch/kocevski/712744/ltcube_452131201_452390401_4FGL_J2313.5+3945_daily_bin821.fits outfile=/scratch/kocevski/712744/expmap_452131201_452390401_4FGL_J2313.5+3945_daily_bin821.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/712744/ltcube_452131201_452390401_4FGL_J2313.5+3945_daily_bin821.fits
.....................!
real 191.67
user 186.35
sys 4.85

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/712744/ft1_filtered_4FGL_J2313.5+3945_daily_bin821.fits scfile=/scratch/kocevski/712744/ft2_4FGL_J2313.5+3945_daily_bin821.fits outfile=/scratch/kocevski/712744/cmap_452131201_452390401_4FGL_J2313.5+3945_daily_bin821.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.53
user 0.36
sys 0.15

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10031E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    53.682       1.0000         .10000E-03   10000.    
     3 'norm      '    .11385E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    48.194       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    43.754       1.0000         .10000E-03   10000.    
     8 'Prefactor '    7.7933       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .36987       1.0000         .10000E-03   10000.    
    12 'Prefactor '    22.520       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .17381E-02   1.0000         .10000E-03   10000.    
    15 'norm      '    12.807       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10208E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    4.3407       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .71592E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    31.212       1.0000         .10000E-03   10000.    
    22 'Prefactor '    7.2429       1.0000         .10000E-03   10000.    
    23 'Normalizat'    1.0547       1.0000         .10000E-01   10.000    
    24 'Prefactor '    .88457       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=   12230.77     FROM MIGRAD    STATUS=CONVERGED    540 CALLS     2722 TOTAL
                     EDM=   .13E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    15.285        .33590E-05** at limit **
   2  Prefactor     53.647        30.247       -.25307E-05   -.12177E-04
   3  norm          .10000E-03    26.344        .81641E-06** at limit **
   4  Prefactor     .10000E-03    2.9518        .15723E-06** at limit **
   5  Prefactor     48.187        55.200       -.14317E-05   -.16710E-05
   6  Prefactor     .10000E-03    2.2976       -.17063E-07** at limit **
   7  norm          43.750        6.5023        .57933E-07   -.34153E-05
   8  Prefactor     7.7924        10.696       -.85367E-07    .79130E-06
   9  Prefactor     .10000E-03    3.5017        .17355E-07** at limit **
  10  Prefactor     .10000E-03    8.7322       -.19867E-06** at limit **
  11  norm          .37058        1.2072       -.66685E-06    .40634E-04
  12  Prefactor     22.518        12.627       -.36662E-06    .40168E-05
  13  Prefactor     .10000E-03    13.753       -.11829E-05** at limit **
  14  norm          .10000E-03    49.300        .79590E-05** at limit **
  15  norm          12.807        8.7897        .85693E-08    .30410E-05
  16  Prefactor     .10000E-03    22.267       -.23862E-05** at limit **
  17  norm          4.3408        2.6330       -.45841E-07    .15084E-04
  18  Prefactor     .10000E-03    18.677        .40118E-07** at limit **
  19  Prefactor     .10000E-03    144.58       -.39405E-05** at limit **
  20  Prefactor     .10000E-03    27.313        .11396E-05** at limit **
  21  Prefactor     31.209        44.369       -.73865E-06   -.97606E-05
  22  Prefactor     7.2452        7.3906        .10069E-06   -.18547E-04
  23  Normalizat    1.0547        .19681        .12975E-06   -.11072E-04
  24  Prefactor     .88455        .68251E-01    .25056E-07   -.94034E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 53.6466
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 48.187
  Prefactor  = 0.0001
  norm       = 43.7496
  Prefactor  = 7.79242
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.370582
  Prefactor  = 22.5176
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 12.8072
  Prefactor  = 0.0001
  norm       = 4.34075
  Prefactor  = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  Prefactor  = 31.2086
  Prefactor  = 7.24525
  Normalizat = 1.05466
  Prefactor  = 0.884545
 **********
 **   18 **HESSE 
 **********

 FCN=   12230.77     FROM HESSE     STATUS=OK           403 CALLS     3125 TOTAL
                     EDM=   .24E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    15.453        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     53.647        30.309        .54744E-04   -1.4242    
   3  norm          .10000E-03    26.805        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    2.9708        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     48.187        55.206        .57761E-04   -1.4319    
   6  Prefactor     .10000E-03    2.3044        .16358E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          43.750        6.4948        .60608E-04   -1.4384    
   8  Prefactor     7.7924        10.693        .14364E-03   -1.5150    
   9  Prefactor     .10000E-03    3.5461        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    8.7363        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .37058        1.2187        .20358E-03   -1.5586    
  12  Prefactor     22.518        12.644        .84406E-04   -1.4759    
  13  Prefactor     .10000E-03    13.778        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    4.4016        .58143E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          12.807        8.7890        .11193E-03   -1.4992    
  16  Prefactor     .10000E-03    22.425        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          4.3408        2.6293        .13384E-03   -1.5291    
  18  Prefactor     .10000E-03    18.830        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    144.73        .20967E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    27.389        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     31.209        44.290        .71719E-04   -1.4590    
  22  Prefactor     7.2452        7.3728        .14904E-03   -1.5170    
  23  Normalizat    1.0547        .22310        .41055E-03   -.91221    
  24  Prefactor     .88455        .78022E-01    .16122E-03   -.96683    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.37074e-11
Minuit parameter uncertainties:
  1  5.68713e-05
  2  30.3179
  3  3.76131e-05
  4  3.09652e-06
  5  55.2649
  6  2.11943e-07
  7  6.49495
  8  10.6952
  9  1.27342e-06
  10  5.14129e-06
  11  1.21874
  12  12.645
  13  3.73843e-06
  14  5.55372e-06
  15  8.78989
  16  3.89648e-05
  17  2.62938
  18  1.1142e-05
  19  0.00104107
  20  1.42422e-05
  21  44.3365
  22  7.3737
  23  0.223301
  24  0.0780313
Done.

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

Extracting fit parameters...

4FGL J2313.5+3945
   Spectrum: PowerLaw
406    Prefactor:  2.252e+01  1.265e+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:  8.845e-01  7.803e-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.055e+00  2.233e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.61
Ra Dec: 348.400 39.764
Photon Index (Fixed Index): 2.76 +/- 0.00
Photon Flux (Fixed Index): 1.00e-07 +/- 5.61e-08
Energy Flux (Fixed Index): 2.31e-05 +/- 1.29e-05

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) = 12230.7602671
delta logL = 0.0123668517663

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 12230.7533415
delta logL = 0.0192924669009

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    20.838       1.0000         .10000E-03   10000.    
     2 'Index     '    2.8980       1.0000          .0000       10.000    
     3 'Normalizat'    1.0456       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .88690       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=   12230.75     FROM MIGRAD    STATUS=CONVERGED     82 CALLS      244 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     20.840        16.169        .87744E-04   -.40192E-03
   2  Index         2.8976        .78958        .95070E-02   -.13626E-03
   3  Normalizat    1.0456        .22001        .41207E-03    .57297E-03
   4  Prefactor     .88689        .78487E-01    .16104E-03    .17735E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 20.8405
  Index      = 2.89764
  Normalizat = 1.04559
  Prefactor  = 0.886892
 **********
 **   18 **HESSE 
 **********

 FCN=   12230.75     FROM HESSE     STATUS=OK            25 CALLS      269 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     20.840        15.102        .35097E-05   -1.4795    
   2  Index         2.8976        .73677        .38028E-03   -.43397    
   3  Normalizat    1.0456        .21968        .16483E-04   -.91518    
   4  Prefactor     .88689        .78378E-01    .32207E-04   -.96601    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.23556e-09
Minuit parameter uncertainties:
  1  15.1048
  2  0.740047
  3  0.219876
  4  0.078388
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/712744': 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) = 12230.7533414
delta logL = 0.0192925789215

Extracting fit parameters...

4FGL J2313.5+3945
   Spectrum: PowerLaw
406    Prefactor:  2.084e+01  1.510e+01  1.000e-04  1.000e+04 ( 1.000e-12)
407        Index:  2.898e+00  7.400e-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:  8.869e-01  7.839e-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.046e+00  2.199e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.68
Ra Dec: 348.400 39.764
Photon Index (Free Index): 2.90 +/- 0.74
Photon Flux (Free Index): 1.07e-07 +/- 6.73e-08
Energy Flux (Free Index): 2.26e-05 +/- 1.27e-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/712744/cmap_HighResolution_452131201_452390401_4FGL_J2313.5+3945_daily_bin821.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.00e-07', energy_flux2='2.26e-05', photon_flux_error='5.61e-08', dlogl='1.93e-02', energy_flux='2.31e-05', photon_flux2='1.07e-07', job_status='DONE', time_completed='2021-09-29 09:41:41.238431', photon_index_error2='0.74', photon_index2='2.90', ts='4.61', fit_tolerance='1e-08', GAL='0.88', photon_index_error='0.00', energy_flux_error2='1.27e-05', EG='1.05', time_epoch_completed='1632933701.24', return_code='0', job_id='712744', GAL2='0.89', EG2='1.05', return_code2='0', energy_flux_error='1.29e-05', photon_flux_error2='6.73e-08', ts2='4.68', photon_index='2.76' WHERE bin_id='821' AND source_name='4FGL J2313.5+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 29 09:41:41 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0130>
Subject: Job 712744: <4FGL_J2313.5+3945_daily_bin821> in cluster <slac> Done

Job <4FGL_J2313.5+3945_daily_bin821> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Wed Sep 29 09:25:17 2021
Job was executed on host(s) <bullet0130>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep 29 09:25:18 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:25:18 2021
Terminated at Wed Sep 29 09:41:42 2021
Results reported at Wed Sep 29 09:41:42 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2313.5+3945_daily_bin821 348.4 39.7644 452131201 452390401 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 :                                   922.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             323.75 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   983 sec.
    Turnaround time :                            985 sec.

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

