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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin518
RA = 196.008, Dec = 37.071
tmin = 373593601, tmax = 373852801
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='189383', job_status='RUN', time_executed='2021-09-06 19:46:11.825368', time_epoch_executed='1630982771.83' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='518'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/189383

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/189383/ft1_4FGL_J1304.0+3704_daily_bin518.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/189383/ft2_4FGL_J1304.0+3704_daily_bin518.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/189383/ft1_4FGL_J1304.0+3704_daily_bin518.fits outfile=/scratch/kocevski/189383/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin518.fits ra=196.008 dec=37.071 rad=12.0 tmin=373593601.0 tmax=373852801.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.10
user 2.66
sys 0.20

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/189383/ft1_filtered_4FGL_J1304.0+3704_daily_bin518.fits evtable="EVENTS" scfile=/scratch/kocevski/189383/ft2_4FGL_J1304.0+3704_daily_bin518.fits sctable="SC_DATA" expcube=/scratch/kocevski/189383/ltcube_373593601_373852801_4FGL_J1304.0+3704_daily_bin518.fits outfile=/scratch/kocevski/189383/expmap_373593601_373852801_4FGL_J1304.0+3704_daily_bin518.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/189383/ltcube_373593601_373852801_4FGL_J1304.0+3704_daily_bin518.fits
.....................!
real 164.31
user 152.19
sys 3.38

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/189383/ft1_filtered_4FGL_J1304.0+3704_daily_bin518.fits scfile=/scratch/kocevski/189383/ft2_4FGL_J1304.0+3704_daily_bin518.fits outfile=/scratch/kocevski/189383/cmap_373593601_373852801_4FGL_J1304.0+3704_daily_bin518.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.59
user 0.31
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/189383/ft1_filtered_4FGL_J1304.0+3704_daily_bin518.fits scfile=/scratch/kocevski/189383/ft2_4FGL_J1304.0+3704_daily_bin518.fits outfile=/scratch/kocevski/189383/cmap_HighResolution_373593601_373852801_4FGL_J1304.0+3704_daily_bin518.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.49
user 0.33
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    1.9844       1.0000         .10000E-03   10000.    
     2 'Prefactor '    18.474       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    10.178       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10090E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    21.192       1.0000         .10000E-03   10000.    
     7 'Prefactor '    49.804       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10071E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    3.2678       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    3.9770       1.0000         .10000E-03   10000.    
    14 'norm      '    3.1608       1.0000         .10000E-03   10000.    
    15 'norm      '    13.384       1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    2.8023       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    7.2720       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    15.901       1.0000         .10000E-03   10000.    
    23 'Prefactor '    34.745       1.0000         .10000E-03   10000.    
    24 'Prefactor '    60.892       1.0000         .10000E-03   10000.    
    25 'Prefactor '    199.51       1.0000         .10000E-03   10000.    
    26 'norm      '    5.1367       1.0000         .10000E-03   10000.    
    27 'Prefactor '    1.0673       1.0000         .10000E-03   10000.    
    28 'norm      '    .10008E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    .71730       1.0000         .10000E-01   10.000    
    30 'Prefactor '    1.0561       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=   5051.881     FROM MIGRAD    STATUS=CONVERGED    738 CALLS     3939 TOTAL
                     EDM=   .13E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.9846        2.1527        .25548E-07   -.38576E-04
   2  Prefactor     18.472        9.7295       -.28703E-07   -.11273E-04
   3  Prefactor     .10000E-03    .75661        .28939E-07** at limit **
   4  Prefactor     10.178        9.5422        .48935E-06   -.74033E-04
   5  Prefactor     .10000E-03    39.117        .10024E-05** at limit **
   6  Prefactor     21.195        26.099        .47964E-06    .45634E-04
   7  Prefactor     49.819        64.198        .25512E-05    .13065E-03
   8  Prefactor     .10000E-03    2.9057        .36713E-07** at limit **
   9  norm          .10000E-03    2.3776        .29698E-08** at limit **
  10  Prefactor     .10000E-03    28.351       -.74355E-06** at limit **
  11  Prefactor     3.2390        26.495       -.17681E-05   -.10630E-03
  12  Prefactor     .10000E-03    6.8457       -.52225E-07** at limit **
  13  norm          3.9757        4.5517       -.12873E-06   -.24472E-03
  14  norm          3.1630        11.703        .11865E-04   -.35653E-03
  15  norm          13.383        5.0302        .22057E-07    .31235E-04
  16  norm          .10000E-03    4.0668        .55051E-07** at limit **
  17  norm          2.8031        5.6577        .47635E-06   -.68633E-04
  18  Prefactor     .10000E-03    1.8787       -.12368E-06** at limit **
  19  Prefactor     .10000E-03    29.706        .34822E-06** at limit **
  20  Prefactor     7.2631        33.105       -.20490E-05   -.78507E-04
  21  Prefactor     .10000E-03    17.450       -.51815E-07** at limit **
  22  Prefactor     15.900        18.796        .22114E-06   -.20405E-04
  23  Prefactor     34.743        39.975       -.26053E-08   -.43622E-04
  24  Prefactor     60.885        33.580       -.65323E-06   -.14172E-03
  25  Prefactor     199.43        87.905       -.59569E-05   -.62999E-03
  26  norm          5.1365        1.7827       -.74253E-08    .56641E-04
  27  Prefactor     1.0667        4.5471        .16000E-05   -.11854E-03
  28  norm          .10000E-03    4.8354       -.11716E-06** at limit **
  29  Normalizat    .71792        .17999        .37082E-05   -.23142E-03
  30  Prefactor     1.0553        .22097       -.46602E-05    .14643E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 1.98459
  Prefactor  = 18.4723
  Prefactor  = 0.0001
  Prefactor  = 10.1783
  Prefactor  = 0.0001
  Prefactor  = 21.1946
  Prefactor  = 49.819
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.23898
  Prefactor  = 0.0001
  norm       = 3.97572
  norm       = 3.16297
  norm       = 13.3831
  norm       = 0.0001
  norm       = 2.80306
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 7.26307
  Prefactor  = 0.0001
  Prefactor  = 15.9003
  Prefactor  = 34.7435
  Prefactor  = 60.885
  Prefactor  = 199.426
  norm       = 5.13654
  Prefactor  = 1.06667
  norm       = 0.0001
  Normalizat = 0.71792
  Prefactor  = 1.05528
 **********
 **   18 **HESSE 
 **********

 FCN=   5051.881     FROM HESSE     STATUS=OK           584 CALLS     4523 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.9846        2.1468        .10563E-03   -1.5426    
   2  Prefactor     18.472        9.7368        .93184E-04   -1.4848    
   3  Prefactor     .10000E-03    .76072        .60284E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     10.178        9.5459        .62799E-03   -1.5070    
   5  Prefactor     .10000E-03    39.228        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     21.195        26.079        .87007E-04   -1.4787    
   7  Prefactor     49.819        64.371        .56824E-04   -1.4295    
   8  Prefactor     .10000E-03    2.9115        .11819E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    2.4029        .10677E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    28.399        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     3.2390        26.458        .22402E-03   -1.5348    
  12  Prefactor     .10000E-03    6.8568        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          3.9757        4.5397        .15556E-03   -1.5309    
  14  norm          3.1630        11.953        .11399E-02   -1.5352    
  15  norm          13.383        5.0024        .90014E-04   -1.4976    
  16  norm          .10000E-03    4.0791        .13976E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          2.8031        5.6332        .22504E-03   -1.5373    
  18  Prefactor     .10000E-03    1.9127        .94914E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    30.332        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     7.2631        32.967        .14874E-03   -1.5169    
  21  Prefactor     .10000E-03    17.454        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     15.900        18.769        .10044E-03   -1.4910    
  23  Prefactor     34.743        39.898        .67985E-04   -1.4528    
  24  Prefactor     60.885        33.598        .51419E-04   -1.4146    
  25  Prefactor     199.43        92.698        .14303E-03   -1.2874    
  26  norm          5.1365        1.7830        .27033E-03   -1.5255    
  27  Prefactor     1.0667        4.5681        .28933E-03   -1.5501    
  28  norm          .10000E-03    4.8387        .15264E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    .71792        .20643        .24804E-03   -1.0319    
  30  Prefactor     1.0553        .25348        .26666E-03   -.90909    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.10609e-09
Minuit parameter uncertainties:
  1  2.14691
  2  9.73759
  3  7.0081e-08
  4  9.54733
  5  0.00012808
  6  26.0926
  7  64.4608
  8  1.39125e-06
  9  1.58421e-07
  10  0.000230408
  11  18.5255
  12  1.11937e-06
  13  4.54014
  14  11.9617
  15  5.00259
  16  4.25035e-06
  17  5.63428
  18  3.27996e-06
  19  6.90302e-05
  20  30.9758
  21  1.51454e-05
  22  18.7763
  23  39.9286
  24  33.6082
  25  92.7658
  26  1.783
  27  4.4152
  28  6.59071e-06
  29  0.206656
  30  0.253767
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.119e-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.055e+00  2.538e-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:  7.179e-01  2.067e-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: 6.05e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.68e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/189383/likelihoodResults_373593601_373852801_4FGL_J1304.0+3704_daily_bin518.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) = 5051.88191358
delta logL = -0.000693860340107

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5051.88121971
delta logL = 2.93584889732e-09

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4302       1.0000          .0000       10.000    
     3 'Normalizat'    .71793       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0553       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=   5051.881     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      205 TOTAL
                     EDM=   .54E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    7.2971        .90712E-02** at limit **
   2  Index         2.4247        6.2123        .50000        .69454E-05
   3  Normalizat    .71793        .16397        .42529E-01    .55278E-05
   4  Prefactor     1.0553        .21123        .60300E-01    .76757E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.42472
  Normalizat = 0.717925
  Prefactor  = 1.05528
 **********
 **   18 **HESSE 
 **********

 FCN=   5051.881     FROM HESSE     STATUS=OK            33 CALLS      238 TOTAL
                     EDM=   .31E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    50.388        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4247        6.5686        .50000       -.54107    
   3  Normalizat    .71793        .19130        .24803E-03   -1.0319    
   4  Prefactor     1.0553        .24637        .26666E-03   -.90909    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.07902e-10
Minuit parameter uncertainties:
  1  1.97129e-05
  2  11.628
  3  0.191479
  4  0.246635
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/189383': 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) = 5051.8812197
delta logL = 1.86237230082e-08

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.971e-05  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.425e+00  1.163e+01  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.055e+00  2.466e-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:  7.179e-01  1.915e-01  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/189383/cmap_HighResolution_373593601_373852801_4FGL_J1304.0+3704_daily_bin518.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.68e-03', job_status='DONE', photon_flux_upper_limit='6.05e-08', time_completed='2021-09-06 19:57:44.795243', job_id='189383', GAL2='1.06', fit_tolerance='1e-08', EG2='0.72', EG='0.72', time_epoch_completed='1630983464.8', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.06', dlogl='1.86e-08', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='518' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:57:44 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0168>
Subject: Job 189383: <4FGL_J1304.0+3704_daily_bin518> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin518> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Mon Sep  6 19:45:27 2021
Job was executed on host(s) <bullet0168>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:45:55 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:45:55 2021
Terminated at Mon Sep  6 19:57:45 2021
Results reported at Mon Sep  6 19:57:45 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin518 196.008 37.071 373593601 373852801 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 :                                   646.38 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             292.67 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   710 sec.
    Turnaround time :                            738 sec.

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

