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


Performing analysis on: 4FGL_J2304.6+3704_daily_bin1603
RA = 346.173, Dec = 37.0826
tmin = 654825601, tmax = 655084801
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='917485', job_status='RUN', time_executed='2021-10-05 00:18:34.530221', time_epoch_executed='1633418314.53' WHERE source_name='4FGL J2304.6+3704' and cadence='daily' and bin_id='1603'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/917485

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/917485/ft1_4FGL_J2304.6+3704_daily_bin1603.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/917485/ft2_4FGL_J2304.6+3704_daily_bin1603.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/917485/ft1_4FGL_J2304.6+3704_daily_bin1603.fits outfile=/scratch/kocevski/917485/ft1_filteredMKT_4FGL_J2304.6+3704_daily_bin1603.fits ra=346.173 dec=37.0826 rad=12.0 tmin=654825601.0 tmax=655084801.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.01
user 2.80
sys 0.18

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/917485/ft2_4FGL_J2304.6+3704_daily_bin1603.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/917485/ft2_4FGL_J2304.6+3704_daily_bin1603.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/917485/ft1_filteredMKT_4FGL_J2304.6+3704_daily_bin1603.fits evtable="EVENTS" outfile="/scratch/kocevski/917485/ft1_filtered_4FGL_J2304.6+3704_daily_bin1603.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.35
sys 0.13

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/917485/ft1_filtered_4FGL_J2304.6+3704_daily_bin1603.fits" evtable="EVENTS" scfile=/scratch/kocevski/917485/ft2_4FGL_J2304.6+3704_daily_bin1603.fits sctable="SC_DATA" outfile=/scratch/kocevski/917485/ltcube_654825601_655084801_4FGL_J2304.6+3704_daily_bin1603.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/917485/ft2_4FGL_J2304.6+3704_daily_bin1603.fits
.....................!
real 12.17
user 11.84
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/917485/ft1_filtered_4FGL_J2304.6+3704_daily_bin1603.fits evtable="EVENTS" scfile=/scratch/kocevski/917485/ft2_4FGL_J2304.6+3704_daily_bin1603.fits sctable="SC_DATA" expcube=/scratch/kocevski/917485/ltcube_654825601_655084801_4FGL_J2304.6+3704_daily_bin1603.fits outfile=/scratch/kocevski/917485/expmap_654825601_655084801_4FGL_J2304.6+3704_daily_bin1603.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/917485/ltcube_654825601_655084801_4FGL_J2304.6+3704_daily_bin1603.fits
.....................!
real 189.63
user 185.04
sys 4.24

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 155 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 J2304.6+3704 @ 346.173 37.0826

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/917485/ft1_filtered_4FGL_J2304.6+3704_daily_bin1603.fits scfile=/scratch/kocevski/917485/ft2_4FGL_J2304.6+3704_daily_bin1603.fits outfile=/scratch/kocevski/917485/cmap_654825601_655084801_4FGL_J2304.6+3704_daily_bin1603.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=346.173 yref=37.0826 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.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/917485/ft1_filtered_4FGL_J2304.6+3704_daily_bin1603.fits scfile=/scratch/kocevski/917485/ft2_4FGL_J2304.6+3704_daily_bin1603.fits outfile=/scratch/kocevski/917485/cmap_HighResolution_654825601_655084801_4FGL_J2304.6+3704_daily_bin1603.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=346.173 yref=37.0826 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.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/917485/ft1_filtered_4FGL_J2304.6+3704_daily_bin1603.fits evtable="EVENTS" scfile=/scratch/kocevski/917485/ft2_4FGL_J2304.6+3704_daily_bin1603.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/917485/Model_4FGL_J2304.6+3704_daily_bin1603.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/917485/ft1_filtered_4FGL_J2304.6+3704_daily_bin1603.fits.....................!
real 49.21
user 47.90
sys 1.17

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/917485/ft1_filtered_4FGL_J2304.6+3704_daily_bin1603.fits', '/scratch/kocevski/917485/ft2_4FGL_J2304.6+3704_daily_bin1603.fits', expMap='/scratch/kocevski/917485/expmap_654825601_655084801_4FGL_J2304.6+3704_daily_bin1603.fits', expCube='/scratch/kocevski/917485/ltcube_654825601_655084801_4FGL_J2304.6+3704_daily_bin1603.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/917485/Model_4FGL_J2304.6+3704_daily_bin1603.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2304.6+3704'

4FGL J2304.6+3704
   Spectrum: PowerLaw
376    Prefactor:  4.732e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
377        Index:  1.849e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
378        Scale:  3.823e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/917485/ft1_filtered_4FGL_J2304.6+3704_daily_bin1603.fits
Spacecraft file(s): /scratch/kocevski/917485/ft2_4FGL_J2304.6+3704_daily_bin1603.fits
Exposure map: /scratch/kocevski/917485/expmap_654825601_655084801_4FGL_J2304.6+3704_daily_bin1603.fits
Exposure cube: /scratch/kocevski/917485/ltcube_654825601_655084801_4FGL_J2304.6+3704_daily_bin1603.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/917485/Model_4FGL_J2304.6+3704_daily_bin1603.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) = 3221.5876033

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.6729       1.0000         .10000E-03   10000.    
     2 'Prefactor '    43.333       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10556E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    26.992       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    47.352       1.0000         .10000E-03   10000.    
     9 'norm      '    .10008E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    157.55       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10291E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .18597E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10006E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10029E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10379E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    3.0285       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10171E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .47291E-02   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .24325E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .54315E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10057E-03   1.0000         .10000E-03   10000.    
    22 'Normalizat'    .66295       1.0000         .10000E-01   10.000    
    23 'Prefactor '    1.0317       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5200E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   3221.530     FROM MIGRAD    STATUS=CONVERGED    510 CALLS     2541 TOTAL
                     EDM=   .18E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.6732        2.0792       -.16910E-06   -.49467E-04
   2  Prefactor     43.751        150.92       -.16511E-05   -.61883E-05
   3  Prefactor     .10000E-03    4.8718        .30251E-06** at limit **
   4  Prefactor     .10000E-03    39.303       -.56467E-06** at limit **
   5  norm          .10000E-03    2.5442        .22904E-06** at limit **
   6  Prefactor     26.998        27.592        .90795E-07   -.13361E-04
   7  Prefactor     .10000E-03    4.9510        .93589E-07** at limit **
   8  Prefactor     47.331        45.725       -.17139E-06   -.19804E-05
   9  norm          .10000E-03    1.9337       -.38114E-06** at limit **
  10  Prefactor     157.46        133.75       -.13897E-05   -.10114E-04
  11  Prefactor     .10000E-03    28.472       -.58498E-06** at limit **
  12  Prefactor     .10000E-03    87.780       -.23173E-05** at limit **
  13  norm          .10000E-03    9.8394       -.52009E-06** at limit **
  14  norm          .10000E-03    13.822       -.11775E-06** at limit **
  15  Prefactor     .10000E-03    44.832       -.99213E-06** at limit **
  16  norm          3.0285        7.8598        .77422E-06   -.15765E-05
  17  Prefactor     .10000E-03    54.022       -.15559E-06** at limit **
  18  Prefactor     .10000E-03    877.70       -.47874E-05** at limit **
  19  Prefactor     .10000E-03    271.04       -.19803E-07** at limit **
  20  Prefactor     .10000E-03    211.77       -.66483E-07** at limit **
  21  Prefactor     .10000E-03    44.138       -.15237E-06** at limit **
  22  Normalizat    .66326        .47931        .15929E-04   -.54627E-05
  23  Prefactor     1.0316        .15828       -.44095E-05    .17650E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 2.67324
  Prefactor  = 43.7514
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 26.9982
  Prefactor  = 0.0001
  Prefactor  = 47.3309
  norm       = 0.0001
  Prefactor  = 157.46
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 3.02851
  Prefactor  = 0.0001
  Prefactor  = 0.000100003
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.663265
  Prefactor  = 1.03155
 **********
 **   18 **HESSE 
 **********

 FCN=   3221.530     FROM HESSE     STATUS=OK           362 CALLS     2903 TOTAL
                     EDM=   .37E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.6732        2.0739        .69241E-04   -1.5381    
   2  Prefactor     43.751        150.62        .30450E-03   -1.4384    
   3  Prefactor     .10000E-03    4.8908        .12231E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    39.630        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    2.5586        .88437E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     26.998        27.584        .77109E-04   -1.4668    
   7  Prefactor     .10000E-03    4.9607        .12333E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     47.331        45.717        .58270E-04   -1.4331    
   9  norm          .10000E-03    1.9699        .77330E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     157.46        133.62        .16061E-03   -1.3192    
  11  Prefactor     .10000E-03    28.601        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    88.110        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    9.8781        .17405E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    13.826        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    44.958        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          3.0285        7.8293        .23318E-03   -1.5360    
  17  Prefactor     .10000E-03    54.036        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    881.86        .19278E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    271.05        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    211.77        .21116E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    44.153        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Normalizat    .66326        .47926        .55229E-03   -1.0536    
  23  Prefactor     1.0316        .15827        .14940E-03   -.91685    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.65341e-11
Minuit parameter uncertainties:
  1  2.074
  2  151.964
  3  4.41088e-06
  4  5.62587e-05
  5  5.21677e-06
  6  27.5968
  7  8.99661e-08
  8  45.7509
  9  1.34558e-05
  10  133.875
  11  0.000114732
  12  0.000350891
  13  3.03519e-05
  14  9.732e-06
  15  0.000124318
  16  7.83192
  17  2.87333e-05
  18  0.0035294
  19  0.000186555
  20  4.96426e-05
  21  1.20066e-05
  22  0.482319
  23  0.158344
Done.

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

Extracting fit parameters...

4FGL J2304.6+3704
   Spectrum: PowerLaw
376    Prefactor:  4.733e+01  4.575e+01  1.000e-04  1.000e+04 ( 1.000e-14)
377        Index:  1.849e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
378        Scale:  3.823e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
517    Prefactor:  1.032e+00  1.583e-01  0.000e+00  1.000e+01 ( 1.000e+00)
518        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
519        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
512   Normalization:  6.633e-01  4.823e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 7.26
Ra Dec: 346.173 37.083
Photon Index (Fixed Index): 1.85 +/- 0.00
Photon Flux (Fixed Index): 4.69e-08 +/- 4.53e-08
Energy Flux (Fixed Index): 4.86e-05 +/- 4.69e-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) = 3220.68370381
delta logL = 0.846600295979

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 3220.67782847
delta logL = 0.852475637459

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   3220.678     FROM MIGRAD    STATUS=CONVERGED     48 CALLS      201 TOTAL
                     EDM=   .51E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  9.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     52.297        60.667       -.12929E-04    .28594E-03
   2  Index         .93128        .66174       -.82849E-04   -.35908E-04
   3  Normalizat    .69546        .42477        .44341E-05    .21659E-03
   4  Prefactor     1.0276        .14230       -.46057E-06    .54962E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 52.2975
  Index      = 0.931282
  Normalizat = 0.695463
  Prefactor  = 1.02759
 **********
 **   18 **HESSE 
 **********

 FCN=   3220.678     FROM HESSE     STATUS=OK            29 CALLS      230 TOTAL
                     EDM=   .91E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     52.297        60.744        .27719E-03   -1.4260    
   2  Index         .93128        .66109        .10895E-02   -.95056    
   3  Normalizat    .69546        .46236        .53993E-03   -1.0407    
   4  Prefactor     1.0276        .15552        .14963E-03   -.91815    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.11276e-10
Minuit parameter uncertainties:
  1  60.816
  2  0.666933
  3  0.464987
  4  0.155587
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/917485': 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) = 3220.67782604
delta logL = 0.852478070441

Extracting fit parameters...

4FGL J2304.6+3704
   Spectrum: PowerLaw
376    Prefactor:  5.230e+01  6.082e+01  1.000e-04  1.000e+04 ( 1.000e-14)
377        Index:  9.313e-01  6.669e-01  0.000e+00  1.000e+01 (-1.000e+00)
378        Scale:  3.823e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
517    Prefactor:  1.028e+00  1.556e-01  0.000e+00  1.000e+01 ( 1.000e+00)
518        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
519        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
512   Normalization:  6.955e-01  4.650e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.95
Ra Dec: 346.173 37.083
Photon Index (Free Index): 0.93 +/- 0.67
Photon Flux (Free Index): 1.38e-08 +/- 1.56e-08
Energy Flux (Free Index): 2.34e-04 +/- 3.26e-04

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/917485/cmap_HighResolution_654825601_655084801_4FGL_J2304.6+3704_daily_bin1603.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='4.69e-08', energy_flux2='2.34e-04', photon_flux_error='4.53e-08', dlogl='8.52e-01', energy_flux='4.86e-05', photon_flux2='1.38e-08', job_status='DONE', time_completed='2021-10-05 00:26:00.153371', photon_index_error2='0.67', photon_index2='0.93', ts='7.26', fit_tolerance='1e-08', GAL='1.03', photon_index_error='0.00', energy_flux_error2='3.26e-04', EG='0.66', time_epoch_completed='1633418760.15', return_code='0', job_id='917485', GAL2='1.03', EG2='0.70', return_code2='0', energy_flux_error='4.69e-05', photon_flux_error2='1.56e-08', ts2='8.95', photon_index='1.85' WHERE bin_id='1603' AND source_name='4FGL J2304.6+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Oct  5 00:26:00 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0241>
Subject: Job 917485: <4FGL_J2304.6+3704_daily_bin1603> in cluster <slac> Done

Job <4FGL_J2304.6+3704_daily_bin1603> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Tue Oct  5 00:15:37 2021
Job was executed on host(s) <bullet0241>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Oct  5 00:15:38 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Oct  5 00:15:38 2021
Terminated at Tue Oct  5 00:26:01 2021
Results reported at Tue Oct  5 00:26:01 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2304.6+3704_daily_bin1603 346.173 37.0826 654825601 655084801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2304.6+3704 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   448.33 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             266.26 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   622 sec.
    Turnaround time :                            624 sec.

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

