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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin713
RA = 196.008, Dec = 37.071
tmin = 424137601, tmax = 424396801
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='190725', job_status='RUN', time_executed='2021-09-06 19:53:06.598845', time_epoch_executed='1630983186.6' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='713'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/190725

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/190725/ft1_4FGL_J1304.0+3704_daily_bin713.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/190725/ft2_4FGL_J1304.0+3704_daily_bin713.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/190725/ft1_4FGL_J1304.0+3704_daily_bin713.fits outfile=/scratch/kocevski/190725/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin713.fits ra=196.008 dec=37.071 rad=12.0 tmin=424137601.0 tmax=424396801.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.20
user 4.94
sys 0.22

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/190725/ft1_filtered_4FGL_J1304.0+3704_daily_bin713.fits" evtable="EVENTS" scfile=/scratch/kocevski/190725/ft2_4FGL_J1304.0+3704_daily_bin713.fits sctable="SC_DATA" outfile=/scratch/kocevski/190725/ltcube_424137601_424396801_4FGL_J1304.0+3704_daily_bin713.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/190725/ft2_4FGL_J1304.0+3704_daily_bin713.fits
.....................!
real 15.44
user 15.05
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/190725/ft1_filtered_4FGL_J1304.0+3704_daily_bin713.fits evtable="EVENTS" scfile=/scratch/kocevski/190725/ft2_4FGL_J1304.0+3704_daily_bin713.fits sctable="SC_DATA" expcube=/scratch/kocevski/190725/ltcube_424137601_424396801_4FGL_J1304.0+3704_daily_bin713.fits outfile=/scratch/kocevski/190725/expmap_424137601_424396801_4FGL_J1304.0+3704_daily_bin713.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/190725/ltcube_424137601_424396801_4FGL_J1304.0+3704_daily_bin713.fits
.....................!
real 193.04
user 187.95
sys 4.65

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/190725/ft1_filtered_4FGL_J1304.0+3704_daily_bin713.fits scfile=/scratch/kocevski/190725/ft2_4FGL_J1304.0+3704_daily_bin713.fits outfile=/scratch/kocevski/190725/cmap_424137601_424396801_4FGL_J1304.0+3704_daily_bin713.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.58
user 0.42
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/190725/ft1_filtered_4FGL_J1304.0+3704_daily_bin713.fits scfile=/scratch/kocevski/190725/ft2_4FGL_J1304.0+3704_daily_bin713.fits outfile=/scratch/kocevski/190725/cmap_HighResolution_424137601_424396801_4FGL_J1304.0+3704_daily_bin713.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.59
user 0.41
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    5.5746       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10119E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10231E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10029E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    16.649       1.0000         .10000E-03   10000.    
     7 'Prefactor '    142.42       1.0000         .10000E-03   10000.    
     8 'Prefactor '    4.9587       1.0000         .10000E-03   10000.    
     9 'norm      '    .10099E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10806E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10034E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10313E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    19.898       1.0000         .10000E-03   10000.    
    17 'norm      '    .10046E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .11970E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    28.466       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .15450E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .14176E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10115E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .53197E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10587E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .17047E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    2.4302       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .21541E-02   1.0000         .10000E-03   10000.    
    28 'norm      '    .10017E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.6515       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .57290E-01   1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   906.8743     FROM MIGRAD    STATUS=CONVERGED    114 CALLS     3904 TOTAL
                     EDM=   .94E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          5.5739        1.0414        .14270E-06   -.25972E-06
   2  Prefactor     .10001E-03    7.7004        .10414E-04** at limit **
   3  Prefactor     .10000E-03    3.8506        .40420E-06** at limit **
   4  Prefactor     .10025E-03    14.663       -.17809E-04** at limit **
   5  Prefactor     .10638E-03    28.076        .14899E-04** at limit **
   6  Prefactor     16.653        1.3121        .92688E-06   -.67529E-03
   7  Prefactor     142.41        1.6650       -.51686E-06    .35630E-02
   8  Prefactor     4.9534        1.0371       -.66708E-07    .43659E-04
   9  norm          .10001E-03    9.1431        .87673E-05** at limit **
  10  Prefactor     .10004E-03    28.815        .21754E-04** at limit **
  11  Prefactor     .10064E-03    13.012       -.76884E-05** at limit **
  12  Prefactor     .10062E-03    14.467        .27583E-05** at limit **
  13  norm          .10000E-03    7.4259       -.11441E-05** at limit **
  14  norm          .10000E-03    8.9064        .11381E-04** at limit **
  15  norm          .10004E-03    11.157       -.14371E-04** at limit **
  16  norm          19.912        1.2055        .54402E-07   -.26103E-03
  17  norm          .10001E-03    3.7089       -.57718E-05** at limit **
  18  Prefactor     .10000E-03    4.7414       -.66746E-05** at limit **
  19  Prefactor     28.430        6.3490       -.48559E-05    .53264E-02
  20  Prefactor     .10187E-03    52.886       -.21871E-04** at limit **
  21  Prefactor     .11117E-03    86.719       -.50969E-04** at limit **
  22  Prefactor     .10012E-03    8.8448        .81397E-05** at limit **
  23  Prefactor     .10009E-03    1.5099        .49602E-05** at limit **
  24  Prefactor     .10061E-03    28.309       -.31518E-04** at limit **
  25  Prefactor     .10080E-03    28.978        .17012E-04** at limit **
  26  norm          2.4257        3.0547        .15880E-06    .17258E-03
  27  Prefactor     .10149E-03    8.1202       -.13008E-05** at limit **
  28  norm          .10016E-03    12.426        .22540E-04** at limit **
  29  Normalizat    1.6516        .46448        .40605E-05    .13661E-03
  30  Prefactor     .57991E-01    1.1567       -.10303E-04    .69483E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 5.57386
  Prefactor  = 0.000100006
  Prefactor  = 0.0001
  Prefactor  = 0.00010025
  Prefactor  = 0.000106383
  Prefactor  = 16.6527
  Prefactor  = 142.411
  Prefactor  = 4.95337
  norm       = 0.000100007
  Prefactor  = 0.000100039
  Prefactor  = 0.000100642
  Prefactor  = 0.000100623
  norm       = 0.0001
  norm       = 0.000100004
  norm       = 0.000100043
  norm       = 19.9122
  norm       = 0.000100006
  Prefactor  = 0.000100001
  Prefactor  = 28.4299
  Prefactor  = 0.000101871
  Prefactor  = 0.000111169
  Prefactor  = 0.000100116
  Prefactor  = 0.000100094
  Prefactor  = 0.00010061
  Prefactor  = 0.000100799
  norm       = 2.42574
  Prefactor  = 0.000101485
  norm       = 0.000100158
  Normalizat = 1.65157
  Prefactor  = 0.0579907
 **********
 **   18 **HESSE 
 **********

 FCN=   906.8743     FROM HESSE     STATUS=OK           636 CALLS     4540 TOTAL
                     EDM=   .23E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          5.5739        9.7518        .42539E-02   -1.5236    
   2  Prefactor     .10001E-03    7.8368        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    3.8464        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10025E-03    16.411        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10638E-03    105.82        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     16.653        114.72        .24539E-02   -1.4892    
   7  Prefactor     142.41        437.74        .84399E-03   -1.3316    
   8  Prefactor     4.9534        29.610        .45151E-02   -1.5263    
   9  norm          .10001E-03    9.1850        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10004E-03    77.359        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10064E-03    32.434        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10062E-03    23.010        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    7.4265        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    27.382        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10004E-03    11.372        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          19.912        20.028        .22447E-02   -1.4815    
  17  norm          .10001E-03    8.1000        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    8.1700        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     28.430        47.483        .18773E-02   -1.4641    
  20  Prefactor     .10187E-03    146.64        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .11117E-03    186.74        .90712E-02   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10012E-03    28.631        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10009E-03    123.41        .10563E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10061E-03    44.623        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10080E-03    71.748        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          2.4257        3.0647        .65626E-02   -1.5396    
  27  Prefactor     .10149E-03    21.815        .79114E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .10016E-03    13.402        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.6516        .62027        .28389E-01   -.73604    
  30  Prefactor     .57991E-01    1.8260        .33020E-01   -1.4183    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.33252e-06
Minuit parameter uncertainties:
  1  9.75461
  2  0.00043165
  3  6.53216e-05
  4  0.00405369
  5  0.0520724
  6  87.6569
  7  448.362
  8  24.2392
  9  0.000515936
  10  0.00347628
  11  0.00913326
  12  0.00757597
  13  1.96234e-05
  14  0.000680116
  15  0.00140376
  16  20.0344
  17  0.000422838
  18  0.000219171
  19  47.5461
  20  0.0332062
  21  0.0916265
  22  0.003641
  23  0.00683004
  24  0.0104458
  25  0.0151586
  26  3.06494
  27  0.0113879
  28  0.00290992
  29  0.623209
  30  0.674706
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.006e-04  7.576e-03  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.799e-02  6.747e-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.652e+00  6.232e-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: 2.54e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.97e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/190725/likelihoodResults_424137601_424396801_4FGL_J1304.0+3704_daily_bin713.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) = 906.874530447
delta logL = -0.000191175939335

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 906.874339257
delta logL = 1.44773366628e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10238E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4078       1.0000          .0000       10.000    
     3 'Normalizat'    1.6517       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .57900E-01   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=   906.8743     FROM MIGRAD    STATUS=CONVERGED     91 CALLS      249 TOTAL
                     EDM=   .10E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10666E-03    38.952        .14659E-01** at limit **
   2  Index         2.2744        6.2083        .50000        .93670E-05
   3  Normalizat    1.6516        .11718E-01    .17667E-03    .49629E-05
   4  Prefactor     .57997E-01    .13322E-01    .97549E-03    .18414E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000106663
  Index      = 2.27444
  Normalizat = 1.65157
  Prefactor  = 0.0579965
 **********
 **   18 **HESSE 
 **********

 FCN=   906.8743     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      278 TOTAL
                     EDM=   .94E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10666E-03    342.74        .15599E-02   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.2744        5.2230        .50000       -.57652    
   3  Normalizat    1.6516        .35329E-01    .70668E-05   -.73604    
   4  Prefactor     .57997E-01    .40151E-01    .39019E-04   -1.4183    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 9.35331e-09
Minuit parameter uncertainties:
  1  0.0961272
  2  737.926
  3  0.03533
  4  0.0401697
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/190725': 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): 102
logL (Free Index) = 906.874338983
delta logL = 2.88712385554e-07

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.067e-04  9.613e-02  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.274e+00  7.379e+02  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.800e-02  4.017e-02  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.652e+00  3.533e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
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/190725/cmap_HighResolution_424137601_424396801_4FGL_J1304.0+3704_daily_bin713.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.97e-02', job_status='DONE', photon_flux_upper_limit='2.54e-07', time_completed='2021-09-06 20:00:17.626674', job_id='190725', GAL2='0.06', fit_tolerance='1e-08', EG2='1.65', EG='1.65', time_epoch_completed='1630983617.63', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.06', dlogl='2.89e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='713' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:00:17 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0080>
Subject: Job 190725: <4FGL_J1304.0+3704_daily_bin713> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin713> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Mon Sep  6 19:50:15 2021
Job was executed on host(s) <bullet0080>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:50:17 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 19:50:17 2021
Terminated at Mon Sep  6 20:00:18 2021
Results reported at Mon Sep  6 20:00:18 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin713 196.008 37.071 424137601 424396801 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 :                                   430.09 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             282.26 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   600 sec.
    Turnaround time :                            603 sec.

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

