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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin390
RA = 196.008, Dec = 37.071
tmin = 340416001, tmax = 340675201
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='188011', job_status='RUN', time_executed='2021-09-06 19:44:03.681014', time_epoch_executed='1630982643.68' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='390'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/188011

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

Retrieving the FT1 file...

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

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

Retrieving 53 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/188011/ft1_4FGL_J1304.0+3704_daily_bin390.fits


Retrieving the FT1 file...

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

Retrieving 53 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/188011/ft2_4FGL_J1304.0+3704_daily_bin390.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/188011/ft1_4FGL_J1304.0+3704_daily_bin390.fits outfile=/scratch/kocevski/188011/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin390.fits ra=196.008 dec=37.071 rad=12.0 tmin=340416001.0 tmax=340675201.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.27
sys 0.28

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/188011/ft2_4FGL_J1304.0+3704_daily_bin390.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/188011/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin390.fits evtable="EVENTS" outfile="/scratch/kocevski/188011/ft1_filtered_4FGL_J1304.0+3704_daily_bin390.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.46
user 0.29
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/188011/ft1_filtered_4FGL_J1304.0+3704_daily_bin390.fits" evtable="EVENTS" scfile=/scratch/kocevski/188011/ft2_4FGL_J1304.0+3704_daily_bin390.fits sctable="SC_DATA" outfile=/scratch/kocevski/188011/ltcube_340416001_340675201_4FGL_J1304.0+3704_daily_bin390.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/188011/ft2_4FGL_J1304.0+3704_daily_bin390.fits
.....................!
real 13.40
user 13.07
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/188011/ft1_filtered_4FGL_J1304.0+3704_daily_bin390.fits evtable="EVENTS" scfile=/scratch/kocevski/188011/ft2_4FGL_J1304.0+3704_daily_bin390.fits sctable="SC_DATA" expcube=/scratch/kocevski/188011/ltcube_340416001_340675201_4FGL_J1304.0+3704_daily_bin390.fits outfile=/scratch/kocevski/188011/expmap_340416001_340675201_4FGL_J1304.0+3704_daily_bin390.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/188011/ltcube_340416001_340675201_4FGL_J1304.0+3704_daily_bin390.fits
.....................!
real 157.21
user 152.61
sys 4.03

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/188011/ft1_filtered_4FGL_J1304.0+3704_daily_bin390.fits scfile=/scratch/kocevski/188011/ft2_4FGL_J1304.0+3704_daily_bin390.fits outfile=/scratch/kocevski/188011/cmap_340416001_340675201_4FGL_J1304.0+3704_daily_bin390.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.48
user 0.32
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/188011/ft1_filtered_4FGL_J1304.0+3704_daily_bin390.fits scfile=/scratch/kocevski/188011/ft2_4FGL_J1304.0+3704_daily_bin390.fits outfile=/scratch/kocevski/188011/cmap_HighResolution_340416001_340675201_4FGL_J1304.0+3704_daily_bin390.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.49
user 0.33
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    1.9935       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.3499       1.0000         .10000E-03   10000.    
     4 'Prefactor '    6.2856       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    14.232       1.0000         .10000E-03   10000.    
     7 'Prefactor '    66.680       1.0000         .10000E-03   10000.    
     8 'Prefactor '    4.0382       1.0000         .10000E-03   10000.    
     9 'norm      '    .48616       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10294E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.0689       1.0000         .10000E-03   10000.    
    13 'norm      '    .10016E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    11.714       1.0000         .10000E-03   10000.    
    15 'norm      '    2.3990       1.0000         .10000E-03   10000.    
    16 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10017E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    12.393       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .32377       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    19.034       1.0000         .10000E-03   10000.    
    23 'Prefactor '    29.567       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .12050E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    10.581       1.0000         .10000E-03   10000.    
    27 'Prefactor '    1.7404       1.0000         .10000E-03   10000.    
    28 'norm      '    .10292E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.2089       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .93082       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=   5916.656     FROM MIGRAD    STATUS=CONVERGED    854 CALLS     4038 TOTAL
                     EDM=   .86E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.9924        3.3538       -.17692E-06    .25863E-03
   2  Prefactor     .10000E-03    4.2902       -.17997E-06** at limit **
   3  Prefactor     1.3502        1.7473       -.31953E-07   -.82845E-04
   4  Prefactor     6.2856        8.5633        .58117E-07    .11075E-03
   5  Prefactor     .10000E-03    18.822       -.33212E-06** at limit **
   6  Prefactor     14.233        14.807       -.73975E-07   -.30528E-04
   7  Prefactor     66.632        67.032       -.21324E-05   -.18518E-03
   8  Prefactor     4.0382        4.9333        .61573E-06    .69914E-04
   9  norm          .48479        3.7990        .71543E-07    .16876E-03
  10  Prefactor     .10000E-03    124.94       -.60039E-06** at limit **
  11  Prefactor     .10000E-03    25.681       -.30536E-06** at limit **
  12  Prefactor     1.0581        61.522       -.20362E-04    .72993E-04
  13  norm          .10000E-03    2.0637       -.12318E-06** at limit **
  14  norm          11.716        12.606        .70514E-07    .48528E-04
  15  norm          2.4000        4.2251        .76488E-07   -.15271E-03
  16  norm          .10000E-03    3.6891       -.24319E-06** at limit **
  17  norm          .10000E-03    1.3582       -.34947E-07** at limit **
  18  Prefactor     .10000E-03    2.2447       -.17356E-08** at limit **
  19  Prefactor     12.393        17.396        .13865E-06   -.29159E-04
  20  Prefactor     .31696E-03    46.369       -.66896E-05** at limit **
  21  Prefactor     .10000E-03    19.862        .13191E-06** at limit **
  22  Prefactor     19.034        18.489        .49661E-06    .93620E-04
  23  Prefactor     29.568        37.717        .40372E-05    .29168E-03
  24  Prefactor     .10000E-03    16.801        .80997E-07** at limit **
  25  Prefactor     .10000E-03    52.101       -.23474E-06** at limit **
  26  norm          10.581        2.4645       -.66453E-08    .51708E-03
  27  Prefactor     1.7405        4.5616       -.80764E-06    .43056E-03
  28  norm          .10000E-03    8.4726       -.13422E-06** at limit **
  29  Normalizat    1.2088        .17952        .23814E-05    .19508E-03
  30  Prefactor     .93093        .21241       -.55043E-06    .10254E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 1.99243
  Prefactor  = 0.0001
  Prefactor  = 1.35018
  Prefactor  = 6.2856
  Prefactor  = 0.0001
  Prefactor  = 14.2326
  Prefactor  = 66.6321
  Prefactor  = 4.03824
  norm       = 0.48479
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 1.05812
  norm       = 0.0001
  norm       = 11.7155
  norm       = 2.40002
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 12.3931
  Prefactor  = 0.000316965
  Prefactor  = 0.0001
  Prefactor  = 19.0342
  Prefactor  = 29.5679
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 10.5808
  Prefactor  = 1.74053
  norm       = 0.0001
  Normalizat = 1.20883
  Prefactor  = 0.930935
 **********
 **   18 **HESSE 
 **********

 FCN=   5916.656     FROM HESSE     STATUS=OK           596 CALLS     4634 TOTAL
                     EDM=   .21E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.9924        3.3890        .16073E-03   -1.5426    
   2  Prefactor     .10000E-03    4.3138        .15562E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     1.3502        1.7657        .10206E-03   -1.5476    
   4  Prefactor     6.2856        8.5637        .16011E-03   -1.5206    
   5  Prefactor     .10000E-03    18.871        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     14.233        14.803        .10617E-03   -1.4953    
   7  Prefactor     66.632        67.573        .24575E-03   -1.4074    
   8  Prefactor     4.0382        4.9040        .17634E-03   -1.5306    
   9  norm          .48479        7.4831        .27128E-02   -1.5569    
  10  Prefactor     .10000E-03    126.79        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    25.772        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     1.0581        63.051        .45726E-02   -1.5502    
  13  norm          .10000E-03    2.0682        .10779E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          11.716        12.610        .11704E-03   -1.5023    
  15  norm          2.4000        4.1183        .18253E-03   -1.5398    
  16  norm          .10000E-03    3.6982        .14396E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    1.3603        .87520E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    2.2442        .11134E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     12.393        17.229        .11379E-03   -1.5004    
  20  Prefactor     .31696E-03    51.819        .13086       -1.5705    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    19.860        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     19.034        18.487        .91802E-04   -1.4835    
  23  Prefactor     29.568        40.651        .73682E-04   -1.4620    
  24  Prefactor     .10000E-03    16.819        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    52.185        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          10.581        2.4652        .56034E-04   -1.5057    
  27  Prefactor     1.7405        4.5314        .25491E-03   -1.5444    
  28  norm          .10000E-03    8.5057        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.2088        .21395        .22312E-03   -.86330    
  30  Prefactor     .93093        .25208        .31162E-03   -.95068    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.11507e-09
Minuit parameter uncertainties:
  1  3.38932
  2  9.42154e-06
  3  1.76573
  4  8.56542
  5  3.96817e-05
  6  14.807
  7  67.6505
  8  4.90449
  9  3.80949
  10  0.000528477
  11  0.00012457
  12  16.3533
  13  9.26524e-06
  14  12.6133
  15  4.11875
  16  2.01105e-05
  17  1.15929e-06
  18  9.56077e-05
  19  17.2356
  20  0.212248
  21  8.02711e-05
  22  18.4925
  23  40.6886
  24  0.000158445
  25  0.000111585
  26  2.46525
  27  4.53229
  28  1.64315e-05
  29  0.214107
  30  0.2524
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.058e+00  1.635e+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.309e-01  2.524e-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.209e+00  2.141e-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.13e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.30e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/188011/likelihoodResults_340416001_340675201_4FGL_J1304.0+3704_daily_bin390.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) = 5915.93456752
delta logL = 0.721319755957

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5915.86245146
delta logL = 0.793435818681

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.3052       1.0000         .10000E-03   10000.    
     2 'Index     '    4.0558       1.0000          .0000       10.000    
     3 'Normalizat'    1.1393       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .98083       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.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5915.862     FROM MIGRAD    STATUS=FAILED        96 CALLS      266 TOTAL
                     EDM=   .59E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.3097        50.929        .19319E-03   -.86563E-04
   2  Index         4.0542        7.0015        .53901E-02    .61069E-03
   3  Normalizat    1.1390        .19121        .22870E-03   -.87491E-05
   4  Prefactor     .98119        .23390        .30435E-03   -.84980E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5915.862     FROM SIMPLEX   STATUS=UNCHANGED     89 CALLS      355 TOTAL
                     EDM=   .92E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.3097        50.929        .10629E-03   -.86563E-04
   2  Index         4.0542        7.0015        .67835E-03    .61069E-03
   3  Normalizat    1.1390        .19121        .19205E-03   -.87491E-05
   4  Prefactor     .98119        .23390        .19079E-03   -.84980E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5915.862     FROM MIGRAD    STATUS=CONVERGED     30 CALLS      385 TOTAL
                     EDM=   .65E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.3097        3.7868        .77277E-05    .32365E-04
   2  Index         4.0542        1.3868        .10780E-02   -.44926E-05
   3  Normalizat    1.1390        .20698        .91478E-05    .84509E-05
   4  Prefactor     .98119        .25247        .12174E-04   -.61634E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.30974
  Index      = 4.05422
  Normalizat = 1.13901
  Prefactor  = 0.981195
 **********
 **   18 **HESSE 
 **********

 FCN=   5915.862     FROM HESSE     STATUS=OK            23 CALLS      408 TOTAL
                     EDM=   .65E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.3097        3.3787        .30911E-06   -1.5479    
   2  Index         4.0542        1.2402        .43121E-04   -.19030    
   3  Normalizat    1.1390        .20738        .18296E-05   -.88509    
   4  Prefactor     .98119        .25299        .24348E-05   -.93359    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.46322e-12
Minuit parameter uncertainties:
  1  3.37916
  2  1.25382
  3  0.207529
  4  0.2533
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/188011': 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) = 5915.86244947
delta logL = 0.793437805394

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.310e+00  3.379e+00  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  4.054e+00  1.254e+00  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.812e-01  2.533e-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.139e+00  2.075e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.69
Ra Dec: 196.008 37.071
Photon Index (Free Index): 4.05 +/- 1.25
Photon Flux (Free Index): 5.54e-08 +/- 5.02e-08
Energy Flux (Free Index): 8.22e-06 +/- 7.46e-06

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/188011/cmap_HighResolution_340416001_340675201_4FGL_J1304.0+3704_daily_bin390.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.30e-03', comment='SUCCESS', energy_flux2='8.22e-06', dlogl='7.93e-01', photon_flux2='5.54e-08', job_status='DONE', time_completed='2021-09-06 19:56:28.556683', photon_index_error2='1.25', photon_index2='4.05', ts='0.00', fit_tolerance='1e-08', GAL='0.93', photon_index_error='0.00', photon_flux_upper_limit='8.13e-08', energy_flux_error2='7.46e-06', EG='1.21', time_epoch_completed='1630983388.56', return_code='0', job_id='188011', GAL2='0.98', EG2='1.14', return_code2='0', photon_flux_error2='5.02e-08', ts2='1.69', photon_index='2.44' WHERE bin_id='390' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:56:28 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0033>
Subject: Job 188011: <4FGL_J1304.0+3704_daily_bin390> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin390 196.008 37.071 340416001 340675201 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 :                                   740.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             248.15 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   910 sec.
    Turnaround time :                            963 sec.

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

