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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin655
RA = 196.008, Dec = 37.071
tmin = 409104001, tmax = 409363201
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='189581', job_status='RUN', time_executed='2021-09-06 19:49:19.895841', time_epoch_executed='1630982959.9' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='655'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/189581

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/189581/ft1_4FGL_J1304.0+3704_daily_bin655.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/189581/ft2_4FGL_J1304.0+3704_daily_bin655.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/189581/ft1_4FGL_J1304.0+3704_daily_bin655.fits outfile=/scratch/kocevski/189581/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin655.fits ra=196.008 dec=37.071 rad=12.0 tmin=409104001.0 tmax=409363201.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 5.58
user 5.28
sys 0.23

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/189581/ft1_filtered_4FGL_J1304.0+3704_daily_bin655.fits evtable="EVENTS" scfile=/scratch/kocevski/189581/ft2_4FGL_J1304.0+3704_daily_bin655.fits sctable="SC_DATA" expcube=/scratch/kocevski/189581/ltcube_409104001_409363201_4FGL_J1304.0+3704_daily_bin655.fits outfile=/scratch/kocevski/189581/expmap_409104001_409363201_4FGL_J1304.0+3704_daily_bin655.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/189581/ltcube_409104001_409363201_4FGL_J1304.0+3704_daily_bin655.fits
.....................!
real 191.08
user 185.93
sys 4.48

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/189581/ft1_filtered_4FGL_J1304.0+3704_daily_bin655.fits scfile=/scratch/kocevski/189581/ft2_4FGL_J1304.0+3704_daily_bin655.fits outfile=/scratch/kocevski/189581/cmap_409104001_409363201_4FGL_J1304.0+3704_daily_bin655.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.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/189581/ft1_filtered_4FGL_J1304.0+3704_daily_bin655.fits scfile=/scratch/kocevski/189581/ft2_4FGL_J1304.0+3704_daily_bin655.fits outfile=/scratch/kocevski/189581/cmap_HighResolution_409104001_409363201_4FGL_J1304.0+3704_daily_bin655.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.58
user 0.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    3.0985       1.0000         .10000E-03   10000.    
     2 'Prefactor '    7.8937       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10056E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10279E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10290E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    21.732       1.0000         .10000E-03   10000.    
    11 'Prefactor '    13.175       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10012E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    30.673       1.0000         .10000E-03   10000.    
    15 'norm      '    1.3076       1.0000         .10000E-03   10000.    
    16 'norm      '    10.567       1.0000         .10000E-03   10000.    
    17 'norm      '    .87904E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    49.812       1.0000         .10000E-03   10000.    
    21 'Prefactor '    44.316       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .20497E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .11740E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    18.353       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    13.870       1.0000         .10000E-03   10000.    
    27 'Prefactor '    1.4423       1.0000         .10000E-03   10000.    
    28 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.1939       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .87585       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=   4581.366     FROM MIGRAD    STATUS=CONVERGED    770 CALLS     3897 TOTAL
                     EDM=   .66E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.0986        3.2464       -.69764E-08    .18924E-05
   2  Prefactor     7.8946        9.1798        .20599E-08   -.86844E-05
   3  Prefactor     .10000E-03    .90963        .17878E-07** at limit **
   4  Prefactor     .10000E-03    3.5249        .22511E-07** at limit **
   5  Prefactor     .10000E-03    18.514       -.18036E-07** at limit **
   6  Prefactor     .10000E-03    6.9405        .20191E-07** at limit **
   7  Prefactor     .10000E-03    117.00        .65822E-06** at limit **
   8  Prefactor     .10000E-03    2.0647        .21936E-07** at limit **
   9  norm          .10000E-03    2.8077        .41058E-08** at limit **
  10  Prefactor     21.709        41.874       -.12197E-06   -.32601E-04
  11  Prefactor     13.185        24.511       -.18183E-05   -.85154E-04
  12  Prefactor     .10000E-03    15.849        .16609E-06** at limit **
  13  norm          .10000E-03    1.9642        .29758E-07** at limit **
  14  norm          30.672        23.006        .44462E-07    .37325E-05
  15  norm          1.2880        11.317        .57567E-05   -.69959E-04
  16  norm          10.603        14.441       -.33516E-05   -.35123E-03
  17  norm          .10008E-03    3.0858       -.67113E-06** at limit **
  18  Prefactor     .10000E-03    1.0985        .76301E-08** at limit **
  19  Prefactor     .10000E-03    4.2570       -.19548E-07** at limit **
  20  Prefactor     49.762        49.231        .11919E-05   -.13240E-03
  21  Prefactor     44.330        48.536       -.18466E-06    .21858E-04
  22  Prefactor     .10000E-03    29.372       -.11534E-05** at limit **
  23  Prefactor     .10000E-03    44.661       -.21565E-05** at limit **
  24  Prefactor     18.281        33.431       -.50135E-06   -.85694E-04
  25  Prefactor     .10000E-03    41.001       -.22703E-07** at limit **
  26  norm          13.870        2.9795       -.13628E-08    .29032E-04
  27  Prefactor     1.4449        4.8354        .64943E-06   -.18919E-03
  28  norm          .10000E-03    6.6369        .35283E-07** at limit **
  29  Normalizat    1.1934        .20415        .66700E-06   -.24885E-03
  30  Prefactor     .87649        .24636       -.11374E-05   -.27174E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 3.09856
  Prefactor  = 7.8946
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 21.7091
  Prefactor  = 13.1854
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 30.6721
  norm       = 1.28805
  norm       = 10.6025
  norm       = 0.000100075
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 49.7622
  Prefactor  = 44.3301
  Prefactor  = 0.000100001
  Prefactor  = 0.000100001
  Prefactor  = 18.2806
  Prefactor  = 0.0001
  norm       = 13.8704
  Prefactor  = 1.44492
  norm       = 0.0001
  Normalizat = 1.19339
  Prefactor  = 0.876491
 **********
 **   18 **HESSE 
 **********

 FCN=   4581.366     FROM HESSE     STATUS=OK           582 CALLS     4479 TOTAL
                     EDM=   .40E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.0986        3.2453        .12143E-03   -1.5356    
   2  Prefactor     7.8946        9.1880        .14272E-03   -1.5146    
   3  Prefactor     .10000E-03    .91231        .63009E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    3.5268        .12411E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    18.597        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    6.9414        .17416E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    116.98        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    2.0663        .94979E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    2.8302        .11067E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     21.709        41.857        .85920E-04   -1.4776    
  11  Prefactor     13.185        24.550        .11035E-03   -1.4982    
  12  Prefactor     .10000E-03    15.943        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    1.9666        .92632E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          30.672        23.007        .72345E-04   -1.4600    
  15  norm          1.2880        11.551        .25852E-03   -1.5481    
  16  norm          10.603        14.552        .12325E-03   -1.5057    
  17  norm          .10008E-03    22.426        .22150E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    1.1020        .69251E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    4.2591        .13639E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     49.762        48.229        .56820E-04   -1.4296    
  21  Prefactor     44.330        48.575        .30112E-03   -1.4375    
  22  Prefactor     .10000E-03    29.709        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    44.325        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     18.281        33.333        .93490E-04   -1.4853    
  25  Prefactor     .10000E-03    41.039        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          13.870        2.9798        .52333E-04   -1.4963    
  27  Prefactor     1.4449        4.7840        .26166E-03   -1.5468    
  28  norm          .10000E-03    6.6417        .17031E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.1934        .24435        .22387E-03   -.86807    
  30  Prefactor     .87649        .29437        .31881E-03   -.96967    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.99613e-09
Minuit parameter uncertainties:
  1  3.24547
  2  9.18961
  3  7.57512e-07
  4  2.19215e-06
  5  9.62742e-06
  6  3.3869e-06
  7  0.000320461
  8  2.51661e-06
  9  9.78769e-06
  10  41.9139
  11  24.5687
  12  4.13378e-05
  13  3.36073e-06
  14  23.0136
  15  7.71613
  16  14.5571
  17  0.00259808
  18  5.95444e-06
  19  9.35316e-06
  20  48.2667
  21  48.6181
  22  0.000324388
  23  0.000512584
  24  33.3667
  25  0.000119455
  26  2.97984
  27  4.78526
  28  3.55783e-06
  29  0.244582
  30  0.294901
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  4.134e-05  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.765e-01  2.949e-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.193e+00  2.446e-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: 8.09e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.27e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/189581/likelihoodResults_409104001_409363201_4FGL_J1304.0+3704_daily_bin655.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) = 4581.36654647
delta logL = -0.000298810041386

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4581.36624764
delta logL = 1.8688297132e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10082E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4816       1.0000          .0000       10.000    
     3 'Normalizat'    1.1932       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .87669       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=   4581.366     FROM MIGRAD    STATUS=CONVERGED     89 CALLS      248 TOTAL
                     EDM=   .24E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10003E-03    1012.2        .18142E-02** at limit **
   2  Index         2.5393        6.2311        .50000       -.34454E-04
   3  Normalizat    1.1934        .37087E-01    .22387E-03   -.39238E-03
   4  Prefactor     .87648        .46175E-01    .31882E-03   -.41287E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100035
  Index      = 2.53931
  Normalizat = 1.1934
  Prefactor  = 0.876482
 **********
 **   18 **HESSE 
 **********

 FCN=   4581.366     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      277 TOTAL
                     EDM=   .85E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10003E-03    6596.7        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.5393        6.1273        .50000       -.51455    
   3  Normalizat    1.1934        .91822E-01    .44773E-04   -.86807    
   4  Prefactor     .87648        .11431        .63763E-04   -.96968    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 8.47743e-09
Minuit parameter uncertainties:
  1  0.0224225
  2  57.8177
  3  0.0918345
  4  0.11434
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/189581': 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) = 4581.36624695
delta logL = 7.06653736415e-07

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  2.242e-02  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.539e+00  5.782e+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.765e-01  1.143e-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.193e+00  9.183e-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/189581/cmap_HighResolution_409104001_409363201_4FGL_J1304.0+3704_daily_bin655.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.27e-03', job_status='DONE', photon_flux_upper_limit='8.09e-08', time_completed='2021-09-06 20:01:53.650327', job_id='189581', GAL2='0.88', fit_tolerance='1e-08', EG2='1.19', EG='1.19', time_epoch_completed='1630983713.65', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.88', dlogl='7.07e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='655' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:01:53 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0049>
Subject: Job 189581: <4FGL_J1304.0+3704_daily_bin655> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin655 196.008 37.071 409104001 409363201 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 :                                   750.40 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             243.80 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   928 sec.
    Turnaround time :                            974 sec.

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

