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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin775
RA = 196.008, Dec = 37.071
tmin = 440208001, tmax = 440467201
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='190820', job_status='RUN', time_executed='2021-09-06 19:50:54.973424', time_epoch_executed='1630983054.97' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='775'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/190820

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/190820/ft1_4FGL_J1304.0+3704_daily_bin775.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/190820/ft2_4FGL_J1304.0+3704_daily_bin775.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/190820/ft1_4FGL_J1304.0+3704_daily_bin775.fits outfile=/scratch/kocevski/190820/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin775.fits ra=196.008 dec=37.071 rad=12.0 tmin=440208001.0 tmax=440467201.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.48
user 3.26
sys 0.20

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/190820/ft1_filtered_4FGL_J1304.0+3704_daily_bin775.fits evtable="EVENTS" scfile=/scratch/kocevski/190820/ft2_4FGL_J1304.0+3704_daily_bin775.fits sctable="SC_DATA" expcube=/scratch/kocevski/190820/ltcube_440208001_440467201_4FGL_J1304.0+3704_daily_bin775.fits outfile=/scratch/kocevski/190820/expmap_440208001_440467201_4FGL_J1304.0+3704_daily_bin775.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/190820/ltcube_440208001_440467201_4FGL_J1304.0+3704_daily_bin775.fits
.....................!
real 191.41
user 186.19
sys 4.69

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/190820/ft1_filtered_4FGL_J1304.0+3704_daily_bin775.fits scfile=/scratch/kocevski/190820/ft2_4FGL_J1304.0+3704_daily_bin775.fits outfile=/scratch/kocevski/190820/cmap_440208001_440467201_4FGL_J1304.0+3704_daily_bin775.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/190820/ft1_filtered_4FGL_J1304.0+3704_daily_bin775.fits scfile=/scratch/kocevski/190820/ft2_4FGL_J1304.0+3704_daily_bin775.fits outfile=/scratch/kocevski/190820/cmap_HighResolution_440208001_440467201_4FGL_J1304.0+3704_daily_bin775.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/190820/ft1_filtered_4FGL_J1304.0+3704_daily_bin775.fits evtable="EVENTS" scfile=/scratch/kocevski/190820/ft2_4FGL_J1304.0+3704_daily_bin775.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/190820/Model_4FGL_J1304.0+3704_daily_bin775.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/190820/ft1_filtered_4FGL_J1304.0+3704_daily_bin775.fits.....................!
real 52.61
user 51.29
sys 1.17

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.1056       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .68691       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10398E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    18.450       1.0000         .10000E-03   10000.    
     5 'Prefactor '    13.603       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    54.026       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10117E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    8.5255       1.0000         .10000E-03   10000.    
    10 'Prefactor '    13.151       1.0000         .10000E-03   10000.    
    11 'Prefactor '    1.1806       1.0000         .10000E-03   10000.    
    12 'Prefactor '    25.631       1.0000         .10000E-03   10000.    
    13 'norm      '    3.0604       1.0000         .10000E-03   10000.    
    14 'norm      '    18.354       1.0000         .10000E-03   10000.    
    15 'norm      '    .30110E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10019E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    1.3983       1.0000         .10000E-03   10000.    
    19 'Prefactor '    11.655       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10168E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .13790E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    19.049       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10028E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10041E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    4.2543       1.0000         .10000E-03   10000.    
    27 'Prefactor '    3.9706       1.0000         .10000E-03   10000.    
    28 'norm      '    5.1149       1.0000         .10000E-03   10000.    
    29 'Normalizat'    .97012       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .99652       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=   6520.874     FROM MIGRAD    STATUS=CONVERGED    788 CALLS     3941 TOTAL
                     EDM=   .95E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.1095        3.6465       -.63553E-07   -.52156E-04
   2  Prefactor     .68785        5.7560        .19110E-05   -.63919E-03
   3  Prefactor     .10000E-03    1.7683        .19607E-07** at limit **
   4  Prefactor     18.451        10.963        .29385E-07    .14870E-04
   5  Prefactor     13.603        25.138        .15041E-06    .21968E-05
   6  Prefactor     .10000E-03    5.7695       -.48377E-07** at limit **
   7  Prefactor     53.960        68.888        .28832E-05    .51557E-04
   8  Prefactor     .10000E-03    2.8331       -.12199E-06** at limit **
   9  norm          8.5244        6.1596        .92626E-06    .71417E-03
  10  Prefactor     13.144        46.962        .41661E-06    .25403E-05
  11  Prefactor     1.1001        110.66       -.79764E-05   -.51304E-04
  12  Prefactor     25.630        17.117        .38518E-06    .16412E-03
  13  norm          3.0604        3.8132        .18433E-06    .20645E-03
  14  norm          18.355        13.652        .81753E-07    .35564E-05
  15  norm          .10002E-03    2.5594       -.88833E-06** at limit **
  16  norm          .10000E-03    2.6133       -.22660E-06** at limit **
  17  norm          .10000E-03    1.9450       -.15911E-06** at limit **
  18  Prefactor     1.3927        3.6103       -.40865E-06    .46968E-03
  19  Prefactor     11.663        15.704        .16980E-05    .46708E-03
  20  Prefactor     .10000E-03    34.816       -.70488E-06** at limit **
  21  Prefactor     .10000E-03    109.21       -.44030E-05** at limit **
  22  Prefactor     19.053        17.425        .12173E-06    .11524E-03
  23  Prefactor     .10000E-03    19.817       -.31180E-06** at limit **
  24  Prefactor     .10000E-03    8.5567       -.16598E-06** at limit **
  25  Prefactor     .10000E-03    67.719       -.79325E-06** at limit **
  26  norm          4.2544        1.6111        .17205E-07    .24516E-04
  27  Prefactor     3.9703        4.5786       -.39229E-07    .38128E-04
  28  norm          5.1145        8.4794        .58425E-07    .20500E-05
  29  Normalizat    .97013        .16636        .69994E-06    .44166E-03
  30  Prefactor     .99646        .20141       -.55999E-06    .35292E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 2.10954
  Prefactor  = 0.687853
  Prefactor  = 0.0001
  Prefactor  = 18.4514
  Prefactor  = 13.6035
  Prefactor  = 0.0001
  Prefactor  = 53.9597
  Prefactor  = 0.0001
  norm       = 8.52437
  Prefactor  = 13.1441
  Prefactor  = 1.10008
  Prefactor  = 25.6305
  norm       = 3.0604
  norm       = 18.3549
  norm       = 0.000100015
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 1.3927
  Prefactor  = 11.6635
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 19.0534
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 4.25435
  Prefactor  = 3.97027
  norm       = 5.11445
  Normalizat = 0.970127
  Prefactor  = 0.996462
 **********
 **   18 **HESSE 
 **********

 FCN=   6520.874     FROM HESSE     STATUS=OK           592 CALLS     4533 TOTAL
                     EDM=   .49E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.1095        3.3248        .17900E-03   -1.5417    
   2  Prefactor     .68785        10.955        .24023E-02   -1.5542    
   3  Prefactor     .10000E-03    2.8328        .19064E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     18.451        10.944        .93244E-04   -1.4849    
   5  Prefactor     13.603        25.148        .10860E-03   -1.4970    
   6  Prefactor     .10000E-03    5.7717        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     53.960        68.550        .27285E-03   -1.4237    
   8  Prefactor     .10000E-03    2.8438        .13264E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          8.5244        6.5815        .13729E-03   -1.5124    
  10  Prefactor     13.144        46.931        .11045E-03   -1.4983    
  11  Prefactor     1.1001        234.19        .70084E-02   -1.5498    
  12  Prefactor     25.630        17.134        .79126E-04   -1.4695    
  13  norm          3.0604        3.7982        .16644E-03   -1.5358    
  14  norm          18.355        13.639        .46744E-03   -1.4851    
  15  norm          .10002E-03    6.7899        .21020E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    2.6223        .12729E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    1.9675        .10994E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     1.3927        3.4446        .19992E-03   -1.5472    
  19  Prefactor     11.663        15.565        .11735E-03   -1.5025    
  20  Prefactor     .10000E-03    34.995        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    109.60        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     19.053        17.426        .91768E-04   -1.4835    
  23  Prefactor     .10000E-03    19.842        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    8.5682        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    67.991        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          4.2544        1.6116        .60959E-04   -1.5295    
  27  Prefactor     3.9703        4.5737        .17877E-03   -1.5309    
  28  norm          5.1145        8.4712        .17777E-03   -1.5256    
  29  Normalizat    .97013        .19632        .23489E-03   -.94038    
  30  Prefactor     .99646        .23400        .28745E-03   -.92848    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.90739e-08
Minuit parameter uncertainties:
  1  3.32514
  2  5.49085
  3  1.80854e-05
  4  10.945
  5  25.1677
  6  2.16715e-06
  7  68.6503
  8  4.98661e-06
  9  6.5821
  10  47.0637
  11  32.2286
  12  17.1372
  13  3.79855
  14  13.641
  15  0.000647983
  16  7.53576e-06
  17  1.15389e-07
  18  3.44512
  19  15.5705
  20  6.17842e-06
  21  0.000117026
  22  17.4302
  23  7.91808e-08
  24  1.05146e-06
  25  8.6392e-06
  26  1.61165
  27  4.5741
  28  8.47314
  29  0.196469
  30  0.234235
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  2.563e+01  1.714e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.436e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  9.965e-01  2.342e-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:  9.701e-01  1.965e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 5.99
Ra Dec: 196.008 37.071
Photon Index (Fixed Index): 2.44 +/- 0.00
Photon Flux (Fixed Index): 5.26e-08 +/- 3.51e-08
Energy Flux (Fixed Index): 1.65e-05 +/- 1.10e-05

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6520.73271532
delta logL = 0.141620592792

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6520.72239424
delta logL = 0.151941673658

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    29.473       1.0000         .10000E-03   10000.    
     2 'Index     '    2.1236       1.0000          .0000       10.000    
     3 'Normalizat'    .98771       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .98446       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=   6520.722     FROM MIGRAD    STATUS=CONVERGED     92 CALLS      280 TOTAL
                     EDM=   .83E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     29.468        20.880        .73799E-04    .13710E-04
   2  Index         2.1226        .58003        .88989E-02    .19022E-03
   3  Normalizat    .98779        .18952        .23306E-03   -.70193E-04
   4  Prefactor     .98443        .23233        .28902E-03    .36109E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 29.4681
  Index      = 2.12264
  Normalizat = 0.987793
  Prefactor  = 0.984426
 **********
 **   18 **HESSE 
 **********

 FCN=   6520.722     FROM HESSE     STATUS=OK            25 CALLS      305 TOTAL
                     EDM=   .50E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     29.468        20.812        .29520E-05   -1.4622    
   2  Index         2.1226        .57773        .17798E-02   -.61318    
   3  Normalizat    .98779        .18966        .93225E-05   -.93441    
   4  Prefactor     .98443        .23254        .11561E-04   -.93250    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.00315e-11
Minuit parameter uncertainties:
  1  20.8167
  2  0.579674
  3  0.189785
  4  0.23278
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/190820': No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6520.72239289
delta logL = 0.151943024139

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  2.947e+01  2.082e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.123e+00  5.797e-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:  9.844e-01  2.328e-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:  9.878e-01  1.898e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.29
Ra Dec: 196.008 37.071
Photon Index (Free Index): 2.12 +/- 0.58
Photon Flux (Free Index): 3.72e-08 +/- 3.92e-08
Energy Flux (Free Index): 1.95e-05 +/- 1.60e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/190820/cmap_HighResolution_440208001_440467201_4FGL_J1304.0+3704_daily_bin775.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='5.26e-08', energy_flux2='1.95e-05', photon_flux_error='3.51e-08', dlogl='1.52e-01', energy_flux='1.65e-05', photon_flux2='3.72e-08', job_status='DONE', time_completed='2021-09-06 20:04:00.443020', photon_index_error2='0.58', photon_index2='2.12', ts='5.99', fit_tolerance='1e-08', GAL='1.00', photon_index_error='0.00', energy_flux_error2='1.60e-05', EG='0.97', time_epoch_completed='1630983840.44', return_code='0', job_id='190820', GAL2='0.98', EG2='0.99', return_code2='0', energy_flux_error='1.10e-05', photon_flux_error2='3.92e-08', ts2='6.29', photon_index='2.44' WHERE bin_id='775' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:04:00 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0112>
Subject: Job 190820: <4FGL_J1304.0+3704_daily_bin775> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin775 196.008 37.071 440208001 440467201 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 :                                   782.52 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             339.92 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   799 sec.
    Turnaround time :                            819 sec.

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

