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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin1184
RA = 196.008, Dec = 37.071
tmin = 546220801, tmax = 546480001
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='192563', job_status='RUN', time_executed='2021-09-06 19:56:05.764046', time_epoch_executed='1630983365.76' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='1184'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/192563

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/192563/ft1_4FGL_J1304.0+3704_daily_bin1184.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/192563/ft2_4FGL_J1304.0+3704_daily_bin1184.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/192563/ft1_4FGL_J1304.0+3704_daily_bin1184.fits outfile=/scratch/kocevski/192563/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin1184.fits ra=196.008 dec=37.071 rad=12.0 tmin=546220801.0 tmax=546480001.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.25
user 3.05
sys 0.18

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/192563/ft1_filtered_4FGL_J1304.0+3704_daily_bin1184.fits" evtable="EVENTS" scfile=/scratch/kocevski/192563/ft2_4FGL_J1304.0+3704_daily_bin1184.fits sctable="SC_DATA" outfile=/scratch/kocevski/192563/ltcube_546220801_546480001_4FGL_J1304.0+3704_daily_bin1184.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/192563/ft2_4FGL_J1304.0+3704_daily_bin1184.fits
.....................!
real 14.56
user 14.24
sys 0.28

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/192563/ft1_filtered_4FGL_J1304.0+3704_daily_bin1184.fits evtable="EVENTS" scfile=/scratch/kocevski/192563/ft2_4FGL_J1304.0+3704_daily_bin1184.fits sctable="SC_DATA" expcube=/scratch/kocevski/192563/ltcube_546220801_546480001_4FGL_J1304.0+3704_daily_bin1184.fits outfile=/scratch/kocevski/192563/expmap_546220801_546480001_4FGL_J1304.0+3704_daily_bin1184.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/192563/ltcube_546220801_546480001_4FGL_J1304.0+3704_daily_bin1184.fits
.....................!
real 157.72
user 153.47
sys 3.81

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/192563/ft1_filtered_4FGL_J1304.0+3704_daily_bin1184.fits scfile=/scratch/kocevski/192563/ft2_4FGL_J1304.0+3704_daily_bin1184.fits outfile=/scratch/kocevski/192563/cmap_546220801_546480001_4FGL_J1304.0+3704_daily_bin1184.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.51
user 0.34
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/192563/ft1_filtered_4FGL_J1304.0+3704_daily_bin1184.fits scfile=/scratch/kocevski/192563/ft2_4FGL_J1304.0+3704_daily_bin1184.fits outfile=/scratch/kocevski/192563/cmap_HighResolution_546220801_546480001_4FGL_J1304.0+3704_daily_bin1184.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.51
user 0.35
sys 0.14

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/192563/ft1_filtered_4FGL_J1304.0+3704_daily_bin1184.fits', '/scratch/kocevski/192563/ft2_4FGL_J1304.0+3704_daily_bin1184.fits', expMap='/scratch/kocevski/192563/expmap_546220801_546480001_4FGL_J1304.0+3704_daily_bin1184.fits', expCube='/scratch/kocevski/192563/ltcube_546220801_546480001_4FGL_J1304.0+3704_daily_bin1184.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/192563/Model_4FGL_J1304.0+3704_daily_bin1184.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/192563/ft1_filtered_4FGL_J1304.0+3704_daily_bin1184.fits
Spacecraft file(s): /scratch/kocevski/192563/ft2_4FGL_J1304.0+3704_daily_bin1184.fits
Exposure map: /scratch/kocevski/192563/expmap_546220801_546480001_4FGL_J1304.0+3704_daily_bin1184.fits
Exposure cube: /scratch/kocevski/192563/ltcube_546220801_546480001_4FGL_J1304.0+3704_daily_bin1184.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/192563/Model_4FGL_J1304.0+3704_daily_bin1184.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 101
logL (Fixed Index) = 459.420936456

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 101
logL (Fixed Index) = 454.530162496

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    27.153       1.0000         .10000E-03   10000.    
     2 'Prefactor '    14.186       1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.3139       1.0000         .10000E-03   10000.    
     4 'Prefactor '    21.352       1.0000         .10000E-03   10000.    
     5 'Prefactor '    3.2273       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .44832E-02   1.0000         .10000E-03   10000.    
     7 'Prefactor '    294.87       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .28647E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .26318E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.6584       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .67245       1.0000         .10000E-03   10000.    
    12 'Prefactor '    139.86       1.0000         .10000E-03   10000.    
    13 'norm      '    9.4400       1.0000         .10000E-03   10000.    
    14 'norm      '    2.7191       1.0000         .10000E-03   10000.    
    15 'norm      '    .87861E-02   1.0000         .10000E-03   10000.    
    16 'norm      '    30.921       1.0000         .10000E-03   10000.    
    17 'norm      '    4.4517       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10277E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10058E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    9.4615       1.0000         .10000E-03   10000.    
    21 'Prefactor '    229.06       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10023E-02   1.0000         .10000E-03   10000.    
    23 'Prefactor '    8.0629       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .54605E-02   1.0000         .10000E-03   10000.    
    25 'Prefactor '    4.3373       1.0000         .10000E-03   10000.    
    26 'norm      '    6.7947       1.0000         .10000E-03   10000.    
    27 'Prefactor '    29.721       1.0000         .10000E-03   10000.    
    28 'norm      '    3.7350       1.0000         .10000E-03   10000.    
    29 'Normalizat'    .10001E-01   1.0000         .10000E-01   10.000    
    30 'Prefactor '    .28778       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.
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   454.5238     FROM MIGRAD    STATUS=CONVERGED    244 CALLS      645 TOTAL
                     EDM=   .63E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          27.178        11.458        .19220E-02   -.10190E-02
   2  Prefactor     14.122        14.783        .26586E-02   -.64050E-02
   3  Prefactor     1.2955        5.1014        .96100E-02    .74944    
   4  Prefactor     21.511        24.019        .21670E-02    .25288E-02
   5  Prefactor     3.2273        1.0125         .0000         .0000    
   6  Prefactor     .10000E-03    .23399       -.74355E-05** at limit **
   7  Prefactor     297.96        1.0051        .14604E-04    .28485E-01
   8  Prefactor     .10000E-03    .28647       -.35476E-05** at limit **
   9  norm          .10000E-03    .28740        .36756E-05** at limit **
  10  Prefactor     .13485E-02    .69690E-01   -.34299E-03** at limit **
  11  Prefactor     .10000E-03    .35734        .41236E-04** at limit **
  12  Prefactor     137.87        .99299       -.15369E-04   -.77439E-02
  13  norm          9.9634        1.0288       -.27790E-04    .23382E-03
  14  norm          .10006E-03    .95311E-01    .48525E-05** at limit **
  15  norm          .10000E-03    .20958        .31987E-05** at limit **
  16  norm          30.891        .99964       -.12718E-05    .46208E-05
  17  norm          4.4517        1.0064         .0000         .0000    
  18  Prefactor     .10000E-03    .20571        .83812E-06** at limit **
  19  Prefactor     .10000E-03    .20571       -.95581E-06** at limit **
  20  Prefactor     9.4615        1.0014         .0000         .0000    
  21  Prefactor     230.32        1.0027        .77296E-05   -.57091E-02
  22  Prefactor     .10000E-03    .26938        .20728E-05** at limit **
  23  Prefactor     8.0629        1.0019         .0000         .0000    
  24  Prefactor     .10000E-03    .22749        .52976E-06** at limit **
  25  Prefactor     .12587E-03    .58453E-01    .18760E-05** at limit **
  26  norm          6.7947        1.0027         .0000         .0000    
  27  Prefactor     29.863        1.0025        .13927E-05   -.90365E-05
  28  norm          .89219        .49332       -.18305E-03    .31462E-02
  29  Normalizat    .10000E-01    .25724       -.98109E-04** at limit **
  30  Prefactor     .28628        .59690        .26269E-04   -.25360E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 27.1784
  Prefactor  = 14.1224
  Prefactor  = 1.29549
  Prefactor  = 21.5113
  Prefactor  = 3.22733
  Prefactor  = 0.0001
  Prefactor  = 297.96
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.00134848
  Prefactor  = 0.000100003
  Prefactor  = 137.873
  norm       = 9.96339
  norm       = 0.000100056
  norm       = 0.0001
  norm       = 30.8908
  norm       = 4.45174
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.46154
  Prefactor  = 230.325
  Prefactor  = 0.0001
  Prefactor  = 8.06286
  Prefactor  = 0.0001
  Prefactor  = 0.000125867
  norm       = 6.79466
  Prefactor  = 29.863
  norm       = 0.892187
  Normalizat = 0.01
  Prefactor  = 0.286282
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   454.5238     FROM HESSE     STATUS=FAILED        17 CALLS      662 TOTAL
                     EDM=   .63E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          27.178        11.458        .19220E-02   -1.4665    
   2  Prefactor     14.122        14.783        .26586E-02   -1.4956    
   3  Prefactor     1.2955        5.1014        .96100E-02   -1.5480    
   4  Prefactor     21.511        24.019        .21670E-02   -1.4780    
   5  Prefactor     551.41        548.10         .0000       -1.5349    
   6  Prefactor     .10000E-03    .23399       -.74355E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     297.96        1.0051        .14604E-04   -1.2238    
   8  Prefactor     .10000E-03    .28647       -.35476E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    .28740        .36756E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .13485E-02    .69690E-01   -.34299E-03   -1.5715    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    .35734        .41236E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     137.87        .99299       -.15369E-04   -1.3354    
  13  norm          9.9634        1.0288       -.27790E-04   -1.5077    
  14  norm          .10006E-03    .95311E-01    .48525E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    .20958        .31987E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          30.891        .99964       -.12718E-05   -1.4596    
  17  norm          4.4517        1.0064         .0000       -1.5286    
  18  Prefactor     .10000E-03    .20571        .83812E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    .20571       -.95581E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     9.4615        1.0014         .0000       -1.5093    
  21  Prefactor     230.32        1.0027        .77296E-05   -1.2661    
  22  Prefactor     .10000E-03    .26938        .20728E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     8.0629        1.0019         .0000       -1.5140    
  24  Prefactor     .10000E-03    .22749        .52976E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .12587E-03    .58453E-01    .18760E-05   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          6.7947        1.0027         .0000       -1.5187    
  27  Prefactor     29.863        1.0025        .13927E-05   -1.4614    
  28  norm          .89219        .49332       -.18305E-03   -1.5519    
  29  Normalizat    .10000E-01    .25724       -.98109E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Prefactor     .28628        .59690        .26269E-04   -1.2308    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 6.29012e-10
Minuit parameter uncertainties:
  1  11.4591
  2  14.7863
  3  5.10309
  4  24.0293
  5  1.01253
  6  8.38018e-06
  7  1.00506
  8  5.65006e-06
  9  4.28701e-06
  10  0.0186555
  11  6.32805e-05
  12  0.992994
  13  1.02877
  14  0.000146381
  15  4.03514e-06
  16  0.999638
  17  1.00645
  18  9.11917e-07
  19  7.50068e-07
  20  1.0014
  21  1.0027
  22  2.49705e-06
  23  1.00193
  24  7.87664e-07
  25  0.00245928
  26  1.00273
  27  1.00253
  28  0.493318
  29  3.53142e-06
  30  0.610447
Done.

MINUIT Return Code (Fixed Index): 101
logL (Fixed Index) = 454.523816852

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.379e+02  9.930e-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:  2.863e-01  6.104e-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.000e-02  3.531e-06  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.04
Ra Dec: 196.008 37.071
Photon Index (Fixed Index): 2.44 +/- 0.00
Photon Flux (Fixed Index): 2.83e-07 +/- 2.04e-09
Energy Flux (Fixed Index): 8.86e-05 +/- 6.38e-07

TS (Fixed Index): 1.04
Ra Dec: 196.008 37.071
Photon Flux Upper Limit: 1.20e-06 ph cm-2 s-1
Energy Flux Upper Limit: 9.27e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/192563/likelihoodResults_546220801_546480001_4FGL_J1304.0+3704_daily_bin1184.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): 0
logL (Free Index) = 454.201375514
delta logL = 0.322441338036

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 454.174213315
delta logL = 0.349603536407

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    11.963       1.0000         .10000E-03   10000.    
     2 'Index     '    4.2482       1.0000          .0000       10.000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .28127       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=   454.1742     FROM MIGRAD    STATUS=CONVERGED     79 CALLS      307 TOTAL
                     EDM=   .61E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     11.947        43.800        .69604E-04    .58505E-03
   2  Index         4.2484        1.9763        .22020E-03    .17166E-03
   3  Normalizat    .10000E-01    .39283        .66152E-02** at limit **
   4  Prefactor     .28162        .22377        .27945E-03   -.83670E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 11.9471
  Index      = 4.2484
  Normalizat = 0.01
  Prefactor  = 0.281622
 **********
 **   18 **HESSE 
 **********

 FCN=   454.1742     FROM HESSE     STATUS=OK            23 CALLS      330 TOTAL
                     EDM=   .61E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     11.947        42.185        .13921E-04   -1.5017    
   2  Index         4.2484        1.9070        .88081E-05   -.15089    
   3  Normalizat    .10000E-01    .39287        .13230E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .28162        .22369        .55889E-04   -1.2336    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.09981e-10
Minuit parameter uncertainties:
  1  42.2901
  2  1.95773
  3  3.32533e-06
  4  0.224379
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/192563': 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) = 454.174211498
delta logL = 0.349605353605

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.195e+01  4.229e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  4.248e+00  1.958e+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:  2.816e-01  2.244e-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.000e-02  3.325e-06  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.72
Ra Dec: 196.008 37.071
Photon Index (Free Index): 4.25 +/- 1.96
Photon Flux (Free Index): 7.48e-07 +/- 8.41e-07
Energy Flux (Free Index): 1.08e-04 +/- 1.10e-04

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/192563/cmap_HighResolution_546220801_546480001_4FGL_J1304.0+3704_daily_bin1184.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.27e-02', comment='SUCCESS', photon_flux='2.83e-07', energy_flux2='1.08e-04', photon_flux_error='2.04e-09', dlogl='3.50e-01', energy_flux='8.86e-05', photon_flux2='7.48e-07', job_status='DONE', time_completed='2021-09-06 20:01:03.012058', photon_index_error2='1.96', photon_index2='4.25', ts='1.04', fit_tolerance='1e-08', GAL='0.29', photon_index_error='0.00', photon_flux_upper_limit='1.20e-06', energy_flux_error2='1.10e-04', EG='0.01', time_epoch_completed='1630983663.01', return_code='101', job_id='192563', GAL2='0.28', EG2='0.01', return_code2='0', energy_flux_error='6.38e-07', photon_flux_error2='8.41e-07', ts2='1.72', photon_index='2.44' WHERE bin_id='1184' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:01:03 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0095>
Subject: Job 192563: <4FGL_J1304.0+3704_daily_bin1184> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin1184> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Mon Sep  6 19:55:46 2021
Job was executed on host(s) <bullet0095>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:55:53 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:55:53 2021
Terminated at Mon Sep  6 20:01:03 2021
Results reported at Mon Sep  6 20:01:03 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin1184 196.008 37.071 546220801 546480001 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 :                                   283.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             390.64 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   310 sec.
    Turnaround time :                            317 sec.

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

