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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin634
RA = 196.008, Dec = 37.071
tmin = 403660801, tmax = 403920001
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='189550', job_status='RUN', time_executed='2021-09-06 19:48:34.456525', time_epoch_executed='1630982914.46' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='634'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/189550

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/189550/ft1_4FGL_J1304.0+3704_daily_bin634.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/189550/ft2_4FGL_J1304.0+3704_daily_bin634.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/189550/ft1_4FGL_J1304.0+3704_daily_bin634.fits outfile=/scratch/kocevski/189550/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin634.fits ra=196.008 dec=37.071 rad=12.0 tmin=403660801.0 tmax=403920001.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 7.68
user 7.37
sys 0.29

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/189550/ft2_4FGL_J1304.0+3704_daily_bin634.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/189550/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin634.fits evtable="EVENTS" outfile="/scratch/kocevski/189550/ft1_filtered_4FGL_J1304.0+3704_daily_bin634.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.35
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/189550/ft1_filtered_4FGL_J1304.0+3704_daily_bin634.fits" evtable="EVENTS" scfile=/scratch/kocevski/189550/ft2_4FGL_J1304.0+3704_daily_bin634.fits sctable="SC_DATA" outfile=/scratch/kocevski/189550/ltcube_403660801_403920001_4FGL_J1304.0+3704_daily_bin634.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/189550/ft2_4FGL_J1304.0+3704_daily_bin634.fits
.....................!
real 14.77
user 14.41
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/189550/ft1_filtered_4FGL_J1304.0+3704_daily_bin634.fits evtable="EVENTS" scfile=/scratch/kocevski/189550/ft2_4FGL_J1304.0+3704_daily_bin634.fits sctable="SC_DATA" expcube=/scratch/kocevski/189550/ltcube_403660801_403920001_4FGL_J1304.0+3704_daily_bin634.fits outfile=/scratch/kocevski/189550/expmap_403660801_403920001_4FGL_J1304.0+3704_daily_bin634.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/189550/ltcube_403660801_403920001_4FGL_J1304.0+3704_daily_bin634.fits
.....................!
real 192.85
user 188.04
sys 4.28

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/189550/ft1_filtered_4FGL_J1304.0+3704_daily_bin634.fits scfile=/scratch/kocevski/189550/ft2_4FGL_J1304.0+3704_daily_bin634.fits outfile=/scratch/kocevski/189550/cmap_403660801_403920001_4FGL_J1304.0+3704_daily_bin634.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.57
user 0.39
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/189550/ft1_filtered_4FGL_J1304.0+3704_daily_bin634.fits scfile=/scratch/kocevski/189550/ft2_4FGL_J1304.0+3704_daily_bin634.fits outfile=/scratch/kocevski/189550/cmap_HighResolution_403660801_403920001_4FGL_J1304.0+3704_daily_bin634.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.59
user 0.40
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    21.048       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    9.6888       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10746E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .72722       1.0000         .10000E-03   10000.    
     9 'norm      '    3.1778       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10420E-01   1.0000         .10000E-03   10000.    
    11 'Prefactor '    10.530       1.0000         .10000E-03   10000.    
    12 'Prefactor '    16.950       1.0000         .10000E-03   10000.    
    13 'norm      '    .17691       1.0000         .10000E-03   10000.    
    14 'norm      '    .10626E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    3.1607       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    110.83       1.0000         .10000E-03   10000.    
    21 'Prefactor '    29.072       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10430E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10059E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    17.707       1.0000         .10000E-03   10000.    
    27 'Prefactor '    4.8289       1.0000         .10000E-03   10000.    
    28 'norm      '    9.0898       1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.0609       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .87861       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=   4917.886     FROM MIGRAD    STATUS=CONVERGED    795 CALLS     3950 TOTAL
                     EDM=   .48E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          21.039        7.8679       -.50779E-07   -.12121E-03
   2  Prefactor     .10000E-03    3.7567        .46255E-08** at limit **
   3  Prefactor     .10000E-03    3.2479        .67758E-07** at limit **
   4  Prefactor     9.6959        15.115        .17821E-05    .25237E-03
   5  Prefactor     .10000E-03    11.908       -.22055E-06** at limit **
   6  Prefactor     .10000E-03    12.455       -.39215E-06** at limit **
   7  Prefactor     .10000E-03    149.54        .18214E-05** at limit **
   8  Prefactor     .72823        10.169        .32323E-05   -.20706E-03
   9  norm          3.1786        6.0375        .49166E-06    .25069E-04
  10  Prefactor     .10001E-03    555.03       -.94507E-05** at limit **
  11  Prefactor     10.541        20.643        .19843E-05    .25148E-03
  12  Prefactor     16.952        15.795       -.23724E-06    .71653E-04
  13  norm          .17831        3.9540       -.28200E-06    .31054E-05
  14  norm          .10000E-03    10.877        .12324E-06** at limit **
  15  norm          .10000E-03    1.8583        .11307E-06** at limit **
  16  norm          .10000E-03    2.2663        .47851E-07** at limit **
  17  norm          3.1624        3.9014        .20915E-05   -.58968E-03
  18  Prefactor     .10000E-03    .91497        .21893E-07** at limit **
  19  Prefactor     .10000E-03    4.9454        .21859E-07** at limit **
  20  Prefactor     110.79        55.406       -.10352E-05   -.71438E-04
  21  Prefactor     29.080        33.637       -.54955E-06   -.69260E-04
  22  Prefactor     .10000E-03    7.9005       -.12915E-07** at limit **
  23  Prefactor     .10000E-03    24.169       -.30280E-06** at limit **
  24  Prefactor     .10000E-03    13.706        .26215E-06** at limit **
  25  Prefactor     .10000E-03    33.365        .58769E-06** at limit **
  26  norm          17.709        3.2930        .34492E-07   -.40369E-05
  27  Prefactor     4.8303        5.3611        .63993E-06    .30801E-03
  28  norm          9.1038        14.084        .17076E-05    .27846E-03
  29  Normalizat    1.0609        .19453       -.10181E-05   -.67213E-05
  30  Prefactor     .87839        .23324       -.68767E-06   -.26502E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 21.0387
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.69593
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.728227
  norm       = 3.17863
  Prefactor  = 0.000100008
  Prefactor  = 10.541
  Prefactor  = 16.9518
  norm       = 0.178307
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 3.16235
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 110.787
  Prefactor  = 29.0802
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 17.7088
  Prefactor  = 4.8303
  norm       = 9.10383
  Normalizat = 1.06087
  Prefactor  = 0.878391
 **********
 **   18 **HESSE 
 **********

 FCN=   4917.886     FROM HESSE     STATUS=OK           582 CALLS     4532 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          21.039        7.2096        .87305E-04   -1.4790    
   2  Prefactor     .10000E-03    3.7635        .13274E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    7.1184        .22440E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     9.6959        15.301        .12874E-03   -1.5085    
   5  Prefactor     .10000E-03    11.919        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    12.480        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    149.86        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .72823        10.682        .42586E-03   -1.5537    
   9  norm          3.1786        5.9952        .21583E-03   -1.5351    
  10  Prefactor     .10001E-03    579.12        .36300E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     10.541        21.035        .12347E-03   -1.5059    
  12  Prefactor     16.952        15.839        .97283E-04   -1.4884    
  13  norm          .17831        14.406        .26311E-02   -1.5624    
  14  norm          .10000E-03    10.922        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    1.8735        .93260E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    2.2708        .10309E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          3.1624        3.9609        .75270E-03   -1.5352    
  18  Prefactor     .10000E-03    .91662        .65497E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    4.9508        .15231E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     110.79        55.417        .38209E-04   -1.3599    
  21  Prefactor     29.080        33.692        .74306E-04   -1.4629    
  22  Prefactor     .10000E-03    7.9160        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    24.187        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    13.727        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    33.421        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          17.709        3.2946        .52886E-04   -1.4866    
  27  Prefactor     4.8303        5.3829        .16655E-03   -1.5268    
  28  norm          9.1038        14.293        .13294E-03   -1.5104    
  29  Normalizat    1.0609        .22874        .23811E-03   -.91018    
  30  Prefactor     .87839        .27398        .31263E-03   -.96900    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.15182e-09
Minuit parameter uncertainties:
  1  7.20985
  2  3.67072e-06
  3  2.2649e-05
  4  15.3074
  5  2.37585e-05
  6  4.30469e-05
  7  0.000722654
  8  5.57885
  9  5.99635
  10  0.0042878
  11  21.0502
  12  15.8431
  13  3.20533
  14  3.79858e-05
  15  4.16493e-06
  16  2.76407e-06
  17  3.96125
  18  1.29469e-07
  19  1.80716e-07
  20  55.4425
  21  33.7144
  22  2.52423e-06
  23  3.27901e-05
  24  4.35076e-05
  25  0.000146223
  26  3.29463
  27  5.38341
  28  14.2981
  29  0.228955
  30  0.274411
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.695e+01  1.584e+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:  8.784e-01  2.744e-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.061e+00  2.290e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.53
Ra Dec: 196.008 37.071
Photon Index (Fixed Index): 2.44 +/- 0.00
Photon Flux (Fixed Index): 3.48e-08 +/- 3.25e-08
Energy Flux (Fixed Index): 1.09e-05 +/- 1.02e-05

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

Saving results to:
/scratch/kocevski/189550/likelihoodResults_403660801_403920001_4FGL_J1304.0+3704_daily_bin634.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) = 4917.54368291
delta logL = 0.34242385119

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4917.54281767
delta logL = 0.343289090843

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    25.133       1.0000         .10000E-03   10000.    
     2 'Index     '    1.8105       1.0000          .0000       10.000    
     3 'Normalizat'    1.0766       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .86588       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=   4917.543     FROM MIGRAD    STATUS=CONVERGED     47 CALLS      261 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     25.133        65.404        .19976E-02    .17328E-03
   2  Index         1.8105        1.5992        .19674       -.38043E-04
   3  Normalizat    1.0767        .19743        .39042E-01    .55867E-05
   4  Prefactor     .86581        .23552        .71106E-01    .13251E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 25.1326
  Index      = 1.81046
  Normalizat = 1.07669
  Prefactor  = 0.865808
 **********
 **   18 **HESSE 
 **********

 FCN=   4917.543     FROM HESSE     STATUS=OK            31 CALLS      292 TOTAL
                     EDM=   .13E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     25.133        23.191        .79905E-04   -1.4705    
   2  Index         1.8105        .69859        .10196E-01   -.69178    
   3  Normalizat    1.0767        .22435        .23654E-03   -.90504    
   4  Prefactor     .86581        .27105        .31462E-03   -.97346    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.33246e-10
Minuit parameter uncertainties:
  1  23.1988
  2  0.702484
  3  0.22455
  4  0.271469
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/189550': 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) = 4917.54281764
delta logL = 0.343289122536

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  2.513e+01  2.320e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  1.810e+00  7.025e-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:  8.658e-01  2.715e-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.077e+00  2.246e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.21
Ra Dec: 196.008 37.071
Photon Index (Free Index): 1.81 +/- 0.70
Photon Flux (Free Index): 2.11e-08 +/- 2.47e-08
Energy Flux (Free Index): 2.45e-05 +/- 4.05e-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/189550/cmap_HighResolution_403660801_403920001_4FGL_J1304.0+3704_daily_bin634.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.11e-03', comment='SUCCESS', photon_flux='3.48e-08', energy_flux2='2.45e-05', photon_flux_error='3.25e-08', dlogl='3.43e-01', energy_flux='1.09e-05', photon_flux2='2.11e-08', job_status='DONE', time_completed='2021-09-06 20:01:44.297743', photon_index_error2='0.70', photon_index2='1.81', ts='3.53', fit_tolerance='1e-08', GAL='0.88', photon_index_error='0.00', photon_flux_upper_limit='1.18e-07', energy_flux_error2='4.05e-05', EG='1.06', time_epoch_completed='1630983704.3', return_code='0', job_id='189550', GAL2='0.87', EG2='1.08', return_code2='0', energy_flux_error='1.02e-05', photon_flux_error2='2.47e-08', ts2='4.21', photon_index='2.44' WHERE bin_id='634' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:01:44 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0206>
Subject: Job 189550: <4FGL_J1304.0+3704_daily_bin634> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin634 196.008 37.071 403660801 403920001 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 :                                   786.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             307.60 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   924 sec.
    Turnaround time :                            967 sec.

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

