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


Performing analysis on: 4FGL_J1516.8+3651_daily_bin658
RA = 229.222, Dec = 36.8505
tmin = 409881601, tmax = 410140801
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='442241', job_status='RUN', time_executed='2021-09-11 22:41:15.553397', time_epoch_executed='1631425275.55' WHERE source_name='4FGL J1516.8+3651' and cadence='daily' and bin_id='658'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/442241

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/442241/ft1_4FGL_J1516.8+3651_daily_bin658.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/442241/ft2_4FGL_J1516.8+3651_daily_bin658.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/442241/ft1_4FGL_J1516.8+3651_daily_bin658.fits outfile=/scratch/kocevski/442241/ft1_filteredMKT_4FGL_J1516.8+3651_daily_bin658.fits ra=229.222 dec=36.8505 rad=12.0 tmin=409881601.0 tmax=410140801.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 6.30
user 6.03
sys 0.25

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/442241/ft2_4FGL_J1516.8+3651_daily_bin658.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/442241/ft2_4FGL_J1516.8+3651_daily_bin658.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/442241/ft1_filteredMKT_4FGL_J1516.8+3651_daily_bin658.fits evtable="EVENTS" outfile="/scratch/kocevski/442241/ft1_filtered_4FGL_J1516.8+3651_daily_bin658.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.49
user 0.33
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/442241/ft1_filtered_4FGL_J1516.8+3651_daily_bin658.fits" evtable="EVENTS" scfile=/scratch/kocevski/442241/ft2_4FGL_J1516.8+3651_daily_bin658.fits sctable="SC_DATA" outfile=/scratch/kocevski/442241/ltcube_409881601_410140801_4FGL_J1516.8+3651_daily_bin658.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/442241/ft2_4FGL_J1516.8+3651_daily_bin658.fits
.....................!
real 11.97
user 11.56
sys 0.37

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/442241/ft1_filtered_4FGL_J1516.8+3651_daily_bin658.fits evtable="EVENTS" scfile=/scratch/kocevski/442241/ft2_4FGL_J1516.8+3651_daily_bin658.fits sctable="SC_DATA" expcube=/scratch/kocevski/442241/ltcube_409881601_410140801_4FGL_J1516.8+3651_daily_bin658.fits outfile=/scratch/kocevski/442241/expmap_409881601_410140801_4FGL_J1516.8+3651_daily_bin658.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/442241/ltcube_409881601_410140801_4FGL_J1516.8+3651_daily_bin658.fits
.....................!
real 191.12
user 185.53
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 185 point sources and 0 extended sources

Setting source of interest to:
4FGL J1516.8+3651 @ 229.222 36.8505

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/442241/ft1_filtered_4FGL_J1516.8+3651_daily_bin658.fits scfile=/scratch/kocevski/442241/ft2_4FGL_J1516.8+3651_daily_bin658.fits outfile=/scratch/kocevski/442241/cmap_409881601_410140801_4FGL_J1516.8+3651_daily_bin658.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=229.222 yref=36.8505 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.53
user 0.37
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/442241/ft1_filtered_4FGL_J1516.8+3651_daily_bin658.fits scfile=/scratch/kocevski/442241/ft2_4FGL_J1516.8+3651_daily_bin658.fits outfile=/scratch/kocevski/442241/cmap_HighResolution_409881601_410140801_4FGL_J1516.8+3651_daily_bin658.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=229.222 yref=36.8505 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.54
user 0.35
sys 0.18

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/442241/ft1_filtered_4FGL_J1516.8+3651_daily_bin658.fits evtable="EVENTS" scfile=/scratch/kocevski/442241/ft2_4FGL_J1516.8+3651_daily_bin658.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/442241/Model_4FGL_J1516.8+3651_daily_bin658.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/442241/ft1_filtered_4FGL_J1516.8+3651_daily_bin658.fits.....................!
real 38.34
user 36.99
sys 1.22

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/442241/ft1_filtered_4FGL_J1516.8+3651_daily_bin658.fits', '/scratch/kocevski/442241/ft2_4FGL_J1516.8+3651_daily_bin658.fits', expMap='/scratch/kocevski/442241/expmap_409881601_410140801_4FGL_J1516.8+3651_daily_bin658.fits', expCube='/scratch/kocevski/442241/ltcube_409881601_410140801_4FGL_J1516.8+3651_daily_bin658.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/442241/Model_4FGL_J1516.8+3651_daily_bin658.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1516.8+3651'

4FGL J1516.8+3651
   Spectrum: PowerLaw
279    Prefactor:  6.183e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
280        Index:  2.190e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
281        Scale:  1.677e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/442241/ft1_filtered_4FGL_J1516.8+3651_daily_bin658.fits
Spacecraft file(s): /scratch/kocevski/442241/ft2_4FGL_J1516.8+3651_daily_bin658.fits
Exposure map: /scratch/kocevski/442241/expmap_409881601_410140801_4FGL_J1516.8+3651_daily_bin658.fits
Exposure cube: /scratch/kocevski/442241/ltcube_409881601_410140801_4FGL_J1516.8+3651_daily_bin658.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/442241/Model_4FGL_J1516.8+3651_daily_bin658.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) = 4159.67354625

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    10.507       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10128E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    20.863       1.0000         .10000E-03   10000.    
     6 'norm      '    19.825       1.0000         .10000E-03   10000.    
     7 'Prefactor '    43.643       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    8.6721       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.6045       1.0000         .10000E-03   10000.    
    13 'norm      '    6.7390       1.0000         .10000E-03   10000.    
    14 'norm      '    11.113       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    21.533       1.0000         .10000E-03   10000.    
    17 'Prefactor '    26.898       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    9.1904       1.0000         .10000E-03   10000.    
    21 'Prefactor '    25.403       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    6.5091       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    .81427       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .65655       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5940E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   4159.641     FROM MIGRAD    STATUS=CONVERGED    703 CALLS     3667 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          10.506        7.2066        .40495E-07    .26758E-04
   2  Prefactor     .10000E-03    10.787       -.28310E-05** at limit **
   3  Prefactor     .10000E-03    34.008        .29436E-05** at limit **
   4  norm          .10000E-03    16.759       -.43335E-05** at limit **
   5  Prefactor     20.859        30.902       -.24817E-05   -.44630E-04
   6  norm          19.825        12.490        .30882E-06   -.90986E-04
   7  Prefactor     43.643        47.470        .24220E-06   -.18778E-06
   8  Prefactor     .10000E-03    13.176        .60296E-05** at limit **
   9  norm          8.6720        12.492        .20172E-06   -.16714E-03
  10  Prefactor     .10000E-03    8.5121        .21558E-05** at limit **
  11  Prefactor     .10000E-03    4.3042        .99886E-07** at limit **
  12  Prefactor     1.6015        7.5581        .38985E-05   -.10222E-02
  13  norm          6.7387        3.3459       -.86188E-06   -.47746E-05
  14  norm          11.113        6.9693       -.98372E-07    .32042E-04
  15  Prefactor     .10000E-03    7.0446       -.20485E-05** at limit **
  16  Prefactor     21.563        114.19        .43592E-04    .62027E-04
  17  Prefactor     26.897        13.723        .21771E-06   -.17784E-04
  18  Prefactor     .10000E-03    9.2137       -.22546E-05** at limit **
  19  Prefactor     .10000E-03    7.3165        .21723E-05** at limit **
  20  norm          9.1901        2.6927       -.70560E-07   -.11775E-03
  21  Prefactor     25.404        16.927        .28295E-07   -.28596E-04
  22  Prefactor     .10000E-03    11.518        .15203E-06** at limit **
  23  Prefactor     .10000E-03    8.7451        .61948E-06** at limit **
  24  norm          .10000E-03    5.7597        .21823E-06** at limit **
  25  Prefactor     6.5091        3.5810        .92735E-07   -.56439E-04
  26  Prefactor     .10000E-03    60.628       -.24250E-05** at limit **
  27  Prefactor     .10000E-03    2.5350       -.19771E-06** at limit **
  28  Normalizat    .81425        .22070       -.11274E-05   -.32007E-04
  29  Prefactor     .65657        .18523       -.50585E-06   -.30515E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 10.5062
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 20.8588
  norm       = 19.8249
  Prefactor  = 43.6427
  Prefactor  = 0.0001
  norm       = 8.67197
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 1.60149
  norm       = 6.73872
  norm       = 11.113
  Prefactor  = 0.0001
  Prefactor  = 21.5629
  Prefactor  = 26.8974
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 9.19006
  Prefactor  = 25.4043
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 6.50911
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.81425
  Prefactor  = 0.656571
 **********
 **   18 **HESSE 
 **********

 FCN=   4159.641     FROM HESSE     STATUS=OK           549 CALLS     4216 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          10.506        7.2089        .12361E-03   -1.5060    
   2  Prefactor     .10000E-03    10.800        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    34.397        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .10000E-03    16.830        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     20.859        31.032        .87691E-04   -1.4794    
   6  norm          19.825        12.539        .44977E-03   -1.4817    
   7  Prefactor     43.643        47.469        .60685E-04   -1.4386    
   8  Prefactor     .10000E-03    13.209        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          8.6720        12.510        .68059E-03   -1.5119    
  10  Prefactor     .10000E-03    8.5259        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    4.3080        .13064E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     1.6015        31.406        .16729E-02   -1.5455    
  13  norm          6.7387        3.3637        .73070E-04   -1.5189    
  14  norm          11.113        7.0276        .12018E-03   -1.5041    
  15  Prefactor     .10000E-03    7.0534        .16710E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     21.563        114.97        .86316E-04   -1.4779    
  17  Prefactor     26.897        13.759        .77244E-04   -1.4670    
  18  Prefactor     .10000E-03    9.2204        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    7.3265        .17041E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          9.1901        2.7163        .46096E-04   -1.5102    
  21  Prefactor     25.404        17.071        .79479E-04   -1.4699    
  22  Prefactor     .10000E-03    11.519        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    8.7473        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          .10000E-03    5.7622        .15117E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     6.5091        3.5842        .84479E-04   -1.5198    
  26  Prefactor     .10000E-03    61.454        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    2.5585        .10024E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    .81425        .25351        .26849E-03   -.99542    
  29  Prefactor     .65657        .20943        .25985E-03   -1.0525    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.32331e-08
Minuit parameter uncertainties:
  1  7.20952
  2  5.42767e-05
  3  0.000180372
  4  0.000105334
  5  31.0559
  6  12.5402
  7  47.5097
  8  0.000149361
  9  12.5138
  10  4.55217e-05
  11  3.61587e-06
  12  14.1921
  13  3.3638
  14  7.02808
  15  3.42418e-05
  16  99.8809
  17  13.7606
  18  4.82256e-05
  19  3.9645e-05
  20  2.71634
  21  17.0743
  22  5.09028e-06
  23  1.12343e-06
  24  3.69963e-06
  25  3.58427
  26  6.89368e-05
  27  1.027e-06
  28  0.253874
  29  0.20968
Done.

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

Extracting fit parameters...

4FGL J1516.8+3651
   Spectrum: PowerLaw
279    Prefactor:  2.156e+01  9.988e+01  1.000e-04  1.000e+04 ( 1.000e-14)
280        Index:  2.190e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
281        Scale:  1.677e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
591    Prefactor:  6.566e-01  2.097e-01  0.000e+00  1.000e+01 ( 1.000e+00)
592        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
593        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
590   Normalization:  8.143e-01  2.539e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.06
Ra Dec: 229.222 36.850
Photon Flux Upper Limit: 1.12e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.51e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/442241/likelihoodResults_409881601_410140801_4FGL_J1516.8+3651_daily_bin658.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) = 4158.93347204
delta logL = 0.707208355411

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4158.90193987
delta logL = 0.738740528488

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.7185       1.0000         .10000E-03   10000.    
     2 'Index     '    3.7329       1.0000          .0000       10.000    
     3 'Normalizat'    .74038       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .69301       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5940E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   4158.902     FROM MIGRAD    STATUS=FAILED        92 CALLS      299 TOTAL
                     EDM=   .30E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.7185        265.92        .71923E-03   -.16875E-03
   2  Index         3.7333        6.8221        .38123E-02    .44134E-03
   3  Normalizat    .74021        .22046        .27968E-03   -.81297E-06
   4  Prefactor     .69316        .18955        .25314E-03    .68265E-05
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   4158.902     FROM SIMPLEX   STATUS=UNCHANGED     88 CALLS      387 TOTAL
                     EDM=   .17E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.7185        265.92        .36353E-03   -.16875E-03
   2  Index         3.7333        6.8221        .12396E-02    .44134E-03
   3  Normalizat    .74021        .22046        .20055E-03   -.81297E-06
   4  Prefactor     .69316        .18955        .74787E-04    .68265E-05
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4158.902     FROM MIGRAD    STATUS=CONVERGED     31 CALLS      418 TOTAL
                     EDM=   .46E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.7188        23.063        .28769E-04   -.87728E-04
   2  Index         3.7333        1.4577        .76246E-03   -.25020E-04
   3  Normalizat    .74021        .23887        .11187E-04    .20324E-05
   4  Prefactor     .69316        .20557        .10126E-04    .98804E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.7188
  Index      = 3.73326
  Normalizat = 0.740206
  Prefactor  = 0.693159
 **********
 **   18 **HESSE 
 **********

 FCN=   4158.902     FROM HESSE     STATUS=OK            23 CALLS      441 TOTAL
                     EDM=   .46E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.7188        20.161        .11508E-05   -1.5189    
   2  Index         3.7333        1.2785        .30499E-04   -.25614    
   3  Normalizat    .74021        .23866        .22375E-05   -1.0233    
   4  Prefactor     .69316        .20541        .20251E-05   -1.0380    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.60636e-12
Minuit parameter uncertainties:
  1  20.1817
  2  1.29392
  3  0.238997
  4  0.205634
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/442241': 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) = 4158.90193935
delta logL = 0.738741050281

Extracting fit parameters...

4FGL J1516.8+3651
   Spectrum: PowerLaw
279    Prefactor:  6.719e+00  2.018e+01  1.000e-04  1.000e+04 ( 1.000e-14)
280        Index:  3.733e+00  1.294e+00  0.000e+00  1.000e+01 (-1.000e+00)
281        Scale:  1.677e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
591    Prefactor:  6.932e-01  2.056e-01  0.000e+00  1.000e+01 ( 1.000e+00)
592        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
593        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
590   Normalization:  7.402e-01  2.390e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.63
Ra Dec: 229.222 36.850
Photon Index (Free Index): 3.73 +/- 1.29
Photon Flux (Free Index): 9.20e-08 +/- 9.01e-08
Energy Flux (Free Index): 1.45e-05 +/- 1.34e-05

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/442241/cmap_HighResolution_409881601_410140801_4FGL_J1516.8+3651_daily_bin658.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.51e-03', comment='SUCCESS', energy_flux2='1.45e-05', dlogl='7.39e-01', photon_flux2='9.20e-08', job_status='DONE', time_completed='2021-09-11 22:52:35.026006', photon_index_error2='1.29', photon_index2='3.73', ts='0.06', fit_tolerance='1e-08', GAL='0.66', photon_index_error='0.00', photon_flux_upper_limit='1.12e-07', energy_flux_error2='1.34e-05', EG='0.81', time_epoch_completed='1631425955.03', return_code='0', job_id='442241', GAL2='0.69', EG2='0.74', return_code2='0', photon_flux_error2='9.01e-08', ts2='1.63', photon_index='2.19' WHERE bin_id='658' AND source_name='4FGL J1516.8+3651' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 11 22:52:35 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0244>
Subject: Job 442241: <4FGL_J1516.8+3651_daily_bin658> in cluster <slac> Done

Job <4FGL_J1516.8+3651_daily_bin658> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Sat Sep 11 22:41:05 2021
Job was executed on host(s) <bullet0244>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 11 22:41:07 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 11 22:41:07 2021
Terminated at Sat Sep 11 22:52:35 2021
Results reported at Sat Sep 11 22:52:35 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1516.8+3651_daily_bin658 229.222 36.8505 409881601 410140801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1516.8+3651 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   676.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             334.26 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   688 sec.
    Turnaround time :                            690 sec.

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

