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 40 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 = 7616
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1704.1+7647_daily_bin1693
RA = 256.037, Dec = 76.7923
tmin = 678153601, tmax = 678412801
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='541560', job_status='RUN', time_executed='2022-07-02 02:39:20.617508', time_epoch_executed='1656754760.62' WHERE source_name='4FGL J1704.1+7647' and cadence='daily' and bin_id='1693'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/541560

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/541560/ft1_4FGL_J1704.1+7647_daily_bin1693.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/541560/ft2_4FGL_J1704.1+7647_daily_bin1693.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/541560/ft1_4FGL_J1704.1+7647_daily_bin1693.fits outfile=/scratch/kocevski/541560/ft1_filteredMKT_4FGL_J1704.1+7647_daily_bin1693.fits ra=256.037 dec=76.7923 rad=12.0 tmin=678153601.0 tmax=678412801.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 4.32
user 3.97
sys 0.24

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

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

Number of photons that the gtmktime cut: 993

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/541560/ft1_filtered_4FGL_J1704.1+7647_daily_bin1693.fits" evtable="EVENTS" scfile=/scratch/kocevski/541560/ft2_4FGL_J1704.1+7647_daily_bin1693.fits sctable="SC_DATA" outfile=/scratch/kocevski/541560/ltcube_678153601_678412801_4FGL_J1704.1+7647_daily_bin1693.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/541560/ft2_4FGL_J1704.1+7647_daily_bin1693.fits
.....................!
real 14.45
user 14.04
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/541560/ft1_filtered_4FGL_J1704.1+7647_daily_bin1693.fits evtable="EVENTS" scfile=/scratch/kocevski/541560/ft2_4FGL_J1704.1+7647_daily_bin1693.fits sctable="SC_DATA" expcube=/scratch/kocevski/541560/ltcube_678153601_678412801_4FGL_J1704.1+7647_daily_bin1693.fits outfile=/scratch/kocevski/541560/expmap_678153601_678412801_4FGL_J1704.1+7647_daily_bin1693.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/541560/ltcube_678153601_678412801_4FGL_J1704.1+7647_daily_bin1693.fits
.....................!
real 193.23
user 188.08
sys 4.24

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/541560/ft1_filtered_4FGL_J1704.1+7647_daily_bin1693.fits scfile=/scratch/kocevski/541560/ft2_4FGL_J1704.1+7647_daily_bin1693.fits outfile=/scratch/kocevski/541560/cmap_678153601_678412801_4FGL_J1704.1+7647_daily_bin1693.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.57
user 0.40
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/541560/ft1_filtered_4FGL_J1704.1+7647_daily_bin1693.fits scfile=/scratch/kocevski/541560/ft2_4FGL_J1704.1+7647_daily_bin1693.fits outfile=/scratch/kocevski/541560/cmap_HighResolution_678153601_678412801_4FGL_J1704.1+7647_daily_bin1693.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.58
user 0.40
sys 0.17

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/541560/ft1_filtered_4FGL_J1704.1+7647_daily_bin1693.fits', '/scratch/kocevski/541560/ft2_4FGL_J1704.1+7647_daily_bin1693.fits', expMap='/scratch/kocevski/541560/expmap_678153601_678412801_4FGL_J1704.1+7647_daily_bin1693.fits', expCube='/scratch/kocevski/541560/ltcube_678153601_678412801_4FGL_J1704.1+7647_daily_bin1693.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/541560/Model_4FGL_J1704.1+7647_daily_bin1693.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/541560/ft1_filtered_4FGL_J1704.1+7647_daily_bin1693.fits
Spacecraft file(s): /scratch/kocevski/541560/ft2_4FGL_J1704.1+7647_daily_bin1693.fits
Exposure map: /scratch/kocevski/541560/expmap_678153601_678412801_4FGL_J1704.1+7647_daily_bin1693.fits
Exposure cube: /scratch/kocevski/541560/ltcube_678153601_678412801_4FGL_J1704.1+7647_daily_bin1693.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/541560/Model_4FGL_J1704.1+7647_daily_bin1693.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) = 10393.8919684

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    33.368       1.0000         .10000E-03   10000.    
     5 'Prefactor '    113.98       1.0000         .10000E-03   10000.    
     6 'Prefactor '    10.889       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    46.808       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    12.255       1.0000         .10000E-03   10000.    
    11 'norm      '    .74750       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10108E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    10.145       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    5.6686       1.0000         .10000E-03   10000.    
    18 'norm      '    2.8453       1.0000         .10000E-03   10000.    
    19 'norm      '    5.4194       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    3.4357       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .15556E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    1.3375       1.0000         .10000E-03   10000.    
    26 'Prefactor '    21.571       1.0000         .10000E-03   10000.    
    27 'Normalizat'    1.1197       1.0000         .10000E-01   10.000    
    28 'Prefactor '    .80877       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=   10393.89     FROM MIGRAD    STATUS=CONVERGED    689 CALLS     3568 TOTAL
                     EDM=   .35E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    17.584       -.44898E-05** at limit **
   2  Prefactor     .10000E-03    2.9220        .26017E-07** at limit **
   3  Prefactor     .10000E-03    4.6328        .14782E-06** at limit **
   4  Prefactor     33.368        38.098        .10315E-06    .58905E-06
   5  Prefactor     113.97        34.691       -.87015E-06    .21369E-05
   6  Prefactor     10.888        26.422       -.41281E-06   -.49452E-07
   7  Prefactor     .10000E-03    12.583        .18603E-05** at limit **
   8  norm          46.807        21.781       -.16544E-06    .12085E-04
   9  Prefactor     .10000E-03    35.453       -.21642E-06** at limit **
  10  Prefactor     12.258        28.100        .20347E-05    .86189E-05
  11  norm          .74739        .64755       -.15686E-06   -.42098E-03
  12  Prefactor     .10000E-03    3.7954        .13137E-06** at limit **
  13  Prefactor     .10000E-03    1.7271       -.15654E-06** at limit **
  14  Prefactor     .10000E-03    6.5352       -.48703E-07** at limit **
  15  Prefactor     10.143        14.344        .33141E-07   -.14441E-04
  16  Prefactor     .10000E-03    11.400       -.34118E-05** at limit **
  17  norm          5.6687        2.6800       -.40317E-07   -.10021E-04
  18  norm          2.8453        .74356       -.17923E-07    .18207E-04
  19  norm          5.4194        4.3470        .76796E-07   -.52773E-03
  20  Prefactor     .10000E-03    54.269       -.24088E-05** at limit **
  21  Prefactor     3.4336        2.4932        .11797E-07   -.87612E-03
  22  Prefactor     .10000E-03    15.789        .35812E-05** at limit **
  23  Prefactor     .10000E-03    36.369        .24193E-05** at limit **
  24  Prefactor     .10000E-03    2.8711        .19424E-06** at limit **
  25  norm          1.3375        2.1590       -.15312E-06   -.76255E-04
  26  Prefactor     21.571        13.061       -.30216E-08   -.99070E-05
  27  Normalizat    1.1198        .14902        .39162E-06   -.50526E-04
  28  Prefactor     .80870        .90277E-01   -.16737E-06   -.16466E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 33.3677
  Prefactor  = 113.973
  Prefactor  = 10.8883
  Prefactor  = 0.0001
  norm       = 46.8067
  Prefactor  = 0.0001
  Prefactor  = 12.2578
  norm       = 0.747386
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 10.1434
  Prefactor  = 0.0001
  norm       = 5.66874
  norm       = 2.84532
  norm       = 5.41944
  Prefactor  = 0.0001
  Prefactor  = 3.43364
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 1.33751
  Prefactor  = 21.5712
  Normalizat = 1.11981
  Prefactor  = 0.808701
 **********
 **   18 **HESSE 
 **********

 FCN=   10393.89     FROM HESSE     STATUS=OK           521 CALLS     4089 TOTAL
                     EDM=   .71E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    17.577        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    2.9257        .17019E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    4.6395        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     33.368        38.103        .69370E-04   -1.4552    
   5  Prefactor     113.97        34.840        .37683E-04   -1.3569    
   6  Prefactor     10.888        26.444        .12141E-03   -1.5048    
   7  Prefactor     .10000E-03    12.582        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          46.807        21.768        .58606E-04   -1.4339    
   9  Prefactor     .10000E-03    35.456        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     12.258        27.942        .11443E-03   -1.5008    
  11  norm          .74739        .62149        .70479E-03   -1.5535    
  12  Prefactor     .10000E-03    3.8505        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    1.7912        .26025E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    6.5520        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     10.143        14.340        .62899E-03   -1.5071    
  16  Prefactor     .10000E-03    11.395        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          5.6687        2.6901        .10752E-03   -1.5232    
  18  norm          2.8453        .74355        .42863E-04   -1.5371    
  19  norm          5.4194        4.3384        .84848E-03   -1.5242    
  20  Prefactor     .10000E-03    54.282        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     3.4336        5.6496        .10911E-02   -1.5337    
  22  Prefactor     .10000E-03    15.837        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    36.370        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    9.6309        .33050E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          1.3375        2.1257        .18172E-03   -1.5477    
  26  Prefactor     21.571        13.064        .86241E-04   -1.4779    
  27  Normalizat    1.1198        .17170        .27912E-03   -.89118    
  28  Prefactor     .80870        .10295        .19899E-03   -.99408    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.05922e-10
Minuit parameter uncertainties:
  1  4.87479e-06
  2  2.17169e-07
  3  1.00208e-07
  4  38.1305
  5  34.846
  6  26.472
  7  1.55863e-06
  8  21.7715
  9  7.43274e-07
  10  27.9721
  11  0.621491
  12  1.02899e-06
  13  1.25317e-06
  14  5.28784e-06
  15  14.3452
  16  3.11387e-06
  17  2.69016
  18  0.743552
  19  4.33864
  20  5.92865e-06
  21  5.65051
  22  1.14152e-05
  23  1.73969e-07
  24  0.00017606
  25  2.1258
  26  13.0655
  27  0.171785
  28  0.102979
Done.

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

Extracting fit parameters...

4FGL J1704.1+7647
   Spectrum: PowerLaw
379    Prefactor:  1.000e-04  1.253e-06  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:  8.087e-01  1.030e-01  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:  1.120e+00  1.718e-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: 5.87e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.58e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/541560/likelihoodResults_678153601_678412801_4FGL_J1704.1+7647_daily_bin1693.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) = 10393.8933464
delta logL = -0.00266560818818

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 10393.8906809
delta logL = -9.51076799538e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5427       1.0000          .0000       10.000    
     3 'Normalizat'    1.1198       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .80867       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.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   10393.89     FROM MIGRAD    STATUS=CONVERGED     91 CALLS      247 TOTAL
                     EDM=   .18E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10015E-03    18.597        .26063E-02** at limit **
   2  Index         2.5174        6.2319        .50000        .18252E-04
   3  Normalizat    1.1198        .12783E-01    .27912E-03   -.43990E-05
   4  Prefactor     .80870        .79201E-02    .19899E-03   -.45705E-06
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100151
  Index      = 2.51744
  Normalizat = 1.11981
  Prefactor  = 0.808701
 **********
 **   18 **HESSE 
 **********

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

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10015E-03    102.08        .52125E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.5174        5.8243        .50000       -.51957    
   3  Normalizat    1.1198        .31655E-01    .11165E-04   -.89118    
   4  Prefactor     .80870        .19606E-01    .79597E-05   -.99408    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.0778e-08
Minuit parameter uncertainties:
  1  0.00787389
  2  520.095
  3  0.0316551
  4  0.019606
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/541560': No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 10393.8906807
delta logL = 1.09541360871e-07

Extracting fit parameters...

4FGL J1704.1+7647
   Spectrum: PowerLaw
379    Prefactor:  1.002e-04  7.874e-03  1.000e-04  1.000e+04 ( 1.000e-12)
380        Index:  2.517e+00  5.201e+02  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:  8.087e-01  1.961e-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:  1.120e+00  3.166e-02  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/541560/cmap_HighResolution_678153601_678412801_4FGL_J1704.1+7647_daily_bin1693.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.58e-03', job_status='DONE', photon_flux_upper_limit='5.87e-08', time_completed='2022-07-02 03:01:06.063047', job_id='541560', GAL2='0.81', fit_tolerance='1e-08', EG2='1.12', EG='1.12', time_epoch_completed='1656756066.06', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.81', dlogl='1.10e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.55' WHERE bin_id='1693' AND source_name='4FGL J1704.1+7647' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Jul  2 03:01:06 PDT 2022


------------------------------------------------------------
Sender: LSF System <lsf@bullet0261>
Subject: Job 541559: <4FGL_J1704.1+7647_daily_bin1693> in cluster <slac> Done

Job <4FGL_J1704.1+7647_daily_bin1693> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Sat Jul  2 00:06:56 2022
Job was executed on host(s) <bullet0261>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Jul  2 02:38:28 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Jul  2 02:38:28 2022
Terminated at Sat Jul  2 03:00:37 2022
Results reported at Sat Jul  2 03:00:37 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1704.1+7647_daily_bin1693 256.037 76.7923 678153601 678412801 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 :                                   1298.00 sec.
    Max Memory :                                 1066 MB
    Average Memory :                             334.25 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   1328 sec.
    Turnaround time :                            10421 sec.

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


------------------------------------------------------------
Sender: LSF System <lsf@bullet0091>
Subject: Job 541560: <4FGL_J1704.1+7647_daily_bin1693> in cluster <slac> Done

Job <4FGL_J1704.1+7647_daily_bin1693> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Sat Jul  2 00:06:56 2022
Job was executed on host(s) <bullet0091>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Jul  2 02:38:29 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Jul  2 02:38:29 2022
Terminated at Sat Jul  2 03:01:06 2022
Results reported at Sat Jul  2 03:01:06 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1704.1+7647_daily_bin1693 256.037 76.7923 678153601 678412801 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 :                                   1304.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             335.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   1357 sec.
    Turnaround time :                            10450 sec.

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

