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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin1593
RA = 196.008, Dec = 37.071
tmin = 652233601, tmax = 652492801
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='195331', job_status='RUN', time_executed='2021-09-06 20:06:37.752589', time_epoch_executed='1630983997.75' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='1593'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/195331

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/195331/ft1_4FGL_J1304.0+3704_daily_bin1593.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/195331/ft2_4FGL_J1304.0+3704_daily_bin1593.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/195331/ft1_4FGL_J1304.0+3704_daily_bin1593.fits outfile=/scratch/kocevski/195331/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin1593.fits ra=196.008 dec=37.071 rad=12.0 tmin=652233601.0 tmax=652492801.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 4.48
user 4.22
sys 0.23

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/195331/ft1_filtered_4FGL_J1304.0+3704_daily_bin1593.fits evtable="EVENTS" scfile=/scratch/kocevski/195331/ft2_4FGL_J1304.0+3704_daily_bin1593.fits sctable="SC_DATA" expcube=/scratch/kocevski/195331/ltcube_652233601_652492801_4FGL_J1304.0+3704_daily_bin1593.fits outfile=/scratch/kocevski/195331/expmap_652233601_652492801_4FGL_J1304.0+3704_daily_bin1593.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/195331/ltcube_652233601_652492801_4FGL_J1304.0+3704_daily_bin1593.fits
.....................!
real 192.69
user 186.69
sys 5.30

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/195331/ft1_filtered_4FGL_J1304.0+3704_daily_bin1593.fits scfile=/scratch/kocevski/195331/ft2_4FGL_J1304.0+3704_daily_bin1593.fits outfile=/scratch/kocevski/195331/cmap_652233601_652492801_4FGL_J1304.0+3704_daily_bin1593.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.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/195331/ft1_filtered_4FGL_J1304.0+3704_daily_bin1593.fits scfile=/scratch/kocevski/195331/ft2_4FGL_J1304.0+3704_daily_bin1593.fits outfile=/scratch/kocevski/195331/cmap_HighResolution_652233601_652492801_4FGL_J1304.0+3704_daily_bin1593.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.39
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    5.0921       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    8.1177       1.0000         .10000E-03   10000.    
     5 'Prefactor '    27.107       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10539E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    15.800       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    30.953       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10026E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10016E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .71955E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    8.7781       1.0000         .10000E-03   10000.    
    17 'norm      '    3.3906       1.0000         .10000E-03   10000.    
    18 'Prefactor '    2.8150       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10255E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    40.841       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .46032       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .76828E-02   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .21712E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10066E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    1.0828       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    .10014E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.2721       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .57048       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=   5763.430     FROM MIGRAD    STATUS=CONVERGED    853 CALLS     4057 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          5.0935        3.8790        .76968E-06    .99896E-03
   2  Prefactor     .10000E-03    2.9545       -.19976E-07** at limit **
   3  Prefactor     .10000E-03    1.7700       -.56363E-06** at limit **
   4  Prefactor     8.1170        7.6469       -.56928E-07    .25157E-04
   5  Prefactor     27.104        23.807        .44349E-06    .79324E-04
   6  Prefactor     .10000E-03    7.4437       -.41047E-07** at limit **
   7  Prefactor     .10000E-03    31.229       -.13666E-07** at limit **
   8  Prefactor     .10000E-03    1.9261       -.82844E-07** at limit **
   9  norm          15.801        6.4755        .49468E-06    .76140E-03
  10  Prefactor     .10000E-03    10.424        .21580E-07** at limit **
  11  Prefactor     30.937        29.397       -.16346E-05   -.10399E-03
  12  Prefactor     .10000E-03    3.7101       -.82044E-07** at limit **
  13  norm          .10000E-03    1.6390       -.14847E-06** at limit **
  14  norm          .10000E-03    4.5292        .16139E-07** at limit **
  15  norm          .10000E-03    2.1386       -.72205E-06** at limit **
  16  norm          8.7771        6.3716        .93945E-06    .10529E-02
  17  norm          3.3898        2.8542       -.63958E-07   -.27483E-03
  18  Prefactor     2.8204        3.3332        .69240E-06    .96532E-03
  19  Prefactor     .10000E-03    17.655       -.30154E-06** at limit **
  20  Prefactor     40.902        37.340       -.75225E-06   -.30199E-03
  21  Prefactor     .10433E-03    49.352       -.16141E-05** at limit **
  22  Prefactor     .10000E-03    5.7077       -.83053E-08** at limit **
  23  Prefactor     .10555E-03    54.836        .85705E-05** at limit **
  24  Prefactor     .10000E-03    61.211        .42849E-08** at limit **
  25  Prefactor     .10000E-03    18.985        .53076E-07** at limit **
  26  norm          1.0829        .88416       -.59134E-07   -.76073E-03
  27  Prefactor     .10000E-03    1.9802        .59200E-10** at limit **
  28  norm          .10000E-03    8.4894        .26159E-08** at limit **
  29  Normalizat    1.2721        .16963        .15564E-06   -.49802E-04
  30  Prefactor     .57065        .20578       -.80055E-06   -.56435E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 5.0935
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 8.11701
  Prefactor  = 27.1036
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 15.8009
  Prefactor  = 0.0001
  Prefactor  = 30.9374
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.000100001
  norm       = 8.77707
  norm       = 3.3898
  Prefactor  = 2.82043
  Prefactor  = 0.0001
  Prefactor  = 40.9022
  Prefactor  = 0.000104326
  Prefactor  = 0.0001
  Prefactor  = 0.000105548
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.08295
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 1.27208
  Prefactor  = 0.570645
 **********
 **   18 **HESSE 
 **********

 FCN=   5763.430     FROM HESSE     STATUS=OK           586 CALLS     4643 TOTAL
                     EDM=   .19E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          5.0935        3.7807        .61570E-03   -1.5257    
   2  Prefactor     .10000E-03    2.9641        .12743E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    3.1428        .18742E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     8.1170        7.6409        .14072E-03   -1.5138    
   5  Prefactor     27.104        23.819        .76946E-04   -1.4666    
   6  Prefactor     .10000E-03    7.4565        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    31.244        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    1.9362        .10288E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          15.801        6.4983        .10076E-03   -1.4913    
  10  Prefactor     .10000E-03    10.425        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     30.937        29.193        .72017E-04   -1.4595    
  12  Prefactor     .10000E-03    3.7127        .14281E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    1.6470        .94893E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    4.5350        .15779E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    20.443        .18878E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          8.7771        6.1595        .13529E-03   -1.5115    
  17  norm          3.3898        2.8522        .11425E-03   -1.5340    
  18  Prefactor     2.8204        3.3476        .13694E-03   -1.5372    
  19  Prefactor     .10000E-03    17.864        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     40.902        36.145        .62724E-04   -1.4428    
  21  Prefactor     .10433E-03    51.842        .14965       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    5.7242        .17713E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10555E-03    282.16        .80956E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    63.648        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    19.000        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          1.0829        .88741        .62655E-04   -1.5500    
  27  Prefactor     .10000E-03    1.9980        .10431E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .10000E-03    8.5217        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.2721        .19375        .19437E-03   -.84404    
  30  Prefactor     .57065        .23304        .34392E-03   -1.0884    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.93254e-08
Minuit parameter uncertainties:
  1  3.78091
  2  1.0281e-06
  3  5.31549e-05
  4  7.64177
  5  23.8276
  6  1.1648e-06
  7  9.4033e-06
  8  2.40148e-06
  9  6.49859
  10  1.8242e-06
  11  29.2067
  12  3.9532e-06
  13  5.20302e-06
  14  1.42142e-06
  15  0.000240446
  16  6.15997
  17  2.85229
  18  3.34786
  19  9.83982e-05
  20  36.1642
  21  0.0299779
  22  3.83926e-07
  23  0.0795091
  24  2.18831e-05
  25  1.09806e-05
  26  0.887424
  27  2.91974e-07
  28  3.44368e-07
  29  0.193865
  30  0.233438
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  3.953e-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:  5.706e-01  2.334e-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.272e+00  1.939e-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: 4.08e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.16e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/195331/likelihoodResults_652233601_652492801_4FGL_J1304.0+3704_daily_bin1593.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) = 5763.43105123
delta logL = -0.00126393662049

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5763.42978767
delta logL = -3.73747752747e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10309E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4159       1.0000          .0000       10.000    
     3 'Normalizat'    1.2722       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .57051       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=   5763.430     FROM MIGRAD    STATUS=CONVERGED    100 CALLS      251 TOTAL
                     EDM=   .46E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    16.745        .14507E-01** at limit **
   2  Index         1.8093        6.2764        .50000        .42446E-06
   3  Normalizat    1.2721        .72000E-02    .19437E-03    .14843E-02
   4  Prefactor     .57065        .88816E-02    .34392E-03    .84413E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.8093
  Normalizat = 1.27208
  Prefactor  = 0.570648
 **********
 **   18 **HESSE 
 **********

 FCN=   5763.430     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      280 TOTAL
                     EDM=   .42E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    152.29        .16442E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.8093        5.6842        .50000       -.69208    
   3  Normalizat    1.2721        .22429E-01    .38875E-04   -.84404    
   4  Prefactor     .57065        .27667E-01    .68784E-04   -1.0884    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.22649e-09
Minuit parameter uncertainties:
  1  0.000160813
  2  724.404
  3  0.0224294
  4  0.027668
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/195331': 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) = 5763.429784
delta logL = 3.30109105562e-06

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.608e-04  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  1.809e+00  7.244e+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:  5.706e-01  2.767e-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.272e+00  2.243e-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/195331/cmap_HighResolution_652233601_652492801_4FGL_J1304.0+3704_daily_bin1593.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.16e-03', job_status='DONE', photon_flux_upper_limit='4.08e-08', time_completed='2021-09-06 20:21:26.411794', job_id='195331', GAL2='0.57', fit_tolerance='1e-08', EG2='1.27', EG='1.27', time_epoch_completed='1630984886.41', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.57', dlogl='3.30e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='1593' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:21:26 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0304>
Subject: Job 195331: <4FGL_J1304.0+3704_daily_bin1593> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin1593> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Mon Sep  6 20:05:37 2021
Job was executed on host(s) <bullet0304>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 20:06:24 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 20:06:24 2021
Terminated at Mon Sep  6 20:21:27 2021
Results reported at Mon Sep  6 20:21:27 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin1593 196.008 37.071 652233601 652492801 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 :                                   876.22 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             321.42 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   904 sec.
    Turnaround time :                            950 sec.

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

