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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin375
RA = 196.008, Dec = 37.071
tmin = 336528001, tmax = 336787201
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='187991', job_status='RUN', time_executed='2021-09-06 19:43:51.813073', time_epoch_executed='1630982631.81' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='375'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/187991

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/187991/ft1_4FGL_J1304.0+3704_daily_bin375.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/187991/ft2_4FGL_J1304.0+3704_daily_bin375.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/187991/ft1_4FGL_J1304.0+3704_daily_bin375.fits outfile=/scratch/kocevski/187991/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin375.fits ra=196.008 dec=37.071 rad=12.0 tmin=336528001.0 tmax=336787201.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.90
user 5.58
sys 0.25

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/187991/ft1_filtered_4FGL_J1304.0+3704_daily_bin375.fits evtable="EVENTS" scfile=/scratch/kocevski/187991/ft2_4FGL_J1304.0+3704_daily_bin375.fits sctable="SC_DATA" expcube=/scratch/kocevski/187991/ltcube_336528001_336787201_4FGL_J1304.0+3704_daily_bin375.fits outfile=/scratch/kocevski/187991/expmap_336528001_336787201_4FGL_J1304.0+3704_daily_bin375.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/187991/ltcube_336528001_336787201_4FGL_J1304.0+3704_daily_bin375.fits
.....................!
real 193.28
user 187.21
sys 4.71

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/187991/ft1_filtered_4FGL_J1304.0+3704_daily_bin375.fits scfile=/scratch/kocevski/187991/ft2_4FGL_J1304.0+3704_daily_bin375.fits outfile=/scratch/kocevski/187991/cmap_336528001_336787201_4FGL_J1304.0+3704_daily_bin375.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.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/187991/ft1_filtered_4FGL_J1304.0+3704_daily_bin375.fits scfile=/scratch/kocevski/187991/ft2_4FGL_J1304.0+3704_daily_bin375.fits outfile=/scratch/kocevski/187991/cmap_HighResolution_336528001_336787201_4FGL_J1304.0+3704_daily_bin375.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.56
user 0.39
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    3.8680       1.0000         .10000E-03   10000.    
     2 'Prefactor '    16.913       1.0000         .10000E-03   10000.    
     3 'Prefactor '    2.8095       1.0000         .10000E-03   10000.    
     4 'Prefactor '    10.925       1.0000         .10000E-03   10000.    
     5 'Prefactor '    40.097       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    59.542       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10006E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    120.69       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10040E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    8.1622       1.0000         .10000E-03   10000.    
    22 'Prefactor '    1.3116       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    42.157       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    17.342       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    8.8202       1.0000         .10000E-03   10000.    
    29 'Normalizat'    .85567       1.0000         .10000E-01   10.000    
    30 'Prefactor '    1.2343       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=   3576.414     FROM MIGRAD    STATUS=CONVERGED    751 CALLS     4525 TOTAL
                     EDM=   .20E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.8679        4.8437        .11719E-06   -.58836E-06
   2  Prefactor     16.912        12.077        .18289E-06   -.10137E-04
   3  Prefactor     2.8094        2.8082        .21767E-08    .65004E-05
   4  Prefactor     10.925        11.158        .12578E-06   -.29695E-05
   5  Prefactor     40.093        42.505        .25296E-07   -.77348E-05
   6  Prefactor     .10000E-03    10.706       -.51881E-06** at limit **
   7  Prefactor     59.533        62.338       -.70865E-06   -.12792E-04
   8  Prefactor     .10000E-03    3.6701        .79904E-08** at limit **
   9  norm          .10000E-03    2.2644       -.23386E-07** at limit **
  10  Prefactor     120.70        77.293        .11688E-05    .73632E-05
  11  Prefactor     .10000E-03    60.802        .16786E-06** at limit **
  12  Prefactor     .10000E-03    9.2696       -.52020E-07** at limit **
  13  norm          .10000E-03    4.4852       -.11621E-07** at limit **
  14  norm          .10000E-03    8.8320        .58838E-06** at limit **
  15  norm          .10000E-03    1.5575       -.30997E-07** at limit **
  16  norm          .10000E-03    2.3708       -.28571E-08** at limit **
  17  norm          .10000E-03    1.9028       -.44753E-09** at limit **
  18  Prefactor     .10000E-03    1.0133       -.41562E-09** at limit **
  19  Prefactor     .10000E-03    7.7053       -.21540E-06** at limit **
  20  Prefactor     .10000E-03    17.589       -.18287E-05** at limit **
  21  Prefactor     8.1749        66.794        .30474E-05    .60053E-05
  22  Prefactor     1.2853        117.98        .11938E-04   -.99766E-05
  23  Prefactor     .10000E-03    16.348        .19886E-05** at limit **
  24  Prefactor     42.210        44.601        .65072E-07   -.16225E-04
  25  Prefactor     .10000E-03    108.60        .58857E-06** at limit **
  26  norm          17.342        4.3116        .23895E-07   -.51222E-04
  27  Prefactor     .10000E-03    4.5645        .43737E-07** at limit **
  28  norm          8.8158        24.924        .47937E-06   -.28760E-05
  29  Normalizat    .85556        .22977       -.19118E-05   -.45915E-04
  30  Prefactor     1.2346        .28614        .16008E-06   -.83852E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 3.86789
  Prefactor  = 16.912
  Prefactor  = 2.8094
  Prefactor  = 10.9254
  Prefactor  = 40.0932
  Prefactor  = 0.0001
  Prefactor  = 59.5335
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 120.701
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 8.17492
  Prefactor  = 1.28528
  Prefactor  = 0.0001
  Prefactor  = 42.2103
  Prefactor  = 0.0001
  norm       = 17.3422
  Prefactor  = 0.0001
  norm       = 8.8158
  Normalizat = 0.855558
  Prefactor  = 1.23455
 **********
 **   18 **HESSE 
 **********

 FCN=   3576.414     FROM HESSE     STATUS=OK           578 CALLS     5103 TOTAL
                     EDM=   .45E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.8679        4.8480        .13448E-03   -1.5315    
   2  Prefactor     16.912        12.085        .97389E-04   -1.4885    
   3  Prefactor     2.8094        2.8177        .91769E-04   -1.5373    
   4  Prefactor     10.925        11.157        .12121E-03   -1.5047    
   5  Prefactor     40.093        42.532        .63301E-04   -1.4441    
   6  Prefactor     .10000E-03    10.709        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     59.533        62.404        .51995E-04   -1.4163    
   8  Prefactor     .10000E-03    3.6818        .11188E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    2.2717        .87862E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     120.70        77.391        .18316E-03   -1.3506    
  11  Prefactor     .10000E-03    62.093        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    9.2849        .17782E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    4.5442        .12366E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    8.8444        .17369E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    1.5713        .72863E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    2.3727        .89930E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    1.9052        .80565E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    1.0159        .58782E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    7.7772        .16213E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    17.660        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     8.1749        67.214        .14033E-03   -1.5136    
  22  Prefactor     1.2853        120.65        .38491E-03   -1.5481    
  23  Prefactor     .10000E-03    16.460        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     42.210        44.928        .61741E-04   -1.4408    
  25  Prefactor     .10000E-03    108.85        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          17.342        4.3157        .59379E-04   -1.4875    
  27  Prefactor     .10000E-03    4.6163        .12474E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          8.8158        24.932        .13496E-03   -1.5114    
  29  Normalizat    .85556        .27293        .25331E-03   -.98040    
  30  Prefactor     1.2346        .34412        .27725E-03   -.85275    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.49218e-11
Minuit parameter uncertainties:
  1  4.84848
  2  12.0871
  3  2.81781
  4  11.1591
  5  42.5641
  6  6.71497e-06
  7  62.4724
  8  4.73724e-06
  9  3.23908e-06
  10  77.4559
  11  0.000168923
  12  7.40683e-06
  13  5.28769e-06
  14  1.24721e-05
  15  1.27438e-06
  16  6.98547e-07
  17  8.09261e-07
  18  1.7092e-07
  19  5.19224e-06
  20  4.93756e-05
  21  46.9531
  22  24.9558
  23  5.88025e-05
  24  44.964
  25  0.000109534
  26  4.31574
  27  4.54152e-06
  28  24.9618
  29  0.273365
  30  0.344754
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  7.407e-06  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.235e+00  3.448e-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:  8.556e-01  2.734e-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: 7.96e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.17e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/187991/likelihoodResults_336528001_336787201_4FGL_J1304.0+3704_daily_bin375.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) = 3576.41418124
delta logL = -0.000511888207711

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 3576.41366964
delta logL = -2.81335815089e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10506E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4132       1.0000          .0000       10.000    
     3 'Normalizat'    .85544       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2347       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=   3576.414     FROM MIGRAD    STATUS=CONVERGED     92 CALLS      241 TOTAL
                     EDM=   .73E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10426E-03    7.8158        .18142E-01** at limit **
   2  Index         2.2871        5.3978        .50000        .15917E-04
   3  Normalizat    .85556        .46505E-02    .25331E-03   -.24954E-04
   4  Prefactor     1.2346        .60202E-02    .27725E-03   -.23988E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000104261
  Index      = 2.28708
  Normalizat = 0.855557
  Prefactor  = 1.23455
 **********
 **   18 **HESSE 
 **********

 FCN=   3576.414     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      270 TOTAL
                     EDM=   .15E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10426E-03    146.82        .18923E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.2871        6.1432        .50000       -.57351    
   3  Normalizat    .85556        .20422E-01    .10132E-04   -.98040    
   4  Prefactor     1.2346        .26436E-01    .11090E-04   -.85274    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.47297e-08
Minuit parameter uncertainties:
  1  0.0501469
  2  611.08
  3  0.020422
  4  0.0264363
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/187991': 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) = 3576.41366891
delta logL = 4.46493231721e-07

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.043e-04  5.015e-02  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.287e+00  6.111e+02  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.235e+00  2.644e-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:  8.556e-01  2.042e-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/187991/cmap_HighResolution_336528001_336787201_4FGL_J1304.0+3704_daily_bin375.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.17e-03', job_status='DONE', photon_flux_upper_limit='7.96e-08', time_completed='2021-09-06 19:55:37.894128', job_id='187991', GAL2='1.23', fit_tolerance='1e-08', EG2='0.86', EG='0.86', time_epoch_completed='1630983337.89', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.23', dlogl='4.46e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='375' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:55:37 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0032>
Subject: Job 187991: <4FGL_J1304.0+3704_daily_bin375> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin375> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Mon Sep  6 19:40:25 2021
Job was executed on host(s) <bullet0032>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:41:08 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:41:08 2021
Terminated at Mon Sep  6 19:55:38 2021
Results reported at Mon Sep  6 19:55:38 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin375 196.008 37.071 336528001 336787201 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 :                                   701.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             302.57 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   870 sec.
    Turnaround time :                            913 sec.

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

