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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin311
RA = 196.008, Dec = 37.071
tmin = 319939201, tmax = 320198401
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='186806', job_status='RUN', time_executed='2021-09-06 19:37:54.272655', time_epoch_executed='1630982274.27' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='311'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/186806

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/186806/ft1_4FGL_J1304.0+3704_daily_bin311.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/186806/ft2_4FGL_J1304.0+3704_daily_bin311.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/186806/ft1_4FGL_J1304.0+3704_daily_bin311.fits outfile=/scratch/kocevski/186806/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin311.fits ra=196.008 dec=37.071 rad=12.0 tmin=319939201.0 tmax=320198401.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.52
user 3.24
sys 0.23

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/186806/ft2_4FGL_J1304.0+3704_daily_bin311.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/186806/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin311.fits evtable="EVENTS" outfile="/scratch/kocevski/186806/ft1_filtered_4FGL_J1304.0+3704_daily_bin311.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.56
user 0.33
sys 0.17

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/186806/ft1_filtered_4FGL_J1304.0+3704_daily_bin311.fits evtable="EVENTS" scfile=/scratch/kocevski/186806/ft2_4FGL_J1304.0+3704_daily_bin311.fits sctable="SC_DATA" expcube=/scratch/kocevski/186806/ltcube_319939201_320198401_4FGL_J1304.0+3704_daily_bin311.fits outfile=/scratch/kocevski/186806/expmap_319939201_320198401_4FGL_J1304.0+3704_daily_bin311.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/186806/ltcube_319939201_320198401_4FGL_J1304.0+3704_daily_bin311.fits
.....................!
real 192.45
user 186.13
sys 5.06

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/186806/ft1_filtered_4FGL_J1304.0+3704_daily_bin311.fits scfile=/scratch/kocevski/186806/ft2_4FGL_J1304.0+3704_daily_bin311.fits outfile=/scratch/kocevski/186806/cmap_319939201_320198401_4FGL_J1304.0+3704_daily_bin311.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.56
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/186806/ft1_filtered_4FGL_J1304.0+3704_daily_bin311.fits scfile=/scratch/kocevski/186806/ft2_4FGL_J1304.0+3704_daily_bin311.fits outfile=/scratch/kocevski/186806/cmap_HighResolution_319939201_320198401_4FGL_J1304.0+3704_daily_bin311.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.55
user 0.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/186806/ft1_filtered_4FGL_J1304.0+3704_daily_bin311.fits evtable="EVENTS" scfile=/scratch/kocevski/186806/ft2_4FGL_J1304.0+3704_daily_bin311.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/186806/Model_4FGL_J1304.0+3704_daily_bin311.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/186806/ft1_filtered_4FGL_J1304.0+3704_daily_bin311.fits.....................!
real 45.85
user 44.40
sys 1.23

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/186806/ft1_filtered_4FGL_J1304.0+3704_daily_bin311.fits', '/scratch/kocevski/186806/ft2_4FGL_J1304.0+3704_daily_bin311.fits', expMap='/scratch/kocevski/186806/expmap_319939201_320198401_4FGL_J1304.0+3704_daily_bin311.fits', expCube='/scratch/kocevski/186806/ltcube_319939201_320198401_4FGL_J1304.0+3704_daily_bin311.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/186806/Model_4FGL_J1304.0+3704_daily_bin311.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/186806/ft1_filtered_4FGL_J1304.0+3704_daily_bin311.fits
Spacecraft file(s): /scratch/kocevski/186806/ft2_4FGL_J1304.0+3704_daily_bin311.fits
Exposure map: /scratch/kocevski/186806/expmap_319939201_320198401_4FGL_J1304.0+3704_daily_bin311.fits
Exposure cube: /scratch/kocevski/186806/ltcube_319939201_320198401_4FGL_J1304.0+3704_daily_bin311.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/186806/Model_4FGL_J1304.0+3704_daily_bin311.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) = 5519.85179392

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    13.465       1.0000         .10000E-03   10000.    
     2 'Prefactor '    13.893       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10021E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    9.7738       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    3.3643       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    1.7883       1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    37.421       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    2.4292       1.0000         .10000E-03   10000.    
    14 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10504E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .23942E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .82782       1.0000         .10000E-03   10000.    
    18 'Prefactor '    3.1383       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10059E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    20.274       1.0000         .10000E-03   10000.    
    25 'Prefactor '    202.35       1.0000         .10000E-03   10000.    
    26 'norm      '    1.0982       1.0000         .10000E-03   10000.    
    27 'Prefactor '    6.3830       1.0000         .10000E-03   10000.    
    28 'norm      '    .15612E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    .96140       1.0000         .10000E-01   10.000    
    30 'Prefactor '    1.0143       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5519.846     FROM MIGRAD    STATUS=CONVERGED    114 CALLS     3381 TOTAL
                     EDM=   .84E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  7.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          13.465        5.1555        .27062E-05    .96623E-03
   2  Prefactor     13.893        1.0304        .10431E-06    .78864E-04
   3  Prefactor     .10002E-03    6.9438        .93336E-05** at limit **
   4  Prefactor     9.7745        1.0338        .22466E-06    .11943E-03
   5  Prefactor     .10020E-03    10.326       -.18313E-04** at limit **
   6  Prefactor     3.3690        1.0812       -.77706E-06    .46249E-04
   7  Prefactor     .10057E-03    16.075       -.91398E-05** at limit **
   8  Prefactor     1.7873        4.5961       -.11434E-04   -.42919E-03
   9  norm          .10000E-03    1.5137        .19915E-06** at limit **
  10  Prefactor     37.420        1.0129       -.10247E-06    .21095E-03
  11  Prefactor     .10009E-03    8.7152        .92392E-05** at limit **
  12  Prefactor     .10000E-03    4.3374       -.23768E-06** at limit **
  13  norm          2.4290        3.2621        .39523E-06   -.37598E-04
  14  norm          .10000E-03    4.8035       -.61684E-06** at limit **
  15  norm          .10000E-03    5.8947       -.78422E-07** at limit **
  16  norm          .10011E-03    5.5185        .15050E-05** at limit **
  17  norm          .82824        2.6501       -.74122E-06   -.38099E-03
  18  Prefactor     3.1386        2.8500        .27521E-06    .54599E-03
  19  Prefactor     .10002E-03    12.298        .10216E-04** at limit **
  20  Prefactor     .10011E-03    5.6910        .12142E-05** at limit **
  21  Prefactor     .10012E-03    18.632       -.22369E-04** at limit **
  22  Prefactor     .10646E-03    54.435       -.89396E-05** at limit **
  23  Prefactor     .10005E-03    42.780        .38853E-04** at limit **
  24  Prefactor     20.281        1.2499        .46102E-06   -.24880E-03
  25  Prefactor     202.35        1.0017       -.15864E-07    .21777E-03
  26  norm          1.0983        1.5616       -.69294E-07    .49188E-03
  27  Prefactor     6.3841        1.0602       -.14418E-06   -.57813E-03
  28  norm          .10855E-03    76.352       -.39889E-04** at limit **
  29  Normalizat    .96132        .20346        .13293E-05    .66153E-04
  30  Prefactor     1.0143        .25150        .18225E-05    .38335E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 13.4651
  Prefactor  = 13.893
  Prefactor  = 0.000100022
  Prefactor  = 9.77447
  Prefactor  = 0.000100205
  Prefactor  = 3.36896
  Prefactor  = 0.000100572
  Prefactor  = 1.78733
  norm       = 0.0001
  Prefactor  = 37.4199
  Prefactor  = 0.000100095
  Prefactor  = 0.0001
  norm       = 2.429
  norm       = 0.0001
  norm       = 0.000100001
  norm       = 0.000100112
  norm       = 0.828235
  Prefactor  = 3.13855
  Prefactor  = 0.000100024
  Prefactor  = 0.000100112
  Prefactor  = 0.000100122
  Prefactor  = 0.000106457
  Prefactor  = 0.000100053
  Prefactor  = 20.2809
  Prefactor  = 202.348
  norm       = 1.09826
  Prefactor  = 6.38405
  norm       = 0.000108551
  Normalizat = 0.96132
  Prefactor  = 1.01432
 **********
 **   18 **HESSE 
 **********

 FCN=   5519.846     FROM HESSE     STATUS=OK           676 CALLS     4057 TOTAL
                     EDM=   .35E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          13.465        5.5073        .27289E-02   -1.4974    
   2  Prefactor     13.893        8.1649        .26865E-02   -1.4962    
   3  Prefactor     .10002E-03    1.5861        .51557E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     9.7745        10.851        .32044E-02   -1.5083    
   5  Prefactor     .10020E-03    14.120        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     3.3690        33.511        .55157E-02   -1.5341    
   7  Prefactor     .10057E-03    35.905        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     1.7873        4.8531        .78204E-02   -1.5441    
   9  norm          .10000E-03    1.5102        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     37.420        36.497        .16379E-02   -1.4484    
  11  Prefactor     .10009E-03    20.210        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    4.3350        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          2.4290        3.2791        .65642E-02   -1.5396    
  14  norm          .10000E-03    4.7998        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    2.8718        .37195E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10011E-03    4.5701        .50910E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .82824        2.6692        .48966E-01   -1.5526    
  18  Prefactor     3.1386        2.8683        .57209E-02   -1.5354    
  19  Prefactor     .10002E-03    12.684        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10011E-03    16.931        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10012E-03    30.082        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10646E-03    10.922        .13272       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10005E-03    51.629        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     20.281        26.271        .22238E-02   -1.4807    
  25  Prefactor     202.35        98.955        .71022E-03   -1.2853    
  26  norm          1.0983        1.6027        .11353E-01   -1.5498    
  27  Prefactor     6.3841        5.8406        .39717E-02   -1.5203    
  28  norm          .10855E-03    12.803        .90712E-01   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    .96132        .17660        .45681E-01   -.94338    
  30  Prefactor     1.0143        .21259        .64024E-01   -.92254    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.4755e-07
Minuit parameter uncertainties:
  1  5.5075
  2  8.16553
  3  0.000375618
  4  10.853
  5  0.00339977
  6  21.2657
  7  0.00907025
  8  4.85417
  9  1.74611e-05
  10  36.5185
  11  0.00276929
  12  1.10784e-05
  13  3.27933
  14  4.67414e-05
  15  0.000102543
  16  0.00143034
  17  2.66954
  18  2.86846
  19  0.0011085
  20  0.00275543
  21  0.00382558
  22  0.0167984
  23  0.00331077
  24  26.2863
  25  99.0366
  26  1.60273
  27  5.84108
  28  0.0209315
  29  0.176704
  30  0.212762
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.108e-05  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:  1.014e+00  2.128e-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:  9.613e-01  1.767e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 196.008 37.071
Photon Flux Upper Limit: 4.74e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.68e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/186806/likelihoodResults_319939201_320198401_4FGL_J1304.0+3704_daily_bin311.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) = 5519.84666803
delta logL = -0.00109208804224

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5519.84557582
delta logL = 1.1947031453e-07

Fit tolerance = 1e-08

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

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

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5519.846     FROM MIGRAD    STATUS=CONVERGED    102 CALLS      254 TOTAL
                     EDM=   .13E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    30.446        .15305E-01** at limit **
   2  Index         1.7949        5.7785        .50000        .20984E-06
   3  Normalizat    .96132        .98287E-02    .23465E-03   -.26986E-04
   4  Prefactor     1.0143        .12204E-01    .28317E-03   -.20395E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.79494
  Normalizat = 0.96132
  Prefactor  = 1.01432
 **********
 **   18 **HESSE 
 **********

 FCN=   5519.846     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      283 TOTAL
                     EDM=   .17E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    348.79        .17350E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.7949        8.5908        .50000       -.69582    
   3  Normalizat    .96132        .35795E-01    .93860E-05   -.94338    
   4  Prefactor     1.0143        .44445E-01    .11327E-04   -.92254    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.65228e-11
Minuit parameter uncertainties:
  1  0.000800596
  2  1320
  3  0.0357955
  4  0.0444461
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/186806': 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) = 5519.84557315
delta logL = 2.78451625491e-06

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  8.006e-04  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  1.795e+00  1.320e+03  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:  1.014e+00  4.445e-02  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:  9.613e-01  3.580e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 196.008 37.071

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/186806/cmap_HighResolution_319939201_320198401_4FGL_J1304.0+3704_daily_bin311.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.68e-03', job_status='DONE', photon_flux_upper_limit='4.74e-08', time_completed='2021-09-06 19:50:47.826625', job_id='186806', GAL2='1.01', fit_tolerance='1e-08', EG2='0.96', EG='0.96', time_epoch_completed='1630983047.83', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.01', dlogl='2.78e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='311' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:50:47 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0274>
Subject: Job 186806: <4FGL_J1304.0+3704_daily_bin311> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin311> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Mon Sep  6 19:35:49 2021
Job was executed on host(s) <bullet0274>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:35:51 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:35:51 2021
Terminated at Mon Sep  6 19:50:48 2021
Results reported at Mon Sep  6 19:50:48 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin311 196.008 37.071 319939201 320198401 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 :                                   769.43 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             300.77 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   897 sec.
    Turnaround time :                            899 sec.

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

