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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin958
RA = 196.008, Dec = 37.071
tmin = 487641601, tmax = 487900801
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='192247', job_status='RUN', time_executed='2021-09-06 19:57:45.117963', time_epoch_executed='1630983465.12' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='958'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/192247

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/192247/ft1_4FGL_J1304.0+3704_daily_bin958.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/192247/ft2_4FGL_J1304.0+3704_daily_bin958.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/192247/ft1_4FGL_J1304.0+3704_daily_bin958.fits outfile=/scratch/kocevski/192247/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin958.fits ra=196.008 dec=37.071 rad=12.0 tmin=487641601.0 tmax=487900801.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 5.17
user 4.87
sys 0.23

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/192247/ft2_4FGL_J1304.0+3704_daily_bin958.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/192247/ft2_4FGL_J1304.0+3704_daily_bin958.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/192247/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin958.fits evtable="EVENTS" outfile="/scratch/kocevski/192247/ft1_filtered_4FGL_J1304.0+3704_daily_bin958.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.53
user 0.36
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/192247/ft1_filtered_4FGL_J1304.0+3704_daily_bin958.fits" evtable="EVENTS" scfile=/scratch/kocevski/192247/ft2_4FGL_J1304.0+3704_daily_bin958.fits sctable="SC_DATA" outfile=/scratch/kocevski/192247/ltcube_487641601_487900801_4FGL_J1304.0+3704_daily_bin958.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/192247/ft2_4FGL_J1304.0+3704_daily_bin958.fits
.....................!
real 17.04
user 16.62
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/192247/ft1_filtered_4FGL_J1304.0+3704_daily_bin958.fits evtable="EVENTS" scfile=/scratch/kocevski/192247/ft2_4FGL_J1304.0+3704_daily_bin958.fits sctable="SC_DATA" expcube=/scratch/kocevski/192247/ltcube_487641601_487900801_4FGL_J1304.0+3704_daily_bin958.fits outfile=/scratch/kocevski/192247/expmap_487641601_487900801_4FGL_J1304.0+3704_daily_bin958.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/192247/ltcube_487641601_487900801_4FGL_J1304.0+3704_daily_bin958.fits
.....................!
real 192.54
user 187.37
sys 4.65

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
Added 187 point sources and 0 extended sources

Setting source of interest to:
4FGL J1304.0+3704 @ 196.008 37.071

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/192247/ft1_filtered_4FGL_J1304.0+3704_daily_bin958.fits scfile=/scratch/kocevski/192247/ft2_4FGL_J1304.0+3704_daily_bin958.fits outfile=/scratch/kocevski/192247/cmap_487641601_487900801_4FGL_J1304.0+3704_daily_bin958.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=196.008 yref=37.071 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.58
user 0.41
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/192247/ft1_filtered_4FGL_J1304.0+3704_daily_bin958.fits scfile=/scratch/kocevski/192247/ft2_4FGL_J1304.0+3704_daily_bin958.fits outfile=/scratch/kocevski/192247/cmap_HighResolution_487641601_487900801_4FGL_J1304.0+3704_daily_bin958.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=196.008 yref=37.071 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.62
user 0.41
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/192247/ft1_filtered_4FGL_J1304.0+3704_daily_bin958.fits evtable="EVENTS" scfile=/scratch/kocevski/192247/ft2_4FGL_J1304.0+3704_daily_bin958.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/192247/Model_4FGL_J1304.0+3704_daily_bin958.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 EG_v02
adding source GAL_V02
Working on...
/scratch/kocevski/192247/ft1_filtered_4FGL_J1304.0+3704_daily_bin958.fits.....................!
real 41.93
user 40.52
sys 1.25

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/192247/ft1_filtered_4FGL_J1304.0+3704_daily_bin958.fits', '/scratch/kocevski/192247/ft2_4FGL_J1304.0+3704_daily_bin958.fits', expMap='/scratch/kocevski/192247/expmap_487641601_487900801_4FGL_J1304.0+3704_daily_bin958.fits', expCube='/scratch/kocevski/192247/ltcube_487641601_487900801_4FGL_J1304.0+3704_daily_bin958.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/192247/Model_4FGL_J1304.0+3704_daily_bin958.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1304.0+3704'

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  2.111e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.436e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/192247/ft1_filtered_4FGL_J1304.0+3704_daily_bin958.fits
Spacecraft file(s): /scratch/kocevski/192247/ft2_4FGL_J1304.0+3704_daily_bin958.fits
Exposure map: /scratch/kocevski/192247/expmap_487641601_487900801_4FGL_J1304.0+3704_daily_bin958.fits
Exposure cube: /scratch/kocevski/192247/ltcube_487641601_487900801_4FGL_J1304.0+3704_daily_bin958.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/192247/Model_4FGL_J1304.0+3704_daily_bin958.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) = 4559.72374777

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    11.364       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .32140       1.0000         .10000E-03   10000.    
     3 'Prefactor '    2.4628       1.0000         .10000E-03   10000.    
     4 'Prefactor '    14.080       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .27330E-02   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .12921E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    7.3060       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10032E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    28.257       1.0000         .10000E-03   10000.    
    12 'Prefactor '    11.515       1.0000         .10000E-03   10000.    
    13 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    2.2582       1.0000         .10000E-03   10000.    
    15 'norm      '    .10055E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .17776E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    19.572       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10035E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10151E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    8.7986       1.0000         .10000E-03   10000.    
    25 'Prefactor '    44.824       1.0000         .10000E-03   10000.    
    26 'norm      '    1.4682       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    .42653E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.1758       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .69127       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   4559.722     FROM MIGRAD    STATUS=CONVERGED    791 CALLS     4798 TOTAL
                     EDM=   .16E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          11.364        5.0902        .36030E-07   -.41444E-04
   2  Prefactor     .31665        6.4468        .85866E-06   -.11337E-03
   3  Prefactor     2.4627        2.2236       -.17733E-08   -.30297E-04
   4  Prefactor     14.078        11.169        .13053E-06   -.86151E-05
   5  Prefactor     .10015E-03    23.342        .16525E-05** at limit **
   6  Prefactor     .10000E-03    14.436       -.15037E-06** at limit **
   7  Prefactor     .10000E-03    30.593        .26668E-06** at limit **
   8  Prefactor     .10002E-03    7.8076        .26570E-05** at limit **
   9  norm          7.3049        6.2490        .23618E-06   -.18230E-03
  10  Prefactor     .10000E-03    69.672       -.25710E-06** at limit **
  11  Prefactor     28.270        32.745       -.65070E-06   -.28519E-03
  12  Prefactor     11.533        19.836        .25916E-07   -.50284E-03
  13  norm          .10000E-03    4.5796        .60815E-07** at limit **
  14  norm          2.2580        21.653        .14661E-05    .35567E-04
  15  norm          .10000E-03    1.7832        .14844E-06** at limit **
  16  norm          .10000E-03    2.1914        .45989E-07** at limit **
  17  norm          .10000E-03    1.5210       -.47386E-07** at limit **
  18  Prefactor     .10001E-03    2.4429        .45053E-06** at limit **
  19  Prefactor     19.584        15.395       -.15332E-05   -.59003E-03
  20  Prefactor     .10000E-03    16.942       -.20627E-06** at limit **
  21  Prefactor     .10000E-03    32.640        .96701E-07** at limit **
  22  Prefactor     .10000E-03    10.078        .15054E-06** at limit **
  23  Prefactor     .10000E-03    13.184        .74023E-07** at limit **
  24  Prefactor     8.7871        25.634        .79776E-06   -.27722E-05
  25  Prefactor     44.914        65.951        .83036E-06    .62157E-04
  26  norm          1.4684        1.3128        .53977E-07    .12599E-03
  27  Prefactor     .10000E-03    3.2817       -.99065E-08** at limit **
  28  norm          .10028E-03    17.309       -.29234E-05** at limit **
  29  Normalizat    1.1756        .20075       -.43334E-05   -.57988E-03
  30  Prefactor     .69181        .23599        .49740E-05   -.32097E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 11.364
  Prefactor  = 0.316646
  Prefactor  = 2.46271
  Prefactor  = 14.0784
  Prefactor  = 0.00010015
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100023
  norm       = 7.3049
  Prefactor  = 0.0001
  Prefactor  = 28.27
  Prefactor  = 11.5333
  norm       = 0.0001
  norm       = 2.258
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100011
  Prefactor  = 19.584
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 8.78715
  Prefactor  = 44.9142
  norm       = 1.4684
  Prefactor  = 0.0001
  norm       = 0.000100276
  Normalizat = 1.1756
  Prefactor  = 0.691809
 **********
 **   18 **HESSE 
 **********

 FCN=   4559.722     FROM HESSE     STATUS=OK           586 CALLS     5384 TOTAL
                     EDM=   .40E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          11.364        5.0886        .96413E-04   -1.5034    
   2  Prefactor     .31665        22.596        .32623E-02   -1.5595    
   3  Prefactor     2.4627        2.2232        .90683E-04   -1.5394    
   4  Prefactor     14.078        11.165        .10674E-03   -1.4957    
   5  Prefactor     .10015E-03    235.84        .62261E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    14.458        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    30.619        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10002E-03    18.401        .30814E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          7.3049        6.2475        .13479E-03   -1.5167    
  10  Prefactor     .10000E-03    70.167        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     28.270        32.881        .75367E-04   -1.4644    
  12  Prefactor     11.533        18.380        .11806E-03   -1.5029    
  13  norm          .10000E-03    4.6138        .14077E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          2.2580        21.783        .27338E-03   -1.5407    
  15  norm          .10000E-03    1.8084        .88083E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    2.1992        .97624E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    1.5257        .81316E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10001E-03    10.776        .19868E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     19.584        15.609        .90534E-04   -1.4823    
  20  Prefactor     .10000E-03    16.970        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    32.662        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    10.095        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    13.199        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     8.7871        25.603        .13513E-03   -1.5115    
  25  Prefactor     44.914        66.132        .59884E-04   -1.4367    
  26  norm          1.4684        1.3098        .70865E-04   -1.5466    
  27  Prefactor     .10000E-03    3.3174        .11945E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .10028E-03    74.877        .50647E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.1756        .21180        .20135E-03   -.87360    
  30  Prefactor     .69181        .25130        .31511E-03   -1.0385    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.00084e-08
Minuit parameter uncertainties:
  1  5.08884
  2  5.35099
  3  2.22331
  4  11.1664
  5  0.0119463
  6  3.07222e-05
  7  0.000121438
  8  0.00128977
  9  6.24806
  10  3.68518e-05
  11  32.9018
  12  18.389
  13  7.41574e-06
  14  14.0328
  15  1.23624e-05
  16  4.26455e-06
  17  4.18788e-07
  18  0.000699041
  19  15.6127
  20  4.77355e-05
  21  4.84719e-05
  22  3.13201e-05
  23  4.24966e-05
  24  25.6347
  25  66.24
  26  1.3098
  27  5.71344e-06
  28  0.00910449
  29  0.211953
  30  0.25171
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.153e+01  1.839e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.436e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  6.918e-01  2.517e-01  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  1.176e+00  2.120e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.51
Ra Dec: 196.008 37.071
Photon Flux Upper Limit: 1.10e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.53e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/192247/likelihoodResults_487641601_487900801_4FGL_J1304.0+3704_daily_bin958.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) = 4559.14996428
delta logL = 0.572442038021

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4559.10405622
delta logL = 0.618350097192

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4559.104     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      300 TOTAL
                     EDM=   .42E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.2597        36.877        .68474E-02    .46104E-03
   2  Index         3.8879        3.0032        .12513        .11491E-03
   3  Normalizat    1.1163        .50940E-01    .37368E-01    .14836E-05
   4  Prefactor     .73912        .61782E-01    .69093E-01    .17120E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.25967
  Index      = 3.88794
  Normalizat = 1.11632
  Prefactor  = 0.739119
 **********
 **   18 **HESSE 
 **********

 FCN=   4559.104     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      333 TOTAL
                     EDM=   .42E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.2597        76.449        .81067E-04   -1.5407    
   2  Index         3.8879        6.9206        .44227E-02   -.22429    
   3  Normalizat    1.1163        .19593        .20567E-03   -.89230    
   4  Prefactor     .73912        .23996        .30573E-03   -1.0201    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.16969e-10
Minuit parameter uncertainties:
  1  26.3229
  2  5.89706
  3  0.19606
  4  0.2403
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/192247': 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) = 4559.1040549
delta logL = 0.618351416349

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  2.260e+00  2.632e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  3.888e+00  5.897e+00  0.000e+00  1.000e+01 (-1.000e+00)
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  7.391e-01  2.403e-01  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  1.116e+00  1.961e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.83
Ra Dec: 196.008 37.071
Photon Index (Free Index): 3.89 +/- 5.90
Photon Flux (Free Index): 6.85e-08 +/- 5.84e-08
Energy Flux (Free Index): 1.05e-05 +/- 1.35e-05

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/192247/cmap_HighResolution_487641601_487900801_4FGL_J1304.0+3704_daily_bin958.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.53e-03', comment='SUCCESS', energy_flux2='1.05e-05', dlogl='6.18e-01', photon_flux2='6.85e-08', job_status='DONE', time_completed='2021-09-06 20:11:22.653217', photon_index_error2='5.90', photon_index2='3.89', ts='0.51', fit_tolerance='1e-08', GAL='0.69', photon_index_error='0.00', photon_flux_upper_limit='1.10e-07', energy_flux_error2='1.35e-05', EG='1.18', time_epoch_completed='1630984282.65', return_code='0', job_id='192247', GAL2='0.74', EG2='1.12', return_code2='102', photon_flux_error2='5.84e-08', ts2='1.83', photon_index='2.44' WHERE bin_id='958' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:11:22 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0089>
Subject: Job 192247: <4FGL_J1304.0+3704_daily_bin958> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin958> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Mon Sep  6 19:55:25 2021
Job was executed on host(s) <bullet0089>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:55:29 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 19:55:29 2021
Terminated at Mon Sep  6 20:11:23 2021
Results reported at Mon Sep  6 20:11:23 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin958 196.008 37.071 487641601 487900801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1304.0+3704 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   812.43 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             264.57 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   953 sec.
    Turnaround time :                            958 sec.

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

