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 77 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 = 7530
number of fields = 31
RA_SUN column already exists. File will not be modified.DDone.


Performing analysis on: 4FGL_J1704.1+7647_daily_bin1674
RA = 256.037, Dec = 76.7923
tmin = 673228801, tmax = 673488001
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='670983', job_status='RUN', time_executed='2022-05-06 02:58:03.464336', time_epoch_executed='1651831083.46' WHERE source_name='4FGL J1704.1+7647' and cadence='daily' and bin_id='1674'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/670983

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/670983/ft1_4FGL_J1704.1+7647_daily_bin1674.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/670983/ft2_4FGL_J1704.1+7647_daily_bin1674.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/670983/ft1_4FGL_J1704.1+7647_daily_bin1674.fits outfile=/scratch/kocevski/670983/ft1_filteredMKT_4FGL_J1704.1+7647_daily_bin1674.fits ra=256.037 dec=76.7923 rad=12.0 tmin=673228801.0 tmax=673488001.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.81
user 2.57
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/670983/ft2_4FGL_J1704.1+7647_daily_bin1674.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/670983/ft2_4FGL_J1704.1+7647_daily_bin1674.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/670983/ft1_filteredMKT_4FGL_J1704.1+7647_daily_bin1674.fits evtable="EVENTS" outfile="/scratch/kocevski/670983/ft1_filtered_4FGL_J1704.1+7647_daily_bin1674.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.51
user 0.34
sys 0.16

Number of photons that the gtmktime cut: 1751

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/670983/ft1_filtered_4FGL_J1704.1+7647_daily_bin1674.fits" evtable="EVENTS" scfile=/scratch/kocevski/670983/ft2_4FGL_J1704.1+7647_daily_bin1674.fits sctable="SC_DATA" outfile=/scratch/kocevski/670983/ltcube_673228801_673488001_4FGL_J1704.1+7647_daily_bin1674.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/670983/ft2_4FGL_J1704.1+7647_daily_bin1674.fits
.....................!
real 14.64
user 14.28
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/670983/ft1_filtered_4FGL_J1704.1+7647_daily_bin1674.fits evtable="EVENTS" scfile=/scratch/kocevski/670983/ft2_4FGL_J1704.1+7647_daily_bin1674.fits sctable="SC_DATA" expcube=/scratch/kocevski/670983/ltcube_673228801_673488001_4FGL_J1704.1+7647_daily_bin1674.fits outfile=/scratch/kocevski/670983/expmap_673228801_673488001_4FGL_J1704.1+7647_daily_bin1674.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/670983/ltcube_673228801_673488001_4FGL_J1704.1+7647_daily_bin1674.fits
.....................!
real 192.28
user 186.01
sys 5.73

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

Setting source of interest to:
4FGL J1704.1+7647 @ 256.037 76.7923

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/670983/ft1_filtered_4FGL_J1704.1+7647_daily_bin1674.fits scfile=/scratch/kocevski/670983/ft2_4FGL_J1704.1+7647_daily_bin1674.fits outfile=/scratch/kocevski/670983/cmap_673228801_673488001_4FGL_J1704.1+7647_daily_bin1674.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=256.037 yref=76.7923 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.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/670983/ft1_filtered_4FGL_J1704.1+7647_daily_bin1674.fits scfile=/scratch/kocevski/670983/ft2_4FGL_J1704.1+7647_daily_bin1674.fits outfile=/scratch/kocevski/670983/cmap_HighResolution_673228801_673488001_4FGL_J1704.1+7647_daily_bin1674.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=256.037 yref=76.7923 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.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/670983/ft1_filtered_4FGL_J1704.1+7647_daily_bin1674.fits evtable="EVENTS" scfile=/scratch/kocevski/670983/ft2_4FGL_J1704.1+7647_daily_bin1674.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/670983/Model_4FGL_J1704.1+7647_daily_bin1674.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/670983/ft1_filtered_4FGL_J1704.1+7647_daily_bin1674.fits.....................!
real 197.51
user 195.67
sys 1.32

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/670983/ft1_filtered_4FGL_J1704.1+7647_daily_bin1674.fits', '/scratch/kocevski/670983/ft2_4FGL_J1704.1+7647_daily_bin1674.fits', expMap='/scratch/kocevski/670983/expmap_673228801_673488001_4FGL_J1704.1+7647_daily_bin1674.fits', expCube='/scratch/kocevski/670983/ltcube_673228801_673488001_4FGL_J1704.1+7647_daily_bin1674.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/670983/Model_4FGL_J1704.1+7647_daily_bin1674.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1704.1+7647'

4FGL J1704.1+7647
   Spectrum: PowerLaw
379    Prefactor:  1.968e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
380        Index:  2.548e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
381        Scale:  7.874e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/670983/ft1_filtered_4FGL_J1704.1+7647_daily_bin1674.fits
Spacecraft file(s): /scratch/kocevski/670983/ft2_4FGL_J1704.1+7647_daily_bin1674.fits
Exposure map: /scratch/kocevski/670983/expmap_673228801_673488001_4FGL_J1704.1+7647_daily_bin1674.fits
Exposure cube: /scratch/kocevski/670983/ltcube_673228801_673488001_4FGL_J1704.1+7647_daily_bin1674.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/670983/Model_4FGL_J1704.1+7647_daily_bin1674.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) = 18424.0688358

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    7.1368       1.0000         .10000E-03   10000.    
     3 'Prefactor '    4.8088       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    9.3751       1.0000         .10000E-03   10000.    
     9 'Prefactor '    52.523       1.0000         .10000E-03   10000.    
    10 'Prefactor '    8.8460       1.0000         .10000E-03   10000.    
    11 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .25950E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    20.918       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    16.909       1.0000         .10000E-03   10000.    
    17 'norm      '    6.2496       1.0000         .10000E-03   10000.    
    18 'norm      '    4.1918       1.0000         .10000E-03   10000.    
    19 'norm      '    5.6988       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    3.4906       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    .13234       1.0000         .10000E-03   10000.    
    26 'Prefactor '    9.3001       1.0000         .10000E-03   10000.    
    27 'Normalizat'    .65859       1.0000         .10000E-01   10.000    
    28 'Prefactor '    1.1566       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6510E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   18423.92     FROM MIGRAD    STATUS=CONVERGED    713 CALLS     3125 TOTAL
                     EDM=   .20E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    8.9713       -.88569E-06** at limit **
   2  Prefactor     7.1374        6.8873       -.11030E-06   -.28468E-03
   3  Prefactor     4.8081        10.464       -.11291E-06   -.35163E-05
   4  Prefactor     .10000E-03    20.909       -.87828E-05** at limit **
   5  Prefactor     .10000E-03    3.9128        .80756E-07** at limit **
   6  Prefactor     .10000E-03    23.265        .19339E-05** at limit **
   7  Prefactor     .10000E-03    48.441       -.37878E-05** at limit **
   8  norm          9.3761        10.372       -.87424E-07   -.14695E-03
   9  Prefactor     52.525        48.238        .21279E-05    .59526E-06
  10  Prefactor     8.8454        17.352        .54616E-06   -.27959E-05
  11  norm          .10000E-03    .15442        .15849E-07** at limit **
  12  Prefactor     .10000E-03    2.5694       -.10996E-06** at limit **
  13  Prefactor     .10000E-03    .48406       -.56095E-07** at limit **
  14  Prefactor     20.917        11.548       -.18412E-06   -.50927E-05
  15  Prefactor     .10000E-03    13.706        .61046E-05** at limit **
  16  Prefactor     16.913        25.424        .26171E-05    .30009E-05
  17  norm          6.2498        1.9896        .30910E-07   -.88170E-05
  18  norm          4.1920        .63649        .18349E-07   -.38968E-03
  19  norm          5.6991        2.8160       -.17381E-06   -.30909E-04
  20  Prefactor     .10000E-03    24.786        .97690E-05** at limit **
  21  Prefactor     3.4923        .85933        .65316E-07   -.29820E-02
  22  Prefactor     .10000E-03    5.4262       -.58767E-06** at limit **
  23  Prefactor     .10000E-03    15.661       -.54693E-05** at limit **
  24  Prefactor     .10000E-03    2.2985       -.31380E-07** at limit **
  25  norm          .15580        .78862       -.23246E-06    .88528E-03
  26  Prefactor     9.2831        10.382       -.59950E-06    .93847E-04
  27  Normalizat    .65865        .11519       -.22838E-06    .66521E-04
  28  Prefactor     1.1565        .73729E-01    .10225E-06    .13435E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 7.13736
  Prefactor  = 4.80813
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 9.37611
  Prefactor  = 52.5251
  Prefactor  = 8.84542
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 20.9172
  Prefactor  = 0.0001
  Prefactor  = 16.9126
  norm       = 6.24976
  norm       = 4.19199
  norm       = 5.69914
  Prefactor  = 0.0001
  Prefactor  = 3.49231
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.1558
  Prefactor  = 9.28314
  Normalizat = 0.658648
  Prefactor  = 1.15652  **********
 **   18 **HESSE 
 **********

 FCN=   18423.92     FROM HESSE     STATUS=OK           527 CALLS     3652 TOTAL
                     EDM=   .67E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    8.9727        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     7.1374        6.9493        .75077E-03   -1.5174    
   3  Prefactor     4.8081        10.467        .18346E-03   -1.5269    
   4  Prefactor     .10000E-03    20.935        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    3.9167        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    23.341        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    48.631        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          9.3761        10.363        .65444E-03   -1.5095    
   9  Prefactor     52.525        48.239        .55341E-04   -1.4257    
  10  Prefactor     8.8454        17.127        .13477E-03   -1.5113    
  11  norm          .10000E-03    1.8496        .94250E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    11.598        .40117E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    3.5463        .17983E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     20.917        10.818        .87574E-04   -1.4793    
  15  Prefactor     .10000E-03    13.790        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     16.913        25.446        .97400E-04   -1.4885    
  17  norm          6.2498        1.9873        .10178E-03   -1.5208    
  18  norm          4.1920        .63418        .40257E-04   -1.5298    
  19  norm          5.6991        2.8728        .15035E-03   -1.5230    
  20  Prefactor     .10000E-03    24.814        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     3.4923        3.7979        .10821E-02   -1.5334    
  22  Prefactor     .10000E-03    5.4532        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    15.671        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    2.4061        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          .15580        7.0569        .21898E-02   -1.5629    
  26  Prefactor     9.2831        10.345        .13142E-03   -1.5099    
  27  Normalizat    .65865        .12482        .34936E-03   -1.0555    
  28  Prefactor     1.1565        .81962E-01    .17732E-03   -.87680    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.74885e-09
Minuit parameter uncertainties:
  1  3.32495e-07
  2  6.95008
  3  10.4707
  4  7.68648e-06
  5  3.71319e-07
  6  4.51864e-06
  7  5.66324e-06
  8  10.3651
  9  48.2751
  10  17.1361
  11  1.3818e-06
  12  0.000208958
  13  1.13919e-05
  14  10.8188
  15  1.85312e-05
  16  25.4622
  17  1.98734
  18  0.634184
  19  2.87283
  20  1.47723e-05
  21  3.79813
  22  1.53553e-06
  23  5.37186e-06
  24  1.88236e-06
  25  2.0967
  26  10.3475
  27  0.124873
  28  0.0819706DDone.

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

Extracting fit parameters...

4FGL J1704.1+7647
   Spectrum: PowerLaw
379    Prefactor:  1.000e-04  1.139e-05  1.000e-04  1.000e+04 ( 1.000e-12)
380        Index:  2.548e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
381        Scale:  7.874e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
648    Prefactor:  1.157e+00  8.197e-02  0.000e+00  1.000e+01 ( 1.000e+00)
649        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
650        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
647   Normalization:  6.586e-01  1.249e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 256.037 76.792
Photon Flux Upper Limit: 3.93e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.07e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/670983/likelihoodResults_673228801_673488001_4FGL_J1704.1+7647_daily_bin1674.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 18423.9222365
delta logL = -0.00134851187977

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 18423.9208812
delta logL = 6.80516313878e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .59427E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4154       1.0000          .0000       10.000    
     3 'Normalizat'    .65855       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1566       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6510E+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.

 FCN=   18423.77     FROM MIGRAD    STATUS=CONVERGED    161 CALLS      349 TOTAL
                     EDM=   .62E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .57859        1.3412        .21584E-03   -.76270E-04
   2  Index         1.5907        .94698        .95379E-03   -.24363E-04
   3  Normalizat    .65874        .11932        .34931E-03    .10766E-03
   4  Prefactor     1.1549        .78905E-01    .17741E-03    .24325E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.578589
  Index      = 1.59075
  Normalizat = 0.658738
  Prefactor  = 1.15491
 **********
 **   18 **HESSE 
 **********

 FCN=   18423.77     FROM HESSE     STATUS=OK            23 CALLS      372 TOTAL
                     EDM=   .62E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .57859        1.3385        .86335E-05   -1.5556    
   2  Index         1.5907        .94525        .38152E-04   -.75029    
   3  Normalizat    .65874        .11937        .13973E-04   -1.0555    
   4  Prefactor     1.1549        .78942E-01    .35482E-04   -.87730    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.23375e-11
Minuit parameter uncertainties:
  1  1.33859
  2  0.956106
  3  0.119421
  4  0.0789503
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/670983': 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) = 18423.7684232
delta logL = 0.152464796556

Extracting fit parameters...

4FGL J1704.1+7647
   Spectrum: PowerLaw
379    Prefactor:  5.786e-01  1.339e+00  1.000e-04  1.000e+04 ( 1.000e-12)
380        Index:  1.591e+00  9.561e-01  0.000e+00  1.000e+01 (-1.000e+00)
381        Scale:  7.874e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
648    Prefactor:  1.155e+00  7.895e-02  0.000e+00  1.000e+01 ( 1.000e+00)
649        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
650        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
647   Normalization:  6.587e-01  1.194e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 256.037 76.792

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/670983/cmap_HighResolution_673228801_673488001_4FGL_J1704.1+7647_daily_bin1674.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.07e-03', job_status='DONE', photon_flux_upper_limit='3.93e-08', time_completed='2022-05-06 03:30:38.105902', job_id='670983', GAL2='1.15', fit_tolerance='1e-08', EG2='0.66', EG='0.66', time_epoch_completed='1651833038.11', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.16', dlogl='1.52e-01', ts2='0.31', photon_index_error='0.00', photon_index='2.55' WHERE bin_id='1674' AND source_name='4FGL J1704.1+7647' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Fri May  6 03:30:38 PDT 2022

------------------------------------------------------------
Sender: LSF System <lsf@bullet0159>
Subject: Job 670987: <4FGL_J1704.1+7647_daily_bin1674> in cluster <slac> Done

Job <4FGL_J1704.1+7647_daily_bin1674> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Fri May  6 00:08:06 2022
Job was executed on host(s) <bullet0159>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri May  6 02:56:35 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri May  6 02:56:35 2022
Terminated at Fri May  6 03:29:09 2022
Results reported at Fri May  6 03:29:09 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1704.1+7647_daily_bin1674 256.037 76.7923 673228801 673488001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1704.1+7647 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   1942.00 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             358.17 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   1953 sec.
    Turnaround time :                            12063 sec.

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


------------------------------------------------------------
Sender: LSF System <lsf@bullet0109>
Subject: Job 670983: <4FGL_J1704.1+7647_daily_bin1674> in cluster <slac> Done

Job <4FGL_J1704.1+7647_daily_bin1674> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Fri May  6 00:08:06 2022
Job was executed on host(s) <bullet0109>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri May  6 02:56:35 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri May  6 02:56:35 2022
Terminated at Fri May  6 03:30:38 2022
Results reported at Fri May  6 03:30:38 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1704.1+7647_daily_bin1674 256.037 76.7923 673228801 673488001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1704.1+7647 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   1954.01 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             342.33 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   2043 sec.
    Turnaround time :                            12152 sec.

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

