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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin236
RA = 196.008, Dec = 37.071
tmin = 300499201, tmax = 300758401
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='186687', job_status='RUN', time_executed='2021-09-06 19:36:01.986837', time_epoch_executed='1630982161.99' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='236'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/186687

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/186687/ft1_4FGL_J1304.0+3704_daily_bin236.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/186687/ft2_4FGL_J1304.0+3704_daily_bin236.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/186687/ft1_4FGL_J1304.0+3704_daily_bin236.fits outfile=/scratch/kocevski/186687/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin236.fits ra=196.008 dec=37.071 rad=12.0 tmin=300499201.0 tmax=300758401.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.57
user 3.29
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/186687/ft1_filtered_4FGL_J1304.0+3704_daily_bin236.fits" evtable="EVENTS" scfile=/scratch/kocevski/186687/ft2_4FGL_J1304.0+3704_daily_bin236.fits sctable="SC_DATA" outfile=/scratch/kocevski/186687/ltcube_300499201_300758401_4FGL_J1304.0+3704_daily_bin236.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/186687/ft2_4FGL_J1304.0+3704_daily_bin236.fits
.....................!
real 16.07
user 15.58
sys 0.40

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/186687/ft1_filtered_4FGL_J1304.0+3704_daily_bin236.fits evtable="EVENTS" scfile=/scratch/kocevski/186687/ft2_4FGL_J1304.0+3704_daily_bin236.fits sctable="SC_DATA" expcube=/scratch/kocevski/186687/ltcube_300499201_300758401_4FGL_J1304.0+3704_daily_bin236.fits outfile=/scratch/kocevski/186687/expmap_300499201_300758401_4FGL_J1304.0+3704_daily_bin236.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/186687/ltcube_300499201_300758401_4FGL_J1304.0+3704_daily_bin236.fits
.....................!
real 192.38
user 186.06
sys 5.44

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/186687/ft1_filtered_4FGL_J1304.0+3704_daily_bin236.fits scfile=/scratch/kocevski/186687/ft2_4FGL_J1304.0+3704_daily_bin236.fits outfile=/scratch/kocevski/186687/cmap_300499201_300758401_4FGL_J1304.0+3704_daily_bin236.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.59
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/186687/ft1_filtered_4FGL_J1304.0+3704_daily_bin236.fits scfile=/scratch/kocevski/186687/ft2_4FGL_J1304.0+3704_daily_bin236.fits outfile=/scratch/kocevski/186687/cmap_HighResolution_300499201_300758401_4FGL_J1304.0+3704_daily_bin236.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.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    1.7541       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    3.5624       1.0000         .10000E-03   10000.    
     4 'Prefactor '    7.9919       1.0000         .10000E-03   10000.    
     5 'Prefactor '    21.731       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    6.7807       1.0000         .10000E-03   10000.    
     9 'norm      '    16.512       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    11.643       1.0000         .10000E-03   10000.    
    13 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    14.408       1.0000         .10000E-03   10000.    
    15 'norm      '    11.893       1.0000         .10000E-03   10000.    
    16 'norm      '    1.7028       1.0000         .10000E-03   10000.    
    17 'norm      '    30.045       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    86.887       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .11755E-01   1.0000         .10000E-03   10000.    
    23 'Prefactor '    40.070       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10264E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    .26174       1.0000         .10000E-03   10000.    
    27 'Prefactor '    14.261       1.0000         .10000E-03   10000.    
    28 'norm      '    .10011E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.0360       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .96207       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=   6743.281     FROM MIGRAD    STATUS=CONVERGED    770 CALLS     3918 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  7.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.7543        2.9271       -.19274E-06    .18973E-03
   2  Prefactor     .10000E-03    3.4994        .11139E-06** at limit **
   3  Prefactor     3.5625        2.4412        .52091E-07    .11258E-04
   4  Prefactor     7.9929        7.5360        .34045E-07    .12118E-04
   5  Prefactor     21.729        30.753       -.67373E-07   -.66764E-06
   6  Prefactor     .10000E-03    5.4213       -.36177E-08** at limit **
   7  Prefactor     .10000E-03    16.080        .18508E-06** at limit **
   8  Prefactor     6.7828        5.8835       -.55267E-07    .52721E-04
   9  norm          16.514        5.6716       -.28350E-07    .19976E-03
  10  Prefactor     .10000E-03    21.811       -.67459E-07** at limit **
  11  Prefactor     .10000E-03    7.9192       -.13952E-06** at limit **
  12  Prefactor     11.645        11.447       -.62486E-07    .13827E-04
  13  norm          .10000E-03    1.1815       -.12332E-07** at limit **
  14  norm          14.409        10.890        .30904E-06   -.14559E-03
  15  norm          11.898        5.8956        .15619E-05    .11660E-02
  16  norm          1.6953        9.2676       -.62334E-05    .45894E-04
  17  norm          30.045        8.0106        .63520E-07    .24963E-04
  18  Prefactor     .10000E-03    .69172       -.69210E-08** at limit **
  19  Prefactor     .10000E-03    4.1851        .13653E-10** at limit **
  20  Prefactor     86.937        61.325       -.13910E-05    .77391E-04
  21  Prefactor     .10000E-03    26.149        .23179E-06** at limit **
  22  Prefactor     .10003E-03    97.841        .38758E-04** at limit **
  23  Prefactor     39.912        46.882        .23062E-06    .30784E-03
  24  Prefactor     .10000E-03    28.238        .79220E-06** at limit **
  25  Prefactor     .10000E-03    18.491       -.13823E-06** at limit **
  26  norm          .26342        1.0249        .77406E-06    .11700E-02
  27  Prefactor     14.261        6.1159        .10971E-06   -.21029E-03
  28  norm          .10000E-03    8.6360        .83522E-07** at limit **
  29  Normalizat    1.0356        .16758        .12498E-05    .46643E-03
  30  Prefactor     .96229        .20081       -.24666E-05   -.13521E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 1.75428
  Prefactor  = 0.0001
  Prefactor  = 3.56255
  Prefactor  = 7.9929
  Prefactor  = 21.7291
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.78283
  norm       = 16.5135
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 11.6448
  norm       = 0.0001
  norm       = 14.4092
  norm       = 11.898
  norm       = 1.69526
  norm       = 30.0451
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 86.9368
  Prefactor  = 0.0001
  Prefactor  = 0.000100029
  Prefactor  = 39.9118
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.263417
  Prefactor  = 14.261
  norm       = 0.0001
  Normalizat = 1.03563
  Prefactor  = 0.962285
 **********
 **   18 **HESSE 
 **********

 FCN=   6743.281     FROM HESSE     STATUS=OK           592 CALLS     4510 TOTAL
                     EDM=   .37E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.7543        2.9000        .16757E-03   -1.5443    
   2  Prefactor     .10000E-03    3.5228        .15001E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     3.5625        2.4413        .98068E-04   -1.5330    
   4  Prefactor     7.9929        7.5315        .14183E-03   -1.5142    
   5  Prefactor     21.729        30.775        .85922E-04   -1.4775    
   6  Prefactor     .10000E-03    5.4223        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    16.082        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     6.7828        5.8749        .15409E-03   -1.5187    
   9  norm          16.514        5.6714        .98563E-04   -1.4895    
  10  Prefactor     .10000E-03    21.824        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    7.9258        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     11.645        11.438        .11741E-03   -1.5025    
  13  norm          .10000E-03    1.1830        .87154E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          14.409        10.885        .52759E-03   -1.4949    
  15  norm          11.898        5.8957        .96423E-04   -1.5018    
  16  norm          1.6953        9.2543        .32232E-03   -1.5448    
  17  norm          30.045        8.0112        .73095E-04   -1.4611    
  18  Prefactor     .10000E-03    .69397        .66678E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    4.1938        .16405E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     86.937        61.391        .43101E-04   -1.3840    
  21  Prefactor     .10000E-03    26.182        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10003E-03    97.920        .55345E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     39.912        46.805        .31661E-03   -1.4444    
  24  Prefactor     .10000E-03    28.454        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    18.494        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          .26342        1.7559        .15243E-02   -1.5605    
  27  Prefactor     14.261        6.0929        .10606E-03   -1.4953    
  28  norm          .10000E-03    8.7031        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.0356        .19323        .23560E-03   -.91846    
  30  Prefactor     .96229        .23605        .30529E-03   -.93997    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.66087e-09
Minuit parameter uncertainties:
  1  2.9002
  2  2.40153e-05
  3  2.44139
  4  7.53238
  5  30.7971
  6  9.61119e-06
  7  4.01118e-05
  8  5.87542
  9  5.67161
  10  1.11401e-05
  11  7.02664e-06
  12  11.4405
  13  1.49299e-06
  14  10.8863
  15  5.89599
  16  7.92339
  17  8.01151
  18  4.49719e-07
  19  3.05729e-08
  20  61.4359
  21  6.6261e-05
  22  0.00334764
  23  46.8482
  24  8.40045e-05
  25  1.12016e-05
  26  1.36001
  27  6.09315
  28  3.52246e-05
  29  0.193361
  30  0.236307
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.164e+01  1.144e+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.623e-01  2.363e-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.036e+00  1.934e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.97
Ra Dec: 196.008 37.071
Photon Index (Fixed Index): 2.44 +/- 0.00
Photon Flux (Fixed Index): 2.39e-08 +/- 2.35e-08
Energy Flux (Fixed Index): 7.48e-06 +/- 7.35e-06

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

Saving results to:
/scratch/kocevski/186687/likelihoodResults_300499201_300758401_4FGL_J1304.0+3704_daily_bin236.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) = 6743.23418963
delta logL = 0.0470192581051

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6743.23074541
delta logL = 0.0504634786967

Fit tolerance = 1e-08

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

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

 FCN=   6743.231     FROM MIGRAD    STATUS=CONVERGED     48 CALLS      230 TOTAL
                     EDM=   .64E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     14.082        413.25        .26684E-02    .17447E-03
   2  Index         2.1857        5.9397        .24826        .35426E-04
   3  Normalizat    1.0414        .72697E-01    .41186E-01    .30020E-04
   4  Prefactor     .95762        .71048E-01    .69158E-01    .17678E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 14.0818
  Index      = 2.18572
  Normalizat = 1.04138
  Prefactor  = 0.957624
 **********
 **   18 **HESSE 
 **********

 FCN=   6743.231     FROM HESSE     STATUS=OK            33 CALLS      263 TOTAL
                     EDM=   .66E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     14.082        15.040        .10674E-03   -1.4957    
   2  Index         2.1857        .77172        .93105E-02   -.59784    
   3  Normalizat    1.0414        .18674        .23502E-03   -.91657    
   4  Prefactor     .95762        .23393        .30593E-03   -.94156    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.56595e-10
Minuit parameter uncertainties:
  1  15.0441
  2  0.776278
  3  0.18686
  4  0.234175
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/186687': 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) = 6743.23074182
delta logL = 0.0504670622286

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.408e+01  1.504e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.186e+00  7.763e-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.576e-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:  1.041e+00  1.869e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.07
Ra Dec: 196.008 37.071
Photon Index (Free Index): 2.19 +/- 0.78
Photon Flux (Free Index): 1.95e-08 +/- 2.33e-08
Energy Flux (Free Index): 9.00e-06 +/- 1.11e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/186687/cmap_HighResolution_300499201_300758401_4FGL_J1304.0+3704_daily_bin236.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.37e-03', comment='SUCCESS', photon_flux='2.39e-08', energy_flux2='9.00e-06', photon_flux_error='2.35e-08', dlogl='5.05e-02', energy_flux='7.48e-06', photon_flux2='1.95e-08', job_status='DONE', time_completed='2021-09-06 19:51:51.235666', photon_index_error2='0.78', photon_index2='2.19', ts='1.97', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', photon_flux_upper_limit='8.22e-08', energy_flux_error2='1.11e-05', EG='1.04', time_epoch_completed='1630983111.24', return_code='0', job_id='186687', GAL2='0.96', EG2='1.04', return_code2='0', energy_flux_error='7.35e-06', photon_flux_error2='2.33e-08', ts2='2.07', photon_index='2.44' WHERE bin_id='236' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:51:51 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0158>
Subject: Job 186687: <4FGL_J1304.0+3704_daily_bin236> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin236> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Mon Sep  6 19:35:40 2021
Job was executed on host(s) <bullet0158>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:35: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:35:41 2021
Terminated at Mon Sep  6 19:51:52 2021
Results reported at Mon Sep  6 19:51:52 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin236 196.008 37.071 300499201 300758401 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 :                                   941.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             312.68 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   970 sec.
    Turnaround time :                            972 sec.

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

