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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin343
RA = 196.008, Dec = 37.071
tmin = 328233601, tmax = 328492801
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='187945', job_status='RUN', time_executed='2021-09-06 19:41:02.508693', time_epoch_executed='1630982462.51' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='343'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/187945

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/187945/ft1_4FGL_J1304.0+3704_daily_bin343.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/187945/ft2_4FGL_J1304.0+3704_daily_bin343.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/187945/ft1_4FGL_J1304.0+3704_daily_bin343.fits outfile=/scratch/kocevski/187945/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin343.fits ra=196.008 dec=37.071 rad=12.0 tmin=328233601.0 tmax=328492801.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.94
user 3.70
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/187945/ft1_filtered_4FGL_J1304.0+3704_daily_bin343.fits" evtable="EVENTS" scfile=/scratch/kocevski/187945/ft2_4FGL_J1304.0+3704_daily_bin343.fits sctable="SC_DATA" outfile=/scratch/kocevski/187945/ltcube_328233601_328492801_4FGL_J1304.0+3704_daily_bin343.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/187945/ft2_4FGL_J1304.0+3704_daily_bin343.fits
.....................!
real 16.02
user 15.61
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/187945/ft1_filtered_4FGL_J1304.0+3704_daily_bin343.fits evtable="EVENTS" scfile=/scratch/kocevski/187945/ft2_4FGL_J1304.0+3704_daily_bin343.fits sctable="SC_DATA" expcube=/scratch/kocevski/187945/ltcube_328233601_328492801_4FGL_J1304.0+3704_daily_bin343.fits outfile=/scratch/kocevski/187945/expmap_328233601_328492801_4FGL_J1304.0+3704_daily_bin343.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/187945/ltcube_328233601_328492801_4FGL_J1304.0+3704_daily_bin343.fits
.....................!
real 193.74
user 188.46
sys 4.57

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/187945/ft1_filtered_4FGL_J1304.0+3704_daily_bin343.fits scfile=/scratch/kocevski/187945/ft2_4FGL_J1304.0+3704_daily_bin343.fits outfile=/scratch/kocevski/187945/cmap_328233601_328492801_4FGL_J1304.0+3704_daily_bin343.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.55
user 0.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/187945/ft1_filtered_4FGL_J1304.0+3704_daily_bin343.fits scfile=/scratch/kocevski/187945/ft2_4FGL_J1304.0+3704_daily_bin343.fits outfile=/scratch/kocevski/187945/cmap_HighResolution_328233601_328492801_4FGL_J1304.0+3704_daily_bin343.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/187945/ft1_filtered_4FGL_J1304.0+3704_daily_bin343.fits evtable="EVENTS" scfile=/scratch/kocevski/187945/ft2_4FGL_J1304.0+3704_daily_bin343.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/187945/Model_4FGL_J1304.0+3704_daily_bin343.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/187945/ft1_filtered_4FGL_J1304.0+3704_daily_bin343.fits.....................!
real 52.83
user 51.48
sys 1.18

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    3.7225       1.0000         .10000E-03   10000.    
     2 'Prefactor '    4.0985       1.0000         .10000E-03   10000.    
     3 'Prefactor '    6.1968       1.0000         .10000E-03   10000.    
     4 'Prefactor '    6.7390       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10029E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10036E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .19502E-02   1.0000         .10000E-03   10000.    
     9 'norm      '    .82532       1.0000         .10000E-03   10000.    
    10 'Prefactor '    70.344       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .13046E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .56188       1.0000         .10000E-03   10000.    
    14 'norm      '    7.7047       1.0000         .10000E-03   10000.    
    15 'norm      '    2.0470       1.0000         .10000E-03   10000.    
    16 'norm      '    .21833E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    3.4999       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    11.414       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    17.215       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    13.025       1.0000         .10000E-03   10000.    
    25 'Prefactor '    10.502       1.0000         .10000E-03   10000.    
    26 'norm      '    2.5298       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    15.386       1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.0323       1.0000         .10000E-01   10.000    
    30 'Prefactor '    1.0084       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=   6336.909     FROM MIGRAD    STATUS=CONVERGED    771 CALLS     3944 TOTAL
                     EDM=   .36E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.7224        2.9886       -.36647E-07   -.27288E-04
   2  Prefactor     4.0984        4.5683        .40852E-09   -.16314E-05
   3  Prefactor     6.1970        2.8231       -.53873E-07    .10809E-05
   4  Prefactor     6.7394        7.6090        .21687E-05    .28224E-03
   5  Prefactor     .10000E-03    35.971       -.69751E-06** at limit **
   6  Prefactor     .10000E-03    10.712       -.19964E-06** at limit **
   7  Prefactor     .10000E-03    25.960       -.35387E-06** at limit **
   8  Prefactor     .10005E-03    3.2354        .24020E-07** at limit **
   9  norm          .82380        2.3262        .24628E-06    .20007E-03
  10  Prefactor     70.332        50.511        .47133E-06   -.23636E-04
  11  Prefactor     .10000E-03    5.3431       -.11839E-06** at limit **
  12  Prefactor     .10000E-03    47.258       -.18915E-05** at limit **
  13  norm          .56575        3.8399        .32759E-05    .22716E-03
  14  norm          7.7043        7.6299       -.21480E-07   -.91131E-05
  15  norm          2.0439        2.5777        .19741E-06    .24005E-03
  16  norm          .10000E-03    3.9064       -.29607E-06** at limit **
  17  norm          3.4997        3.2158        .69294E-07    .15385E-04
  18  Prefactor     .10000E-03    1.4527       -.78011E-07** at limit **
  19  Prefactor     .10000E-03    4.8488       -.56490E-07** at limit **
  20  Prefactor     11.413        24.681        .16685E-06   -.65729E-06
  21  Prefactor     .10000E-03    17.948        .30195E-06** at limit **
  22  Prefactor     17.213        12.650        .12446E-06    .72688E-06
  23  Prefactor     .10000E-03    20.045       -.18272E-06** at limit **
  24  Prefactor     13.023        20.192        .14429E-06    .14791E-05
  25  Prefactor     10.628        95.553        .23808E-05    .44716E-04
  26  norm          2.5295        1.3845        .11875E-06    .16236E-03
  27  Prefactor     .10000E-03    1.2379       -.10649E-07** at limit **
  28  norm          15.378        16.040        .66872E-06    .16087E-04
  29  Normalizat    1.0327        .17432       -.46486E-05    .25128E-03
  30  Prefactor     1.0079        .21425        .56906E-05   -.96359E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 3.72243
  Prefactor  = 4.0984
  Prefactor  = 6.19696
  Prefactor  = 6.73939
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100046
  norm       = 0.823804
  Prefactor  = 70.3316
  Prefactor  = 0.0001
  Prefactor  = 0.000100002
  norm       = 0.56575
  norm       = 7.70434
  norm       = 2.04395
  norm       = 0.0001
  norm       = 3.4997
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 11.4126
  Prefactor  = 0.0001
  Prefactor  = 17.2132
  Prefactor  = 0.0001
  Prefactor  = 13.0233
  Prefactor  = 10.6283
  norm       = 2.52947
  Prefactor  = 0.0001
  norm       = 15.3779
  Normalizat = 1.03269
  Prefactor  = 1.00792
 **********
 **   18 **HESSE 
 **********

 FCN=   6336.909     FROM HESSE     STATUS=OK           596 CALLS     4540 TOTAL
                     EDM=   .16E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.7224        2.9937        .11593E-03   -1.5322    
   2  Prefactor     4.0984        4.5674        .17461E-03   -1.5303    
   3  Prefactor     6.1970        2.8274        .84621E-04   -1.5210    
   4  Prefactor     6.7394        7.7096        .77283E-03   -1.5189    
   5  Prefactor     .10000E-03    36.301        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    10.742        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    25.980        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10005E-03    54.702        .27281E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .82380        2.0252        .19583E-02   -1.5526    
  10  Prefactor     70.332        50.518        .47862E-04   -1.4029    
  11  Prefactor     .10000E-03    5.3479        .17970E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    49.321        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .56575        3.9532        .30357E-03   -1.5558    
  14  norm          7.7043        7.6333        .14447E-03   -1.5153    
  15  norm          2.0439        2.2889        .12302E-03   -1.5422    
  16  norm          .10000E-03    7.5245        .27356E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          3.4997        3.2111        .13186E-03   -1.5334    
  18  Prefactor     .10000E-03    1.4987        .18716E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    4.8783        .17116E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     11.413        24.647        .11858E-03   -1.5032    
  21  Prefactor     .10000E-03    17.961        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     17.213        12.644        .96532E-04   -1.4878    
  23  Prefactor     .10000E-03    20.126        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     13.023        20.182        .11099E-03   -1.4986    
  25  Prefactor     10.628        94.856        .12364E-03   -1.5056    
  26  norm          2.5295        1.3798        .66933E-04   -1.5390    
  27  Prefactor     .10000E-03    1.2440        .86491E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          15.378        16.022        .10211E-03   -1.4923    
  29  Normalizat    1.0327        .18604        .22041E-03   -.91943    
  30  Prefactor     1.0079        .22971        .28432E-03   -.92466    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.62584e-09
Minuit parameter uncertainties:
  1  2.99378
  2  4.5678
  3  2.82748
  4  7.71069
  5  2.89245e-05
  6  1.30257e-05
  7  7.13665e-05
  8  0.00317658
  9  2.02538
  10  50.5489
  11  4.87661e-06
  12  0.000588825
  13  2.99101
  14  7.63426
  15  2.28897
  16  0.00011881
  17  3.21128
  18  6.98779e-06
  19  4.16798e-07
  20  24.6691
  21  4.30819e-05
  22  12.6464
  23  3.47002e-05
  24  20.1928
  25  63.6374
  26  1.37987
  27  1.82594e-07
  28  16.0264
  29  0.18616
  30  0.229935
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  5.888e-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:  1.008e+00  2.299e-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.033e+00  1.862e-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.04e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.45e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/187945/likelihoodResults_328233601_328492801_4FGL_J1304.0+3704_daily_bin343.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) = 6336.90914262
delta logL = -9.67189653238e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6336.90904602
delta logL = -1.16518094728e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11724E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4776       1.0000          .0000       10.000    
     3 'Normalizat'    1.0327       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0079       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=   6336.909     FROM MIGRAD    STATUS=CONVERGED     59 CALLS      223 TOTAL
                     EDM=   .45E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .28386        .90712E-01** at limit **
   2  Index         2.5168        8.7230        .50000       -.52118E-05
   3  Normalizat    1.0327        .67078E-03    .41905E-01   -.20778E-03
   4  Prefactor     1.0079        .86016E-03    .64284E-01   -.89768E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.51682
  Normalizat = 1.03268
  Prefactor  = 1.00793
 **********
 **   18 **HESSE 
 **********

 FCN=   6336.909     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      256 TOTAL
                     EDM=   .18E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    69.895        .47386E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.5168        6.2576        .50000       -.51972    
   3  Normalizat    1.0327        .43218E-02    .22042E-03   -.91943    
   4  Prefactor     1.0079        .55374E-02    .28431E-03   -.92466    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.84291e-08
Minuit parameter uncertainties:
  1  9.4929e-05
  2  113.741
  3  0.00432176
  4  0.00553737
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/187945': 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) = 6336.90904578
delta logL = 1.24417965708e-07

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  9.493e-05  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.517e+00  1.137e+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.008e+00  5.537e-03  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.033e+00  4.322e-03  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/187945/cmap_HighResolution_328233601_328492801_4FGL_J1304.0+3704_daily_bin343.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.45e-03', job_status='DONE', photon_flux_upper_limit='7.04e-08', time_completed='2021-09-06 19:56:05.944440', job_id='187945', GAL2='1.01', fit_tolerance='1e-08', EG2='1.03', EG='1.03', time_epoch_completed='1630983365.94', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.01', dlogl='1.24e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='343' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:56:05 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0174>
Subject: Job 187945: <4FGL_J1304.0+3704_daily_bin343> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin343> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Mon Sep  6 19:40:22 2021
Job was executed on host(s) <bullet0174>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:40:48 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:40:48 2021
Terminated at Mon Sep  6 19:56:06 2021
Results reported at Mon Sep  6 19:56:06 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin343 196.008 37.071 328233601 328492801 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 :                                   898.48 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             356.76 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   918 sec.
    Turnaround time :                            944 sec.

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

