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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin543
RA = 196.008, Dec = 37.071
tmin = 380073601, tmax = 380332801
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='189420', job_status='RUN', time_executed='2021-09-06 19:46:17.576379', time_epoch_executed='1630982777.58' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='543'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/189420

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/189420/ft1_4FGL_J1304.0+3704_daily_bin543.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/189420/ft2_4FGL_J1304.0+3704_daily_bin543.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/189420/ft1_4FGL_J1304.0+3704_daily_bin543.fits outfile=/scratch/kocevski/189420/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin543.fits ra=196.008 dec=37.071 rad=12.0 tmin=380073601.0 tmax=380332801.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Done.
real 4.49
user 4.21
sys 0.25

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/189420/ft1_filtered_4FGL_J1304.0+3704_daily_bin543.fits" evtable="EVENTS" scfile=/scratch/kocevski/189420/ft2_4FGL_J1304.0+3704_daily_bin543.fits sctable="SC_DATA" outfile=/scratch/kocevski/189420/ltcube_380073601_380332801_4FGL_J1304.0+3704_daily_bin543.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/189420/ft2_4FGL_J1304.0+3704_daily_bin543.fits
.....................!
real 15.89
user 15.47
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/189420/ft1_filtered_4FGL_J1304.0+3704_daily_bin543.fits evtable="EVENTS" scfile=/scratch/kocevski/189420/ft2_4FGL_J1304.0+3704_daily_bin543.fits sctable="SC_DATA" expcube=/scratch/kocevski/189420/ltcube_380073601_380332801_4FGL_J1304.0+3704_daily_bin543.fits outfile=/scratch/kocevski/189420/expmap_380073601_380332801_4FGL_J1304.0+3704_daily_bin543.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/189420/ltcube_380073601_380332801_4FGL_J1304.0+3704_daily_bin543.fits
.....................!
real 196.56
user 190.54
sys 5.23

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/189420/ft1_filtered_4FGL_J1304.0+3704_daily_bin543.fits scfile=/scratch/kocevski/189420/ft2_4FGL_J1304.0+3704_daily_bin543.fits outfile=/scratch/kocevski/189420/cmap_380073601_380332801_4FGL_J1304.0+3704_daily_bin543.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/189420/ft1_filtered_4FGL_J1304.0+3704_daily_bin543.fits scfile=/scratch/kocevski/189420/ft2_4FGL_J1304.0+3704_daily_bin543.fits outfile=/scratch/kocevski/189420/cmap_HighResolution_380073601_380332801_4FGL_J1304.0+3704_daily_bin543.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.55
user 0.39
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    6.0318       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .15978E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    6.9370       1.0000         .10000E-03   10000.    
     5 'Prefactor '    27.207       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    3.6484       1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    4.6939       1.0000         .10000E-03   10000.    
    13 'norm      '    1.9323       1.0000         .10000E-03   10000.    
    14 'norm      '    10.377       1.0000         .10000E-03   10000.    
    15 'norm      '    7.3443       1.0000         .10000E-03   10000.    
    16 'norm      '    4.1425       1.0000         .10000E-03   10000.    
    17 'norm      '    1.1398       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    10.496       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .51031E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    21.175       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    7.4016       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    16.426       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    9.9574       1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.2352       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .53562       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=   6223.006     FROM MIGRAD    STATUS=CONVERGED    749 CALLS     3894 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          6.0320        3.1049        .34646E-07    .10155E-04
   2  Prefactor     .10000E-03    4.0366       -.46177E-06** at limit **
   3  Prefactor     .10000E-03    .57190       -.12045E-07** at limit **
   4  Prefactor     6.9369        6.8102        .44884E-07    .30796E-05
   5  Prefactor     27.209        26.530       -.57980E-06   -.80572E-04
   6  Prefactor     .10000E-03    5.9913       -.39786E-07** at limit **
   7  Prefactor     .10000E-03    31.609       -.94066E-06** at limit **
   8  Prefactor     3.6491        5.5376        .20781E-06   -.80721E-04
   9  norm          .10000E-03    1.4722       -.30959E-08** at limit **
  10  Prefactor     .10000E-03    27.146       -.63523E-06** at limit **
  11  Prefactor     .10000E-03    18.792        .14476E-05** at limit **
  12  Prefactor     4.6931        17.551       -.27063E-06   -.61423E-04
  13  norm          1.9328        4.9838        .92717E-06   -.58104E-04
  14  norm          10.377        9.7801       -.18269E-07   -.43305E-04
  15  norm          7.3439        7.6068       -.14157E-06   -.12443E-03
  16  norm          4.1450        10.288       -.65579E-07   -.47275E-04
  17  norm          1.1405        3.0404        .45921E-05   -.11555E-02
  18  Prefactor     .10000E-03    1.2498        .94457E-07** at limit **
  19  Prefactor     10.493        13.402        .48341E-06   -.59921E-05
  20  Prefactor     .10000E-03    276.09        .29189E-04** at limit **
  21  Prefactor     21.197        41.999       -.39186E-05    .37208E-04
  22  Prefactor     .10000E-03    13.772       -.86936E-06** at limit **
  23  Prefactor     7.4081        37.508       -.15720E-04   -.34007E-03
  24  Prefactor     .10000E-03    25.180       -.14614E-06** at limit **
  25  Prefactor     .10000E-03    36.020        .41915E-06** at limit **
  26  norm          16.426        2.8652        .20303E-07   -.14182E-02
  27  Prefactor     .10000E-03    1.1690        .80341E-08** at limit **
  28  norm          9.9574        10.991        .69237E-07   -.11580E-04
  29  Normalizat    1.2352        .17078       -.30573E-06   -.52395E-03
  30  Prefactor     .53567        .19765       -.94385E-06   -.25372E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 6.03195
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 6.93686
  Prefactor  = 27.2086
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.64908
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.6931
  norm       = 1.93284
  norm       = 10.3767
  norm       = 7.34391
  norm       = 4.14497
  norm       = 1.14048
  Prefactor  = 0.0001
  Prefactor  = 10.4933
  Prefactor  = 0.000100001
  Prefactor  = 21.1966
  Prefactor  = 0.0001
  Prefactor  = 7.40811
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 16.4262
  Prefactor  = 0.0001
  norm       = 9.95745
  Normalizat = 1.2352
  Prefactor  = 0.535674
 **********
 **   18 **HESSE 
 **********

 FCN=   6223.006     FROM HESSE     STATUS=OK           584 CALLS     4478 TOTAL
                     EDM=   .28E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          6.0320        3.1049        .97109E-04   -1.5217    
   2  Prefactor     .10000E-03    11.384        .30631E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    .57327        .58241E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     6.9369        6.8104        .15232E-03   -1.5181    
   5  Prefactor     27.209        26.562        .76804E-04   -1.4664    
   6  Prefactor     .10000E-03    5.9934        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    31.615        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     3.6491        5.4950        .20844E-03   -1.5326    
   9  norm          .10000E-03    1.4760        .93437E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    27.177        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    18.816        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     4.6931        17.205        .18574E-03   -1.5275    
  13  norm          1.9328        4.8710        .25050E-03   -1.5430    
  14  norm          10.377        9.7816        .12438E-03   -1.5064    
  15  norm          7.3439        7.9742        .12753E-03   -1.5166    
  16  norm          4.1450        10.771        .19804E-03   -1.5301    
  17  norm          1.1405        3.1033        .11238E-02   -1.5494    
  18  Prefactor     .10000E-03    1.2547        .85959E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     10.493        13.376        .12367E-03   -1.5060    
  20  Prefactor     .10000E-03    284.07        .42295E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     21.197        41.726        .87042E-04   -1.4787    
  22  Prefactor     .10000E-03    13.840        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     7.4081        40.576        .14742E-03   -1.5164    
  24  Prefactor     .10000E-03    25.503        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    36.058        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          16.426        2.8670        .53014E-04   -1.4897    
  27  Prefactor     .10000E-03    1.1705        .83293E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          9.9574        10.991        .12699E-03   -1.5077    
  29  Normalizat    1.2352        .19382        .20697E-03   -.85522    
  30  Prefactor     .53567        .22047        .35733E-03   -1.1037    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.76751e-09
Minuit parameter uncertainties:
  1  3.10499
  2  0.000181378
  3  1.54774e-07
  4  6.81119
  5  26.5737
  6  3.31097e-06
  7  4.81055e-05
  8  5.4958
  9  5.7495e-07
  10  3.05787e-05
  11  6.82301e-05
  12  17.2229
  13  4.87197
  14  9.78311
  15  7.97539
  16  10.776
  17  3.10372
  18  4.58845e-06
  19  13.3801
  20  0.00114783
  21  41.783
  22  4.99938e-05
  23  34.7111
  24  1.90966e-05
  25  4.77529e-06
  26  2.867
  27  4.82759e-07
  28  10.9935
  29  0.193931
  30  0.220823
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  4.693e+00  1.722e+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:  5.357e-01  2.208e-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.235e+00  1.939e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.10
Ra Dec: 196.008 37.071
Photon Flux Upper Limit: 8.85e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.85e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/189420/likelihoodResults_380073601_380332801_4FGL_J1304.0+3704_daily_bin543.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) = 6222.91748365
delta logL = 0.0887195152418

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6222.91134688
delta logL = 0.0948562865724

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.6704       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0905       1.0000          .0000       10.000    
     3 'Normalizat'    1.2182       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .54697       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.

 FCN=   6222.911     FROM MIGRAD    STATUS=CONVERGED     98 CALLS      259 TOTAL
                     EDM=   .33E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.6596        22.598        .10542E-02   -.89696E-04
   2  Index         3.0944        2.4332        .87306E-02   -.12194E-04
   3  Normalizat    1.2186        .19002        .20816E-03    .86017E-04
   4  Prefactor     .54666        .21946        .35393E-03    .15386E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.65959
  Index      = 3.0944
  Normalizat = 1.2186
  Prefactor  = 0.546659
 **********
 **   18 **HESSE 
 **********

 FCN=   6222.911     FROM HESSE     STATUS=OK            27 CALLS      286 TOTAL
                     EDM=   .49E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.6596        11.165        .42166E-04   -1.5325    
   2  Index         3.0944        1.5410        .34922E-03   -.39101    
   3  Normalizat    1.2186        .19013        .41633E-04   -.86030    
   4  Prefactor     .54666        .21890        .14157E-04   -1.0988    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.86471e-11
Minuit parameter uncertainties:
  1  11.1718
  2  1.57111
  3  0.19024
  4  0.219243
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/189420': 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) = 6222.91133722
delta logL = 0.0948659509741

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  3.660e+00  1.117e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  3.094e+00  1.571e+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:  5.467e-01  2.192e-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.219e+00  1.902e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.10
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/189420/cmap_HighResolution_380073601_380332801_4FGL_J1304.0+3704_daily_bin543.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.85e-03', job_status='DONE', photon_flux_upper_limit='8.85e-08', time_completed='2021-09-06 20:01:17.977071', job_id='189420', GAL2='0.55', fit_tolerance='1e-08', EG2='1.22', EG='1.24', time_epoch_completed='1630983677.98', return_code2='0', ts='0.10', comment='SUCCESS', return_code='0', GAL='0.54', dlogl='9.49e-02', ts2='0.30', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='543' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:01:18 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0084>
Subject: Job 189420: <4FGL_J1304.0+3704_daily_bin543> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin543 196.008 37.071 380073601 380332801 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 :                                   885.27 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             326.72 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   918 sec.
    Turnaround time :                            948 sec.

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

