aklog: Couldn't determine realm of user:aklog: No credentials cache found  while getting realm
/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 31 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 = 7532
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1657.0+6010_daily_bin1704
RA = 254.258, Dec = 60.1676
tmin = 681004801, tmax = 681264001
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='365784', job_status='RUN', time_executed='2022-08-04 02:30:51.061672', time_epoch_executed='1659605451.06' WHERE source_name='4FGL J1657.0+6010' and cadence='daily' and bin_id='1704'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/365784

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/365784/ft1_4FGL_J1657.0+6010_daily_bin1704.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/365784/ft2_4FGL_J1657.0+6010_daily_bin1704.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/365784/ft1_4FGL_J1657.0+6010_daily_bin1704.fits outfile=/scratch/kocevski/365784/ft1_filteredMKT_4FGL_J1657.0+6010_daily_bin1704.fits ra=254.258 dec=60.1676 rad=12.0 tmin=681004801.0 tmax=681264001.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.98
user 2.74
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/365784/ft2_4FGL_J1657.0+6010_daily_bin1704.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/365784/ft2_4FGL_J1657.0+6010_daily_bin1704.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/365784/ft1_filteredMKT_4FGL_J1657.0+6010_daily_bin1704.fits evtable="EVENTS" outfile="/scratch/kocevski/365784/ft1_filtered_4FGL_J1657.0+6010_daily_bin1704.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.34
sys 0.15

Number of photons that the gtmktime cut: 1413

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/365784/ft1_filtered_4FGL_J1657.0+6010_daily_bin1704.fits" evtable="EVENTS" scfile=/scratch/kocevski/365784/ft2_4FGL_J1657.0+6010_daily_bin1704.fits sctable="SC_DATA" outfile=/scratch/kocevski/365784/ltcube_681004801_681264001_4FGL_J1657.0+6010_daily_bin1704.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/365784/ft2_4FGL_J1657.0+6010_daily_bin1704.fits
.....................!
real 14.96
user 14.56
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/365784/ft1_filtered_4FGL_J1657.0+6010_daily_bin1704.fits evtable="EVENTS" scfile=/scratch/kocevski/365784/ft2_4FGL_J1657.0+6010_daily_bin1704.fits sctable="SC_DATA" expcube=/scratch/kocevski/365784/ltcube_681004801_681264001_4FGL_J1657.0+6010_daily_bin1704.fits outfile=/scratch/kocevski/365784/expmap_681004801_681264001_4FGL_J1657.0+6010_daily_bin1704.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/365784/ltcube_681004801_681264001_4FGL_J1657.0+6010_daily_bin1704.fits
.....................!
real 192.13
user 185.88
sys 5.55

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 222 point sources and 0 extended sources

Setting source of interest to:
4FGL J1657.0+6010 @ 254.258 60.1676

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/365784/ft1_filtered_4FGL_J1657.0+6010_daily_bin1704.fits scfile=/scratch/kocevski/365784/ft2_4FGL_J1657.0+6010_daily_bin1704.fits outfile=/scratch/kocevski/365784/cmap_681004801_681264001_4FGL_J1657.0+6010_daily_bin1704.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.258 yref=60.1676 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.57
user 0.39
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/365784/ft1_filtered_4FGL_J1657.0+6010_daily_bin1704.fits scfile=/scratch/kocevski/365784/ft2_4FGL_J1657.0+6010_daily_bin1704.fits outfile=/scratch/kocevski/365784/cmap_HighResolution_681004801_681264001_4FGL_J1657.0+6010_daily_bin1704.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.258 yref=60.1676 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.57
user 0.40
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/365784/ft1_filtered_4FGL_J1657.0+6010_daily_bin1704.fits evtable="EVENTS" scfile=/scratch/kocevski/365784/ft2_4FGL_J1657.0+6010_daily_bin1704.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/365784/Model_4FGL_J1657.0+6010_daily_bin1704.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/365784/ft1_filtered_4FGL_J1657.0+6010_daily_bin1704.fits.....................!
real 117.79
user 116.19
sys 1.27

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/365784/ft1_filtered_4FGL_J1657.0+6010_daily_bin1704.fits', '/scratch/kocevski/365784/ft2_4FGL_J1657.0+6010_daily_bin1704.fits', expMap='/scratch/kocevski/365784/expmap_681004801_681264001_4FGL_J1657.0+6010_daily_bin1704.fits', expCube='/scratch/kocevski/365784/ltcube_681004801_681264001_4FGL_J1657.0+6010_daily_bin1704.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/365784/Model_4FGL_J1657.0+6010_daily_bin1704.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1657.0+6010'

4FGL J1657.0+6010
   Spectrum: PowerLaw
375    Prefactor:  3.318e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
376        Index:  2.448e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
377        Scale:  9.922e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/365784/ft1_filtered_4FGL_J1657.0+6010_daily_bin1704.fits
Spacecraft file(s): /scratch/kocevski/365784/ft2_4FGL_J1657.0+6010_daily_bin1704.fits
Exposure map: /scratch/kocevski/365784/expmap_681004801_681264001_4FGL_J1657.0+6010_daily_bin1704.fits
Exposure cube: /scratch/kocevski/365784/ltcube_681004801_681264001_4FGL_J1657.0+6010_daily_bin1704.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/365784/Model_4FGL_J1657.0+6010_daily_bin1704.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) = 15112.501786

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .37709       1.0000         .10000E-03   10000.    
     2 'Prefactor '    60.180       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10341E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .86393       1.0000         .10000E-03   10000.    
     7 'norm      '    5.7474       1.0000         .10000E-03   10000.    
     8 'Prefactor '    2.1760       1.0000         .10000E-03   10000.    
     9 'Prefactor '    19.134       1.0000         .10000E-03   10000.    
    10 'norm      '    11.811       1.0000         .10000E-03   10000.    
    11 'Prefactor '    5.2219       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10049E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    14.549       1.0000         .10000E-03   10000.    
    14 'norm      '    .15876E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    7.2269       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10059E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10431E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    21.108       1.0000         .10000E-03   10000.    
    21 'norm      '    .86959E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    3.1105       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .89687       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    .93198       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .11273E-02   1.0000         .10000E-03   10000.    
    28 'Prefactor '    .35594       1.0000         .10000E-03   10000.    
    29 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    30 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    31 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    32 'Normalizat'    .99365       1.0000         .10000E-01   10.000    
    33 'Prefactor '    1.0978       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7220E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   15112.46     FROM MIGRAD    STATUS=FAILED      1660 CALLS     5482 TOTAL
                     EDM=   .22E-06    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .37771        .91307        .17478E-03   -.12815E-02
   2  Prefactor     60.217        53.416        .51720E-04   -.13294E-03
   3  Prefactor     .10000E-03    3.2619        .18142E-02** at limit **
   4  norm          .10000E-03    2.1949        .17621E-02** at limit **
   5  Prefactor     .10000E-03    43.824        .36285E-03** at limit **
   6  Prefactor     .86349        3.8136        .44921E-03    .50211E-03
   7  norm          5.7487        10.128        .83769E-03    .21739E-03
   8  Prefactor     2.1756        3.7227        .27911E-03    .22345E-03
   9  Prefactor     19.136        21.199        .91564E-04    .40477E-04
  10  norm          11.811        6.4599        .11656E-03    .36282E-04
  11  Prefactor     5.2219        2.2441        .11669E-03   -.81058E-04
  12  Prefactor     .10000E-03    8.6045        .36285E-03** at limit **
  13  Prefactor     14.553        11.071        .52503E-03    .11242E-03
  14  norm          .10013E-03    .26944        .16057E-01** at limit **
  15  Prefactor     7.2278        5.7143        .14921E-03   -.59401E-03
  16  Prefactor     .10000E-03    2.8632        .18142E-02** at limit **
  17  Prefactor     .10000E-03    3.8062        .36285E-03** at limit **
  18  Prefactor     .10000E-03    7.1458        .36285E-02** at limit **
  19  Prefactor     .10000E-03    .71210        .10055E-02** at limit **
  20  Prefactor     21.202        39.263        .87180E-04   -.36774E-04
  21  norm          .10000E-03    1.7615        .60746E-01** at limit **
  22  Prefactor     3.1117        2.9330        .19223E-03   -.52589E-03
  23  Prefactor     .85825        128.74        .89484E-02    .15887E-02
  24  Prefactor     .10000E-03    25.218        .18142E-02** at limit **
  25  norm          .93181        .87036        .12376E-02    .73113E-03
  26  Prefactor     .10000E-03    3.4927        .18142E-02** at limit **
  27  Prefactor     .10000E-03    31.477        .37770E-02** at limit **
  28  Prefactor     .37500        40.227        .51662E-02    .23920E-02
  29  Prefactor     .10000E-03    2.8697        .18142E-02** at limit **
  30  Prefactor     .10000E-03    20.510        .18142E-02** at limit **
  31  norm          .10000E-03    3.0268        .18142E-02** at limit **
  32  Normalizat    .99370        .15031        .27505E-03   -.56246E-03
  33  Prefactor     1.0978        .12295        .22494E-03   -.77394E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   15112.46     FROM SIMPLEX   STATUS=PROGRESS    1531 CALLS     7013 TOTAL
                     EDM=   .19E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .37773        .91307        .53071E-06   -1.5585    
   2  Prefactor     60.217        53.416        .97012E-06   -1.4154    
   3  Prefactor     .10000E-03    3.2619        .21698E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .10000E-03    2.1949        .23104E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    43.824        .52119E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .86349        3.8136        .52072E-06   -1.5522    
   7  norm          5.7487        10.128        .51142E-06   -1.5228    
   8  Prefactor     2.1756        3.7227        .51479E-06   -1.5413    
   9  Prefactor     19.136        21.199        .49685E-06   -1.4833    
  10  norm          11.811        6.4599        .49939E-06   -1.5020    
  11  Prefactor     5.2219        2.2441        .50640E-06   -1.5251    
  12  Prefactor     .10000E-03    8.6045        .43233E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     14.553        11.071        .49879E-06   -1.4945    
  14  norm          .10013E-03    .26944        .12949E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     7.2278        5.7143        .50366E-06   -1.5170    
  16  Prefactor     .10000E-03    2.8632        .22225E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    3.8062        .53051E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    7.1458        .22064E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    .71210        .52685E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     21.202        39.263        .49173E-06   -1.4787    
  21  norm          .10000E-03    1.7615        .34371E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     3.1117        2.9330        .51021E-06   -1.5355    
  23  Prefactor     .85825        128.74        .63092E-06   -1.5523    
  24  Prefactor     .10000E-03    25.218        .46138E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          .93181        .87036        .51484E-06   -1.5515    
  26  Prefactor     .10000E-03    3.4927        .20576E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    31.477        .24291E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     .37500        40.227        .51806E-06   -1.5586    
  29  Prefactor     .10000E-03    2.8697        .12145E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Prefactor     .10000E-03    20.510        .14727E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  31  norm          .10000E-03    3.0268        .63396E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  32  Normalizat    .99370        .15031        .30947E-06   -.93242    
  33  Prefactor     1.0978        .12295        .29715E-06   -.89537    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   15112.46     FROM MIGRAD    STATUS=CONVERGED    690 CALLS     7703 TOTAL
                     EDM=   .21E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .37773        .91299        .69914E-05    .50734E-05
   2  Prefactor     60.217        53.410        .10344E-04    .17585E-06
   3  Prefactor     .10000E-03    3.2641        .36285E-03** at limit **
   4  norm          .10000E-03    2.1964        .35241E-03** at limit **
   5  Prefactor     .10000E-03    43.827        .72569E-04** at limit **
   6  Prefactor     .86341        3.8089        .17968E-04    .25308E-06
   7  norm          5.7487        10.125        .33508E-04    .10857E-05
   8  Prefactor     2.1756        3.7216        .11165E-04    .81463E-06
   9  Prefactor     19.136        21.200        .36626E-05    .12416E-05
  10  norm          11.811        6.4590        .46626E-05     .0000    
  11  Prefactor     5.2219        2.2440        .46677E-05    .19485E-05
  12  Prefactor     .10000E-03    8.6050        .72569E-04** at limit **
  13  Prefactor     14.553        11.069        .21001E-04   -.10827E-05
  14  norm          .10013E-03    .23474        .17854E-01** at limit **
  15  Prefactor     7.2279        5.7166        .59683E-05    .38097E-05
  16  Prefactor     .10000E-03    2.8635        .36285E-03** at limit **
  17  Prefactor     .10000E-03    3.8063        .72569E-04** at limit **
  18  Prefactor     .10000E-03    7.1995        .72569E-03** at limit **
  19  Prefactor     .10000E-03    .71223        .20109E-03** at limit **
  20  Prefactor     21.202        39.279        .34872E-05   -.26081E-05
  21  norm          .10000E-03    1.7630        .60672E-01** at limit **
  22  Prefactor     3.1117        2.9198        .76891E-05   -.18334E-04
  23  Prefactor     .85833        132.09        .17897E-02    .60475E-04
  24  Prefactor     .10000E-03    25.218        .36285E-03** at limit **
  25  norm          .93180        .87058        .49506E-04   -.13779E-05
  26  Prefactor     .10000E-03    3.4927        .36285E-03** at limit **
  27  Prefactor     .10000E-03    32.164        .75539E-03** at limit **
  28  Prefactor     .37516        41.232        .10332E-02   -.43132E-05
  29  Prefactor     .10000E-03    2.8698        .36285E-03** at limit **
  30  Prefactor     .10000E-03    20.510        .36285E-03** at limit **
  31  norm          .10000E-03    3.0281        .36285E-03** at limit **
  32  Normalizat    .99370        .15039        .11002E-04   -.21493E-04
  33  Prefactor     1.0978        .12293        .44988E-04   -.30628E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.377725
  Prefactor  = 60.2169
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.863415
  norm       = 5.74866
  Prefactor  = 2.17561
  Prefactor  = 19.1362
  norm       = 11.811
  Prefactor  = 5.22187
  Prefactor  = 0.0001
  Prefactor  = 14.5527
  norm       = 0.00010013
  Prefactor  = 7.22785
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 21.2021
  norm       = 0.000100001
  Prefactor  = 3.11169
  Prefactor  = 0.85833
  Prefactor  = 0.0001
  norm       = 0.931798
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.375155
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 0.993697
  Prefactor  = 1.09779
 **********
 **   18 **HESSE 
 **********

 FCN=   15112.46     FROM HESSE     STATUS=OK           685 CALLS     8388 TOTAL
                     EDM=   .13E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .37773        .91299        .69914E-05   -1.5585    
   2  Prefactor     60.217        53.408        .10344E-04   -1.4154    
   3  Prefactor     .10000E-03    3.2642        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .10000E-03    2.1965        .70482E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    43.829        .14514E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .86341        3.8105        .35937E-05   -1.5522    
   7  norm          5.7487        10.125        .67015E-05   -1.5228    
   8  Prefactor     2.1756        3.7223        .22329E-05   -1.5413    
   9  Prefactor     19.136        21.214        .73251E-06   -1.4833    
  10  norm          11.811        6.4589        .46626E-05   -1.5020    
  11  Prefactor     5.2219        2.2442        .93353E-06   -1.5251    
  12  Prefactor     .10000E-03    8.6050        .14514E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     14.553        11.068        .42003E-05   -1.4945    
  14  norm          .10013E-03    .24221        .17421E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     7.2279        5.7173        .11937E-05   -1.5170    
  16  Prefactor     .10000E-03    2.8635        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    3.8064        .14514E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    7.2017        .14514E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    .71224        .40218E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     21.202        39.518        .69744E-06   -1.4787    
  21  norm          .10000E-03    1.7629        .60676E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     3.1117        2.9175        .15378E-05   -1.5355    
  23  Prefactor     .85833        131.91        .35794E-03   -1.5523    
  24  Prefactor     .10000E-03    25.218        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          .93180        .87059        .19802E-05   -1.5515    
  26  Prefactor     .10000E-03    3.4928        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    32.192        .15108E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     .37516        41.225        .41329E-04   -1.5585    
  29  Prefactor     .10000E-03    2.8698        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Prefactor     .10000E-03    20.510        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  31  norm          .10000E-03    3.0282        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  32  Normalizat    .99370        .15058        .22004E-05   -.93242    
  33  Prefactor     1.0978        .12294        .89976E-05   -.89537    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.30728e-11
Minuit parameter uncertainties:
  1  0.913027
  2  53.4503
  3  1.70022e-07
  4  7.58052e-08
  5  4.83079e-07
  6  3.62787
  7  10.1281
  8  3.72266
  9  21.2221
  10  6.45925
  11  2.2442
  12  9.6879e-08
  13  11.07
  14  0.000355547
  15  5.7177
  16  3.46255e-07
  17  1.90385e-07
  18  3.21867e-06
  19  3.89329e-08
  20  39.5667
  21  8.16028e-05
  22  2.91761
  23  21.328
  24  1.55092e-06
  25  0.870606
  26  3.02024e-07
  27  4.42809e-05
  28  7.86986
  29  9.06402e-08
  30  1.63989e-07
  31  4.80096e-07
  32  0.150639
  33  0.122971
Done.

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

Extracting fit parameters...

4FGL J1657.0+6010
   Spectrum: PowerLaw
375    Prefactor:  1.455e+01  1.107e+01  1.000e-04  1.000e+04 ( 1.000e-13)
376        Index:  2.448e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
377        Scale:  9.922e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
719    Prefactor:  1.098e+00  1.230e-01  0.000e+00  1.000e+01 ( 1.000e+00)
720        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
721        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
718   Normalization:  9.937e-01  1.506e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.78
Ra Dec: 254.258 60.168
Photon Index (Fixed Index): 2.45 +/- 0.00
Photon Flux (Fixed Index): 2.77e-08 +/- 2.10e-08
Energy Flux (Fixed Index): 8.54e-06 +/- 6.49e-06

TS (Fixed Index): 2.78
Ra Dec: 254.258 60.168
Photon Flux Upper Limit: 7.15e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.54e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/365784/likelihoodResults_681004801_681264001_4FGL_J1657.0+6010_daily_bin1704.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) = 15112.3640123
delta logL = 0.0975465219744

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 15112.3572253
delta logL = 0.104333493809

Fit tolerance = 1e-08

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

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

 FCN=   15112.36     FROM MIGRAD    STATUS=FAILED        91 CALLS      281 TOTAL
                     EDM=   .60E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.182        17.026        .12555E-03   -.26856E-03
   2  Index         2.8078        1.1039        .89772E-02    .94026E-03
   3  Normalizat    .98214        .14557        .27647E-03    .49444E-03
   4  Prefactor     1.1044        .12253        .22436E-03    .46633E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   15112.36     FROM SIMPLEX   STATUS=UNCHANGED     77 CALLS      358 TOTAL
                     EDM=   .18E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.182        17.026        .20311E-03   -1.5070    
   2  Index         2.8078        1.1039        .73182E-03   -.45386    
   3  Normalizat    .98214        .14557        .27665E-03   -.93631    
   4  Prefactor     1.1044        .12253        .25734E-03   -.89327    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   15112.36     FROM MIGRAD    STATUS=CONVERGED     35 CALLS      393 TOTAL
                     EDM=   .14E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.182        13.253        .50222E-05   -.59761E-04
   2  Index         2.8078        .86158        .17954E-02    .73451E-05
   3  Normalizat    .98214        .14461        .11059E-04   -.61682E-05
   4  Prefactor     1.1044        .12202        .44871E-04   -.48646E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.1818
  Index      = 2.80781
  Normalizat = 0.982137
  Prefactor  = 1.10437
 **********
 **   18 **HESSE 
 **********

 FCN=   15112.36     FROM HESSE     STATUS=OK            23 CALLS      416 TOTAL
                     EDM=   .11E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.182        12.736        .10044E-05   -1.5070    
   2  Index         2.8078        .82794        .71817E-04   -.45386    
   3  Normalizat    .98214        .14444        .22117E-05   -.93631    
   4  Prefactor     1.1044        .12192        .89742E-05   -.89327    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.08142e-11
Minuit parameter uncertainties:
  1  12.7396
  2  0.832695
  3  0.144499
  4  0.121954
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/365784': 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) = 15112.3572227
delta logL = 0.104336117132

Extracting fit parameters...

4FGL J1657.0+6010
   Spectrum: PowerLaw
375    Prefactor:  1.018e+01  1.274e+01  1.000e-04  1.000e+04 ( 1.000e-13)
376        Index:  2.808e+00  8.327e-01  0.000e+00  1.000e+01 (-1.000e+00)
377        Scale:  9.922e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
719    Prefactor:  1.104e+00  1.220e-01  0.000e+00  1.000e+01 ( 1.000e+00)
720        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
721        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
718   Normalization:  9.821e-01  1.445e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.04
Ra Dec: 254.258 60.168
Photon Index (Free Index): 2.81 +/- 0.83
Photon Flux (Free Index): 3.54e-08 +/- 2.91e-08
Energy Flux (Free Index): 7.89e-06 +/- 5.68e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/365784/cmap_HighResolution_681004801_681264001_4FGL_J1657.0+6010_daily_bin1704.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.54e-03', comment='SUCCESS', photon_flux='2.77e-08', energy_flux2='7.89e-06', photon_flux_error='2.10e-08', dlogl='1.04e-01', energy_flux='8.54e-06', photon_flux2='3.54e-08', job_status='DONE', time_completed='2022-08-04 03:22:19.644444', photon_index_error2='0.83', photon_index2='2.81', ts='2.78', fit_tolerance='1e-08', GAL='1.10', photon_index_error='0.00', photon_flux_upper_limit='7.15e-08', energy_flux_error2='5.68e-06', EG='0.99', time_epoch_completed='1659608539.64', return_code='0', job_id='365784', GAL2='1.10', EG2='0.98', return_code2='0', energy_flux_error='6.49e-06', photon_flux_error2='2.91e-08', ts2='3.04', photon_index='2.45' WHERE bin_id='1704' AND source_name='4FGL J1657.0+6010' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Aug  4 03:22:19 PDT 2022

------------------------------------------------------------
Sender: LSF System <lsf@bullet0225>
Subject: Job 365741: <4FGL_J1657.0+6010_daily_bin1704> in cluster <slac> Done

Job <4FGL_J1657.0+6010_daily_bin1704> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Thu Aug  4 00:07:33 2022
Job was executed on host(s) <bullet0225>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Aug  4 02:29:23 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Aug  4 02:29:23 2022
Terminated at Thu Aug  4 03:20:49 2022
Results reported at Thu Aug  4 03:20:49 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1657.0+6010_daily_bin1704 254.258 60.1676 681004801 681264001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1657.0+6010 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   3071.00 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             350.50 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   3085 sec.
    Turnaround time :                            11596 sec.

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


------------------------------------------------------------
Sender: LSF System <lsf@bullet0268>
Subject: Job 365784: <4FGL_J1657.0+6010_daily_bin1704> in cluster <slac> Done

Job <4FGL_J1657.0+6010_daily_bin1704> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Thu Aug  4 00:07:34 2022
Job was executed on host(s) <bullet0268>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Aug  4 02:30:10 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Aug  4 02:30:10 2022
Terminated at Thu Aug  4 03:22:20 2022
Results reported at Thu Aug  4 03:22:20 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1657.0+6010_daily_bin1704 254.258 60.1676 681004801 681264001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1657.0+6010 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   3087.00 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             335.63 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   3131 sec.
    Turnaround time :                            11686 sec.

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

