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


Performing analysis on: 4FGL_J1659.7-3131_daily_bin1193
RA = 254.945, Dec = -31.5209
tmin = 548553601, tmax = 548812801
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='258925', job_status='RUN', time_executed='2021-09-16 07:53:46.152332', time_epoch_executed='1631804026.15' WHERE source_name='4FGL J1659.7-3131' and cadence='daily' and bin_id='1193'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/258925

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/258925/ft1_4FGL_J1659.7-3131_daily_bin1193.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/258925/ft2_4FGL_J1659.7-3131_daily_bin1193.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/258925/ft1_4FGL_J1659.7-3131_daily_bin1193.fits outfile=/scratch/kocevski/258925/ft1_filteredMKT_4FGL_J1659.7-3131_daily_bin1193.fits ra=254.945 dec=-31.5209 rad=12.0 tmin=548553601.0 tmax=548812801.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.49
user 3.25
sys 0.22

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/258925/ft2_4FGL_J1659.7-3131_daily_bin1193.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/258925/ft2_4FGL_J1659.7-3131_daily_bin1193.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/258925/ft1_filteredMKT_4FGL_J1659.7-3131_daily_bin1193.fits evtable="EVENTS" outfile="/scratch/kocevski/258925/ft1_filtered_4FGL_J1659.7-3131_daily_bin1193.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/258925/ft1_filtered_4FGL_J1659.7-3131_daily_bin1193.fits" evtable="EVENTS" scfile=/scratch/kocevski/258925/ft2_4FGL_J1659.7-3131_daily_bin1193.fits sctable="SC_DATA" outfile=/scratch/kocevski/258925/ltcube_548553601_548812801_4FGL_J1659.7-3131_daily_bin1193.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/258925/ft2_4FGL_J1659.7-3131_daily_bin1193.fits
.....................!
real 15.44
user 15.06
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/258925/ft1_filtered_4FGL_J1659.7-3131_daily_bin1193.fits evtable="EVENTS" scfile=/scratch/kocevski/258925/ft2_4FGL_J1659.7-3131_daily_bin1193.fits sctable="SC_DATA" expcube=/scratch/kocevski/258925/ltcube_548553601_548812801_4FGL_J1659.7-3131_daily_bin1193.fits outfile=/scratch/kocevski/258925/expmap_548553601_548812801_4FGL_J1659.7-3131_daily_bin1193.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/258925/ltcube_548553601_548812801_4FGL_J1659.7-3131_daily_bin1193.fits
.....................!
real 193.39
user 187.50
sys 5.10

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
Extended source RX J1713.7-3946 in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/RXJ1713_2016_250GeV.fits is the correct path to the extended template.
Extended source FHES J1626.9-2431 in ROI with RadialGaussian spatial model.
Extended source FHES J1741.6-3917 in ROI with RadialDisk spatial model.
Extended source FGES J1745.8-3028 in ROI with RadialDisk spatial model.
Extended source FGES J1631.6-4756 in ROI with RadialDisk spatial model.
Extended source FGES J1633.0-4746 in ROI with RadialDisk spatial model.
Extended source G337.0-0.1 in ROI with RadialDisk spatial model.
Extended source FGES J1652.2-4633 in ROI with RadialDisk spatial model.
Extended source FGES J1655.5-4737 in ROI with RadialDisk spatial model.
Extended source W 28 in ROI with RadialDisk spatial model.
Extended source HESS J1804-216 in ROI with RadialDisk spatial model.
Extended source HESS J1614-518 in ROI with RadialDisk spatial model.
Extended source HESS J1616-508 in ROI with RadialDisk spatial model.
Extended source W 30 in ROI with RadialDisk spatial model.
Extended source HESS J1808-204 in ROI with RadialDisk spatial model.
Extended source HESS J1809-193 in ROI with RadialDisk spatial model.
Extended source HESS J1813-178 in ROI with RadialDisk spatial model.
Added 554 point sources and 17 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J1659.7-3131 @ 254.945 -31.5209

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/258925/ft1_filtered_4FGL_J1659.7-3131_daily_bin1193.fits scfile=/scratch/kocevski/258925/ft2_4FGL_J1659.7-3131_daily_bin1193.fits outfile=/scratch/kocevski/258925/cmap_548553601_548812801_4FGL_J1659.7-3131_daily_bin1193.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=254.945 yref=-31.5209 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.56
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/258925/ft1_filtered_4FGL_J1659.7-3131_daily_bin1193.fits scfile=/scratch/kocevski/258925/ft2_4FGL_J1659.7-3131_daily_bin1193.fits outfile=/scratch/kocevski/258925/cmap_HighResolution_548553601_548812801_4FGL_J1659.7-3131_daily_bin1193.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=254.945 yref=-31.5209 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.55
user 0.38
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/258925/ft1_filtered_4FGL_J1659.7-3131_daily_bin1193.fits evtable="EVENTS" scfile=/scratch/kocevski/258925/ft2_4FGL_J1659.7-3131_daily_bin1193.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/258925/Model_4FGL_J1659.7-3131_daily_bin1193.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 FGES J1631.6-4756
adding source FGES J1633.0-4746
adding source FGES J1652.2-4633
adding source FGES J1655.5-4737
adding source FGES J1745.8-3028
adding source FHES J1626.9-2431
adding source FHES J1741.6-3917
adding source G337.0-0.1
adding source GAL_V02
adding source HESS J1614-518
adding source HESS J1616-508
adding source HESS J1804-216
adding source HESS J1808-204
adding source HESS J1809-193
adding source HESS J1813-178
adding source RX J1713.7-3946
adding source W 28
adding source W 30
Working on...
/scratch/kocevski/258925/ft1_filtered_4FGL_J1659.7-3131_daily_bin1193.fits.....................!
real 91.14
user 89.61
sys 1.22

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/258925/ft1_filtered_4FGL_J1659.7-3131_daily_bin1193.fits', '/scratch/kocevski/258925/ft2_4FGL_J1659.7-3131_daily_bin1193.fits', expMap='/scratch/kocevski/258925/expmap_548553601_548812801_4FGL_J1659.7-3131_daily_bin1193.fits', expCube='/scratch/kocevski/258925/ltcube_548553601_548812801_4FGL_J1659.7-3131_daily_bin1193.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/258925/Model_4FGL_J1659.7-3131_daily_bin1193.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1659.7-3131'

4FGL J1659.7-3131
   Spectrum: PowerLaw
605    Prefactor:  3.151e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
606        Index:  2.293e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
607        Scale:  1.906e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/258925/ft1_filtered_4FGL_J1659.7-3131_daily_bin1193.fits
Spacecraft file(s): /scratch/kocevski/258925/ft2_4FGL_J1659.7-3131_daily_bin1193.fits
Exposure map: /scratch/kocevski/258925/expmap_548553601_548812801_4FGL_J1659.7-3131_daily_bin1193.fits
Exposure cube: /scratch/kocevski/258925/ltcube_548553601_548812801_4FGL_J1659.7-3131_daily_bin1193.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/258925/Model_4FGL_J1659.7-3131_daily_bin1193.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) = 2156.91657873

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'norm      '    4.7283       1.0000         .10000E-03   10000.    
     3 'norm      '    14.101       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10058E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10396E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .11093E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    47.568       1.0000         .10000E-03   10000.    
     8 'norm      '    .13327E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .17362E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .18055E-02   1.0000         .10000E-03   10000.    
    11 'norm      '    .10228E-03   1.0000         .10000E-03   10000.    
    12 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
    13 'Prefactor '    .96270       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .2072E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   2156.907     FROM MIGRAD    STATUS=CONVERGED    226 CALLS     1043 TOTAL
                     EDM=   .86E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    66.343        .19091E-05** at limit **
   2  norm          4.7301        46.317       -.93175E-06   -.20257E-04
   3  norm          14.102        11.442        .64188E-06   -.42986E-05
   4  Prefactor     .10000E-03    12.447       -.19730E-06** at limit **
   5  norm          .10000E-03    20.115        .23805E-06** at limit **
   6  Prefactor     .10000E-03    130.19       -.25821E-04** at limit **
   7  Prefactor     47.556        60.394       -.76724E-05   -.35043E-05
   8  norm          .10000E-03    188.35        .75993E-04** at limit **
   9  Prefactor     .10000E-03    272.14       -.56366E-04** at limit **
  10  Prefactor     .10005E-03    1932.3       -.59025E-03** at limit **
  11  norm          .10000E-03    28.648        .36732E-06** at limit **
  12  Normalizat    .10000E-01    .32429        .24604E-05** at limit **
  13  Prefactor     .96268        .70864E-01    .54778E-06    .48066E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  norm       = 4.73006
  norm       = 14.102
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 47.5563
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.00010005
  norm       = 0.0001
  Normalizat = 0.01
  Prefactor  = 0.962683
 **********
 **   18 **HESSE 
 **********

 FCN=   2156.907     FROM HESSE     STATUS=OK           137 CALLS     1180 TOTAL
                     EDM=   .18E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    66.343        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          4.7301        46.317        .18505E-03   -1.5273    
   3  norm          14.102        11.437        .10666E-03   -1.4957    
   4  Prefactor     .10000E-03    12.449        .16006E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    20.122        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    130.21        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     47.556        60.389        .58138E-04   -1.4328    
   8  norm          .10000E-03    188.49        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    272.21        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10005E-03    1934.0        .20319E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    28.650        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Normalizat    .10000E-01    .32731        .81554E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .96268        .70505E-01    .10718E-03   -.93984    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.76757e-10
Minuit parameter uncertainties:
  1  1.85604e-06
  2  29.6326
  3  11.4385
  4  8.28787e-07
  5  8.7826e-05
  6  2.28582e-06
  7  60.4666
  8  1.46645e-05
  9  4.1983e-06
  10  0.0203593
  11  1.87533e-06
  12  9.53215e-07
  13  0.0705118
Done.

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

Extracting fit parameters...

4FGL J1659.7-3131
   Spectrum: PowerLaw
605    Prefactor:  4.756e+01  6.047e+01  1.000e-04  1.000e+04 ( 1.000e-13)
606        Index:  2.293e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
607        Scale:  1.906e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
2035    Prefactor:  9.627e-01  7.051e-02  0.000e+00  1.000e+01 ( 1.000e+00)
2036        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
2037        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
2007   Normalization:  1.000e-02  9.532e-07  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.91
Ra Dec: 254.945 -31.521
Photon Flux Upper Limit: 1.40e-06 ph cm-2 s-1
Energy Flux Upper Limit: 1.08e-01 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/258925/likelihoodResults_548553601_548812801_4FGL_J1659.7-3131_daily_bin1193.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) = 2156.75154618
delta logL = 0.15543213418

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 2156.74983203
delta logL = 0.157146289775

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    9.2067       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0931       1.0000          .0000       10.000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96199       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .2072E+06   .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=   2156.750     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      348 TOTAL
                     EDM=   .30E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     9.2242        704.21        .13209E-03    .83704E-04
   2  Index         3.0927        6.3830        .38340E-02    .37889E-04
   3  Normalizat    .10000E-01    .31967        .81008E-02** at limit **
   4  Prefactor     .96188        .69882E-01    .10718E-03   -.47730E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 9.22415
  Index      = 3.09274
  Normalizat = 0.01
  Prefactor  = 0.961885
 **********
 **   18 **HESSE 
 **********

 FCN=   2156.750     FROM HESSE     STATUS=OK            25 CALLS      373 TOTAL
                     EDM=   .15E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     9.2242        39.415        .52834E-05   -1.5100    
   2  Index         3.0927        1.6322        .15336E-03   -.39137    
   3  Normalizat    .10000E-01    .32277        .16202E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .96188        .69977E-01    .21436E-04   -.94011    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.47201e-10
Minuit parameter uncertainties:
  1  38.1774
  2  1.66823
  3  1.40846e-06
  4  0.069984
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/258925': 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) = 2156.74983065
delta logL = 0.157147667622

Extracting fit parameters...

4FGL J1659.7-3131
   Spectrum: PowerLaw
605    Prefactor:  9.224e+00  3.818e+01  1.000e-04  1.000e+04 ( 1.000e-13)
606        Index:  3.093e+00  1.668e+00  0.000e+00  1.000e+01 (-1.000e+00)
607        Scale:  1.906e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
2035    Prefactor:  9.619e-01  6.998e-02  0.000e+00  1.000e+01 ( 1.000e+00)
2036        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
2037        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
2007   Normalization:  1.000e-02  1.408e-06  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.23
Ra Dec: 254.945 -31.521
Photon Index (Free Index): 3.09 +/- 1.67
Photon Flux (Free Index): 4.02e-07 +/- 4.57e-07
Energy Flux (Free Index): 7.68e-05 +/- 9.77e-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/258925/cmap_HighResolution_548553601_548812801_4FGL_J1659.7-3131_daily_bin1193.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.08e-01', comment='SUCCESS', energy_flux2='7.68e-05', dlogl='1.57e-01', photon_flux2='4.02e-07', job_status='DONE', time_completed='2021-09-16 08:06:00.989827', photon_index_error2='1.67', photon_index2='3.09', ts='0.91', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', photon_flux_upper_limit='1.40e-06', energy_flux_error2='9.77e-05', EG='0.01', time_epoch_completed='1631804760.99', return_code='0', job_id='258925', GAL2='0.96', EG2='0.01', return_code2='0', photon_flux_error2='4.57e-07', ts2='1.23', photon_index='2.29' WHERE bin_id='1193' AND source_name='4FGL J1659.7-3131' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep 16 08:06:01 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0119>
Subject: Job 258925: <4FGL_J1659.7-3131_daily_bin1193> in cluster <slac> Done

Job <4FGL_J1659.7-3131_daily_bin1193> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Sep 16 07:50:18 2021
Job was executed on host(s) <bullet0119>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep 16 07:50:24 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep 16 07:50:24 2021
Terminated at Thu Sep 16 08:06:01 2021
Results reported at Thu Sep 16 08:06:01 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1659.7-3131_daily_bin1193 254.945 -31.5209 548553601 548812801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1659.7-3131 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   731.10 sec.
    Max Memory :                                 1266 MB
    Average Memory :                             315.75 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   939 sec.
    Turnaround time :                            943 sec.

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

