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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin127
RA = 196.008, Dec = 37.071
tmin = 272246401, tmax = 272505601
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='184018', job_status='RUN', time_executed='2021-09-06 19:26:18.179817', time_epoch_executed='1630981578.18' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='127'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/184018

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/184018/ft1_4FGL_J1304.0+3704_daily_bin127.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/184018/ft2_4FGL_J1304.0+3704_daily_bin127.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/184018/ft1_4FGL_J1304.0+3704_daily_bin127.fits outfile=/scratch/kocevski/184018/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin127.fits ra=196.008 dec=37.071 rad=12.0 tmin=272246401.0 tmax=272505601.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 2.50
user 2.26
sys 0.22

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/184018/ft1_filtered_4FGL_J1304.0+3704_daily_bin127.fits evtable="EVENTS" scfile=/scratch/kocevski/184018/ft2_4FGL_J1304.0+3704_daily_bin127.fits sctable="SC_DATA" expcube=/scratch/kocevski/184018/ltcube_272246401_272505601_4FGL_J1304.0+3704_daily_bin127.fits outfile=/scratch/kocevski/184018/expmap_272246401_272505601_4FGL_J1304.0+3704_daily_bin127.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/184018/ltcube_272246401_272505601_4FGL_J1304.0+3704_daily_bin127.fits
.....................!
real 191.56
user 185.85
sys 5.31

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/184018/ft1_filtered_4FGL_J1304.0+3704_daily_bin127.fits scfile=/scratch/kocevski/184018/ft2_4FGL_J1304.0+3704_daily_bin127.fits outfile=/scratch/kocevski/184018/cmap_272246401_272505601_4FGL_J1304.0+3704_daily_bin127.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.50
user 0.37
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/184018/ft1_filtered_4FGL_J1304.0+3704_daily_bin127.fits scfile=/scratch/kocevski/184018/ft2_4FGL_J1304.0+3704_daily_bin127.fits outfile=/scratch/kocevski/184018/cmap_HighResolution_272246401_272505601_4FGL_J1304.0+3704_daily_bin127.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.37
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    4.2998       1.0000         .10000E-03   10000.    
     2 'Prefactor '    7.0607       1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.4507       1.0000         .10000E-03   10000.    
     4 'Prefactor '    2.2111       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10489E-03   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 '    .20810E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    20.655       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    3.6985       1.0000         .10000E-03   10000.    
    15 'norm      '    11.627       1.0000         .10000E-03   10000.    
    16 'norm      '    .10018E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10100E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10030E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    73.069       1.0000         .10000E-03   10000.    
    21 'Prefactor '    56.425       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    10.765       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    .10055E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.0568       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .84789       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=   4587.052     FROM MIGRAD    STATUS=CONVERGED    807 CALLS     4560 TOTAL
                     EDM=   .57E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          4.2999        3.2393       -.15526E-07    .66255E-04
   2  Prefactor     7.0624        9.9362       -.64662E-06   -.89630E-04
   3  Prefactor     1.4508        1.4459        .22563E-07    .22273E-03
   4  Prefactor     2.2116        6.5341       -.13676E-05   -.42048E-03
   5  Prefactor     .10000E-03    118.42        .37600E-05** at limit **
   6  Prefactor     .10000E-03    9.8517       -.12229E-07** at limit **
   7  Prefactor     .10000E-03    20.119       -.16548E-05** at limit **
   8  Prefactor     .16157E-01    5.6653       -.12148E-05    .29661E-03
   9  norm          .10000E-03    1.1205       -.43092E-08** at limit **
  10  Prefactor     20.646        86.625       -.33346E-05    .17878E-04
  11  Prefactor     .10000E-03    12.165        .19849E-07** at limit **
  12  Prefactor     .10000E-03    5.1317        .98994E-09** at limit **
  13  norm          .10000E-03    1.5995       -.14396E-07** at limit **
  14  norm          3.7043        17.831       -.13616E-04   -.58759E-04
  15  norm          11.627        5.3442       -.15317E-06    .16927E-03
  16  norm          .10000E-03    6.8038       -.91772E-07** at limit **
  17  norm          .10000E-03    2.2202        .11697E-06** at limit **
  18  Prefactor     .10000E-03    2.8162       -.12364E-06** at limit **
  19  Prefactor     .10000E-03    5.7548       -.46367E-07** at limit **
  20  Prefactor     73.005        61.312       -.98260E-05    .47482E-05
  21  Prefactor     56.446        61.530        .46172E-05    .11887E-04
  22  Prefactor     .10000E-03    4.6658       -.23063E-07** at limit **
  23  Prefactor     .10027E-03    523.11        .34712E-06** at limit **
  24  Prefactor     .10000E-03    8.5061       -.13048E-07** at limit **
  25  Prefactor     .10000E-03    86.706       -.28608E-05** at limit **
  26  norm          10.765        2.8163        .10850E-06    .37068E-04
  27  Prefactor     .10000E-03    1.3538       -.15964E-07** at limit **
  28  norm          .10000E-03    19.066        .18138E-05** at limit **
  29  Normalizat    1.0569        .18418        .12247E-05    .11261E-03
  30  Prefactor     .84764        .22617        .10673E-05    .97946E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 4.29992
  Prefactor  = 7.06242
  Prefactor  = 1.45078
  Prefactor  = 2.21165
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0161571
  norm       = 0.0001
  Prefactor  = 20.6458
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 3.7043
  norm       = 11.6271
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 73.0048
  Prefactor  = 56.4461
  Prefactor  = 0.0001
  Prefactor  = 0.00010027
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 10.7654
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 1.05687
  Prefactor  = 0.847643
 **********
 **   18 **HESSE 
 **********

 FCN=   4587.052     FROM HESSE     STATUS=OK           586 CALLS     5146 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          4.2999        3.2391        .10237E-03   -1.5293    
   2  Prefactor     7.0624        9.9464        .15097E-03   -1.5176    
   3  Prefactor     1.4508        1.4663        .78817E-04   -1.5467    
   4  Prefactor     2.2116        6.5923        .27662E-03   -1.5411    
   5  Prefactor     .10000E-03    119.76        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    9.8574        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    20.120        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .16157E-01    5.9857        .48947E-01   -1.5683    
   9  norm          .10000E-03    1.1214        .70010E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     20.646        85.851        .88130E-04   -1.4799    
  11  Prefactor     .10000E-03    12.181        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    5.1342        .14984E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    1.6016        .83645E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          3.7043        17.959        .21000E-03   -1.5323    
  15  norm          11.627        4.7574        .89824E-04   -1.5026    
  16  norm          .10000E-03    16.250        .30535E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    2.2267        .98554E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    2.8899        .22130E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    5.7623        .15865E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     73.005        60.854        .46967E-04   -1.3997    
  21  Prefactor     56.446        61.461        .53403E-04   -1.4204    
  22  Prefactor     .10000E-03    4.6690        .14288E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10027E-03    537.20        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    8.5137        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    87.077        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          10.765        2.8163        .55728E-04   -1.5052    
  27  Prefactor     .10000E-03    1.3575        .76959E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .10000E-03    19.230        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.0569        .21499        .21914E-03   -.91149    
  30  Prefactor     .84764        .26313        .30090E-03   -.97995    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.40771e-09
Minuit parameter uncertainties:
  1  3.23921
  2  9.94871
  3  1.46633
  4  6.59442
  5  0.000145252
  6  4.72885e-08
  7  5.00215e-06
  8  0.620106
  9  7.25014e-07
  10  84.4101
  11  9.03691e-06
  12  5.77727e-07
  13  1.31115e-06
  14  16.3205
  15  4.75754
  16  0.00011977
  17  1.72869e-05
  18  1.98546e-05
  19  1.11461e-05
  20  60.9063
  21  61.5297
  22  4.29084e-06
  23  0.0242905
  24  5.41807e-06
  25  0.000115467
  26  2.81638
  27  1.65061e-06
  28  4.31914e-05
  29  0.215168
  30  0.263527
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  5.777e-07  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:  8.476e-01  2.635e-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.057e+00  2.152e-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: 5.57e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.31e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/184018/likelihoodResults_272246401_272505601_4FGL_J1304.0+3704_daily_bin127.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) = 4587.05264114
delta logL = -0.000922220034226

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4587.05171893
delta logL = -4.93128027301e-09

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10108E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4172       1.0000          .0000       10.000    
     3 'Normalizat'    1.0569       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .84758       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=   4587.052     FROM MIGRAD    STATUS=CONVERGED    101 CALLS      254 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    33.448        .15191E-01** at limit **
   2  Index         1.7954        5.9715        .50000        .53140E-06
   3  Normalizat    1.0569        .10082E-01    .21914E-03    .89607E-04
   4  Prefactor     .84764        .12585E-01    .30090E-03    .53310E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Index      = 1.79539
  Normalizat = 1.05687
  Prefactor  = 0.847642
 **********
 **   18 **HESSE 
 **********

 FCN=   4587.052     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      283 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    320.66        .17275E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.7954        8.7511        .50000       -.69570    
   3  Normalizat    1.0569        .32938E-01    .43827E-04   -.91149    
   4  Prefactor     .84764        .41118E-01    .12036E-04   -.97995    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.08542e-08
Minuit parameter uncertainties:
  1  0.000837641
  2  1195
  3  0.0329391
  4  0.041119
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/184018': 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) = 4587.05171651
delta logL = 2.4089767976e-06

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  8.376e-04  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  1.795e+00  1.195e+03  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:  8.476e-01  4.112e-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.057e+00  3.294e-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/184018/cmap_HighResolution_272246401_272505601_4FGL_J1304.0+3704_daily_bin127.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.31e-03', job_status='DONE', photon_flux_upper_limit='5.57e-08', time_completed='2021-09-06 19:39:13.589486', job_id='184018', GAL2='0.85', fit_tolerance='1e-08', EG2='1.06', EG='1.06', time_epoch_completed='1630982353.59', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.85', dlogl='2.41e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='127' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:39:13 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0038>
Subject: Job 184018: <4FGL_J1304.0+3704_daily_bin127> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin127> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Mon Sep  6 19:25:47 2021
Job was executed on host(s) <bullet0038>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:26:08 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:26:08 2021
Terminated at Mon Sep  6 19:39:14 2021
Results reported at Mon Sep  6 19:39:14 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin127 196.008 37.071 272246401 272505601 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 :                                   772.22 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             299.04 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   785 sec.
    Turnaround time :                            807 sec.

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

