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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin829
RA = 196.008, Dec = 37.071
tmin = 454204801, tmax = 454464001
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='190896', job_status='RUN', time_executed='2021-09-06 19:51:18.911782', time_epoch_executed='1630983078.91' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='829'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/190896

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/190896/ft1_4FGL_J1304.0+3704_daily_bin829.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/190896/ft2_4FGL_J1304.0+3704_daily_bin829.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/190896/ft1_4FGL_J1304.0+3704_daily_bin829.fits outfile=/scratch/kocevski/190896/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin829.fits ra=196.008 dec=37.071 rad=12.0 tmin=454204801.0 tmax=454464001.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.62
user 3.41
sys 0.18

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/190896/ft2_4FGL_J1304.0+3704_daily_bin829.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/190896/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin829.fits evtable="EVENTS" outfile="/scratch/kocevski/190896/ft1_filtered_4FGL_J1304.0+3704_daily_bin829.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/190896/ft1_filtered_4FGL_J1304.0+3704_daily_bin829.fits" evtable="EVENTS" scfile=/scratch/kocevski/190896/ft2_4FGL_J1304.0+3704_daily_bin829.fits sctable="SC_DATA" outfile=/scratch/kocevski/190896/ltcube_454204801_454464001_4FGL_J1304.0+3704_daily_bin829.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/190896/ft2_4FGL_J1304.0+3704_daily_bin829.fits
.....................!
real 16.41
user 15.99
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/190896/ft1_filtered_4FGL_J1304.0+3704_daily_bin829.fits evtable="EVENTS" scfile=/scratch/kocevski/190896/ft2_4FGL_J1304.0+3704_daily_bin829.fits sctable="SC_DATA" expcube=/scratch/kocevski/190896/ltcube_454204801_454464001_4FGL_J1304.0+3704_daily_bin829.fits outfile=/scratch/kocevski/190896/expmap_454204801_454464001_4FGL_J1304.0+3704_daily_bin829.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/190896/ltcube_454204801_454464001_4FGL_J1304.0+3704_daily_bin829.fits
.....................!
real 192.89
user 187.49
sys 5.05

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/190896/ft1_filtered_4FGL_J1304.0+3704_daily_bin829.fits scfile=/scratch/kocevski/190896/ft2_4FGL_J1304.0+3704_daily_bin829.fits outfile=/scratch/kocevski/190896/cmap_454204801_454464001_4FGL_J1304.0+3704_daily_bin829.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.39
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/190896/ft1_filtered_4FGL_J1304.0+3704_daily_bin829.fits scfile=/scratch/kocevski/190896/ft2_4FGL_J1304.0+3704_daily_bin829.fits outfile=/scratch/kocevski/190896/cmap_HighResolution_454204801_454464001_4FGL_J1304.0+3704_daily_bin829.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.57
user 0.42
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    11.535       1.0000         .10000E-03   10000.    
     2 'Prefactor '    2.6411       1.0000         .10000E-03   10000.    
     3 'Prefactor '    4.2043       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10174E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10664E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10056E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10015E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    5.8986       1.0000         .10000E-03   10000.    
    15 'norm      '    6.0495       1.0000         .10000E-03   10000.    
    16 'norm      '    .19149E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    7.9410       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .19083E-02   1.0000         .10000E-03   10000.    
    20 'Prefactor '    34.901       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    4.8720       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    6.9623       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    38.615       1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.2944       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .91752       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=   6395.583     FROM MIGRAD    STATUS=CONVERGED    774 CALLS     3347 TOTAL
                     EDM=   .48E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          11.535        5.5394       -.20602E-06   -.48722E-05
   2  Prefactor     2.6406        7.0699        .53802E-06   -.60510E-04
   3  Prefactor     4.2044        3.0719        .47467E-06   -.41697E-03
   4  Prefactor     .10000E-03    3.5069       -.26251E-09** at limit **
   5  Prefactor     .10000E-03    32.957       -.25324E-05** at limit **
   6  Prefactor     .10000E-03    19.985        .35447E-06** at limit **
   7  Prefactor     .10000E-03    150.69       -.12792E-05** at limit **
   8  Prefactor     .10000E-03    2.7917        .46207E-07** at limit **
   9  norm          .10000E-03    2.8865        .18130E-07** at limit **
  10  Prefactor     .10000E-03    22.269        .17112E-05** at limit **
  11  Prefactor     .10000E-03    8.5331        .43775E-06** at limit **
  12  Prefactor     .10000E-03    10.110        .12920E-05** at limit **
  13  norm          .10000E-03    4.9613        .26026E-06** at limit **
  14  norm          5.8986        9.9383        .11992E-06   -.94473E-05
  15  norm          6.0468        4.9713       -.42016E-07    .53362E-03
  16  norm          .10001E-03    5.7470       -.69069E-06** at limit **
  17  norm          .10000E-03    1.4666       -.61406E-07** at limit **
  18  Prefactor     7.9443        5.3430        .58541E-07    .84093E-03
  19  Prefactor     .10002E-03    12.841       -.83256E-06** at limit **
  20  Prefactor     34.881        39.589       -.17612E-05   -.17025E-03
  21  Prefactor     .10000E-03    47.838        .26575E-05** at limit **
  22  Prefactor     4.8716        9.8398        .33151E-05   -.29152E-03
  23  Prefactor     .10000E-03    18.741       -.83346E-06** at limit **
  24  Prefactor     .10000E-03    9.2283       -.13914E-05** at limit **
  25  Prefactor     .10000E-03    45.332        .50441E-07** at limit **
  26  norm          6.9625        2.1529        .26086E-07    .14571E-04
  27  Prefactor     .10000E-03    2.1447       -.61271E-08** at limit **
  28  norm          38.610        22.561        .14336E-06    .29971E-04
  29  Normalizat    1.2943        .18643       -.21454E-06    .11490E-03
  30  Prefactor     .91766        .21965       -.32027E-06    .69060E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 11.5355
  Prefactor  = 2.64063
  Prefactor  = 4.20438
  Prefactor  = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 0.0001
  norm       = 5.89856
  norm       = 6.04684
  norm       = 0.000100012
  norm       = 0.0001
  Prefactor  = 7.94427
  Prefactor  = 0.000100017
  Prefactor  = 34.8811
  Prefactor  = 0.000100003
  Prefactor  = 4.87161
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 6.96246
  Prefactor  = 0.0001
  norm       = 38.6097
  Normalizat = 1.29432
  Prefactor  = 0.917657
 **********
 **   18 **HESSE 
 **********

 FCN=   6395.583     FROM HESSE     STATUS=OK           580 CALLS     3927 TOTAL
                     EDM=   .20E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          11.535        5.5672        .11675E-03   -1.5029    
   2  Prefactor     2.6406        7.0594        .25088E-03   -1.5383    
   3  Prefactor     4.2044        3.0985        .53913E-03   -1.5298    
   4  Prefactor     .10000E-03    3.5104        .14626E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    33.842        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    20.126        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    151.58        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    2.8114        .13048E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    2.9445        .13261E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    22.659        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    8.5613        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    10.339        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    5.0535        .17365E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          5.8986        9.9326        .16535E-03   -1.5222    
  15  norm          6.0468        4.2919        .12977E-03   -1.5216    
  16  norm          .10001E-03    15.131        .31740E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    1.4695        .94540E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     7.9443        4.9888        .12858E-03   -1.5144    
  19  Prefactor     .10002E-03    49.146        .49510E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     34.881        40.422        .67834E-04   -1.4526    
  21  Prefactor     .10000E-03    48.590        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     4.8716        10.152        .91119E-03   -1.5266    
  23  Prefactor     .10000E-03    18.791        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    9.4749        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    45.364        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          6.9625        2.1540        .62926E-04   -1.5180    
  27  Prefactor     .10000E-03    2.1584        .11437E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          38.610        22.571        .64500E-04   -1.4464    
  29  Normalizat    1.2943        .22770        .23643E-03   -.83736    
  30  Prefactor     .91766        .26628        .33086E-03   -.95527    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.01454e-09
Minuit parameter uncertainties:
  1  5.56749
  2  7.06163
  3  3.09862
  4  1.40062e-07
  5  0.000572265
  6  5.95735e-05
  7  0.000650792
  8  2.41727e-07
  9  2.76578e-06
  10  0.00035543
  11  5.36808e-05
  12  0.000160265
  13  8.62514e-07
  14  9.93534
  15  4.29216
  16  0.000844665
  17  3.46748e-06
  18  4.98902
  19  0.00183449
  20  40.454
  21  0.000745728
  22  10.156
  23  0.00011021
  24  0.000182688
  25  4.53235e-06
  26  2.15404
  27  6.95981e-07
  28  22.5758
  29  0.227878
  30  0.266658
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.603e-04  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:  9.177e-01  2.667e-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.294e+00  2.279e-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.50e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.04e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/190896/likelihoodResults_454204801_454464001_4FGL_J1304.0+3704_daily_bin829.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) = 6395.58382905
delta logL = -0.000460717463284

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6395.58336905
delta logL = -7.17168404663e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11205E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4207       1.0000          .0000       10.000    
     3 'Normalizat'    1.2942       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .91782       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=   6395.583     FROM MIGRAD    STATUS=CONVERGED     91 CALLS      248 TOTAL
                     EDM=   .23E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10094E-03    129.18        .18142E-02** at limit **
   2  Index         2.3671        8.6538        .50000        .93502E-05
   3  Normalizat    1.2943        .15915E-01    .23643E-03    .10338E-04
   4  Prefactor     .91766        .19204E-01    .33086E-03    .67692E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100941
  Index      = 2.36706
  Normalizat = 1.29432
  Prefactor  = 0.917657
 **********
 **   18 **HESSE 
 **********

 FCN=   6395.583     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      277 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10094E-03    545.69        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.3671        8.8085        .50000       -.55458    
   3  Normalizat    1.2943        .34539E-01    .94572E-05   -.83736    
   4  Prefactor     .91766        .41674E-01    .13234E-04   -.95527    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.07951e-08
Minuit parameter uncertainties:
  1  0.0457354
  2  979.478
  3  0.0345399
  4  0.0416751
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/190896': 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) = 6395.58336821
delta logL = 1.29914951685e-07

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.009e-04  4.574e-02  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.367e+00  9.795e+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:  9.177e-01  4.168e-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:  1.294e+00  3.454e-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/190896/cmap_HighResolution_454204801_454464001_4FGL_J1304.0+3704_daily_bin829.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.04e-03', job_status='DONE', photon_flux_upper_limit='6.50e-08', time_completed='2021-09-06 20:05:19.709249', job_id='190896', GAL2='0.92', fit_tolerance='1e-08', EG2='1.29', EG='1.29', time_epoch_completed='1630983919.71', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.92', dlogl='1.30e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='829' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:05:19 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0282>
Subject: Job 190896: <4FGL_J1304.0+3704_daily_bin829> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin829> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Mon Sep  6 19:50:28 2021
Job was executed on host(s) <bullet0282>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:51:03 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:51:03 2021
Terminated at Mon Sep  6 20:05:20 2021
Results reported at Mon Sep  6 20:05:20 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin829 196.008 37.071 454204801 454464001 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 :                                   838.35 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             350.32 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   857 sec.
    Turnaround time :                            892 sec.

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

