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 81 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 make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

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


Performing analysis on: 4FGL_J1640.4+3945_daily_bin1748
RA = 250.119, Dec = 39.7626
tmin = 692409601, tmax = 692668801
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='891318', job_status='RUN', time_executed='2022-12-14 00:56:57.484038', time_epoch_executed='1671008217.48' WHERE source_name='4FGL J1640.4+3945' and cadence='daily' and bin_id='1748'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/891318

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/891318/ft1_4FGL_J1640.4+3945_daily_bin1748.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/891318/ft2_4FGL_J1640.4+3945_daily_bin1748.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/891318/ft1_4FGL_J1640.4+3945_daily_bin1748.fits outfile=/scratch/kocevski/891318/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin1748.fits ra=250.119 dec=39.7626 rad=12.0 tmin=692409601.0 tmax=692668801.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 3.56
user 3.34
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/891318/ft2_4FGL_J1640.4+3945_daily_bin1748.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/891318/ft2_4FGL_J1640.4+3945_daily_bin1748.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/891318/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin1748.fits evtable="EVENTS" outfile="/scratch/kocevski/891318/ft1_filtered_4FGL_J1640.4+3945_daily_bin1748.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.50
user 0.33
sys 0.16

Number of photons that the gtmktime cut: 686

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/891318/ft1_filtered_4FGL_J1640.4+3945_daily_bin1748.fits" evtable="EVENTS" scfile=/scratch/kocevski/891318/ft2_4FGL_J1640.4+3945_daily_bin1748.fits sctable="SC_DATA" outfile=/scratch/kocevski/891318/ltcube_692409601_692668801_4FGL_J1640.4+3945_daily_bin1748.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/891318/ft2_4FGL_J1640.4+3945_daily_bin1748.fits
.....................!
real 12.07
user 11.68
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/891318/ft1_filtered_4FGL_J1640.4+3945_daily_bin1748.fits evtable="EVENTS" scfile=/scratch/kocevski/891318/ft2_4FGL_J1640.4+3945_daily_bin1748.fits sctable="SC_DATA" expcube=/scratch/kocevski/891318/ltcube_692409601_692668801_4FGL_J1640.4+3945_daily_bin1748.fits outfile=/scratch/kocevski/891318/expmap_692409601_692668801_4FGL_J1640.4+3945_daily_bin1748.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/891318/ltcube_692409601_692668801_4FGL_J1640.4+3945_daily_bin1748.fits
.....................!
real 191.30
user 185.77
sys 5.22

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

Setting source of interest to:
4FGL J1640.4+3945 @ 250.119 39.7626

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/891318/ft1_filtered_4FGL_J1640.4+3945_daily_bin1748.fits scfile=/scratch/kocevski/891318/ft2_4FGL_J1640.4+3945_daily_bin1748.fits outfile=/scratch/kocevski/891318/cmap_692409601_692668801_4FGL_J1640.4+3945_daily_bin1748.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=250.119 yref=39.7626 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.54
user 0.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/891318/ft1_filtered_4FGL_J1640.4+3945_daily_bin1748.fits scfile=/scratch/kocevski/891318/ft2_4FGL_J1640.4+3945_daily_bin1748.fits outfile=/scratch/kocevski/891318/cmap_HighResolution_692409601_692668801_4FGL_J1640.4+3945_daily_bin1748.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=250.119 yref=39.7626 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.55
user 0.38
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/891318/ft1_filtered_4FGL_J1640.4+3945_daily_bin1748.fits evtable="EVENTS" scfile=/scratch/kocevski/891318/ft2_4FGL_J1640.4+3945_daily_bin1748.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/891318/Model_4FGL_J1640.4+3945_daily_bin1748.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/891318/ft1_filtered_4FGL_J1640.4+3945_daily_bin1748.fits.....................!
real 55.62
user 54.31
sys 1.18

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/891318/ft1_filtered_4FGL_J1640.4+3945_daily_bin1748.fits', '/scratch/kocevski/891318/ft2_4FGL_J1640.4+3945_daily_bin1748.fits', expMap='/scratch/kocevski/891318/expmap_692409601_692668801_4FGL_J1640.4+3945_daily_bin1748.fits', expCube='/scratch/kocevski/891318/ltcube_692409601_692668801_4FGL_J1640.4+3945_daily_bin1748.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/891318/Model_4FGL_J1640.4+3945_daily_bin1748.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1640.4+3945'

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  1.345e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/891318/ft1_filtered_4FGL_J1640.4+3945_daily_bin1748.fits
Spacecraft file(s): /scratch/kocevski/891318/ft2_4FGL_J1640.4+3945_daily_bin1748.fits
Exposure map: /scratch/kocevski/891318/expmap_692409601_692668801_4FGL_J1640.4+3945_daily_bin1748.fits
Exposure cube: /scratch/kocevski/891318/ltcube_692409601_692668801_4FGL_J1640.4+3945_daily_bin1748.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/891318/Model_4FGL_J1640.4+3945_daily_bin1748.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) = 7324.32319236

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .83138E-02   1.0000          .0000       .10000E+07
     2 'Prefactor '    .23333E-02   1.0000          .0000       .10000E+07
     3 'Prefactor '    .11174E-06   1.0000          .0000       .10000E+07
     4 'Prefactor '    .82934E-07   1.0000          .0000       .10000E+07
     5 'Prefactor '    .33884E-06   1.0000          .0000       .10000E+07
     6 'Prefactor '    3.0998       1.0000          .0000       .10000E+07
     7 'norm      '    .67434       1.0000          .0000       .10000E+07
     8 'norm      '    .18547E-03   1.0000          .0000       .10000E+07
     9 'Prefactor '    2.4782       1.0000          .0000       .10000E+07
    10 'Prefactor '    10.437       1.0000          .0000       .10000E+07
    11 'norm      '    29.526       1.0000          .0000       .10000E+07
    12 'Prefactor '    .21816E-07   1.0000          .0000       .10000E+07
    13 'Prefactor '    .27978E-07   1.0000          .0000       .10000E+07
    14 'Prefactor '    .32591E-06   1.0000          .0000       .10000E+07
    15 'Prefactor '    .93636E-06   1.0000          .0000       .10000E+07
    16 'norm      '    5.2329       1.0000          .0000       .10000E+07
    17 'norm      '    .43765E-01   1.0000          .0000       .10000E+07
    18 'Prefactor '    .18145E-04   1.0000          .0000       .10000E+07
    19 'norm      '    .53423       1.0000          .0000       .10000E+07
    20 'norm      '    7.3511       1.0000          .0000       .10000E+07
    21 'norm      '    8.2848       1.0000          .0000       .10000E+07
    22 'norm      '    4.0276       1.0000          .0000       .10000E+07
    23 'Prefactor '    33.926       1.0000          .0000       .10000E+07
    24 'Normalizat'    .80461       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .96799       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6620E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7324.313     FROM MIGRAD    STATUS=CONVERGED    220 CALLS     2246 TOTAL
                     EDM=   .45E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .12546E-07    33.869       -.16234E-06** at limit **
   2  Prefactor     .23870E-07    22.162        .19378E-06** at limit **
   3  Prefactor      .0000        .81808       -.17631E-07** at limit **
   4  Prefactor      .0000        1.8488        .89757E-07** at limit **
   5  Prefactor      .0000        5.6697        .68496E-07** at limit **
   6  Prefactor     3.0981        2.7167        .12854E-06    .69999E-03
   7  norm          .67386        .17072        .82461E-08   -.14263E-02
   8  norm          .20874E-05    94.384       -.53337E-06** at limit **
   9  Prefactor     2.5853        33.403       -.12954E-06   -.80288E-02
  10  Prefactor     10.440        4.7200       -.48484E-08   -.17619E-03
  11  norm          29.625        14.092        .43283E-08   -.14999    
  12  Prefactor      .0000        .50795       -.39898E-07** at limit **
  13  Prefactor      .0000        .69113        .84910E-08** at limit **
  14  Prefactor      .0000        4.0170       -.12829E-06** at limit **
  15  Prefactor      .0000        2.2123        .99908E-07** at limit **
  16  norm          5.2326        1.7725        .29719E-07   -.29379E-03
  17  norm          .44109E-01    3.1677        .27411E-06** at limit **
  18  Prefactor     .16653E-09    15.349        .30780E-06** at limit **
  19  norm          .53432        .78609        .40386E-07    .19714E-03
  20  norm          7.3392        9.0033        .19278E-08   -.82746E-03
  21  norm          8.2876        2.3235       -.45636E-09   -.90832E-03
  22  norm          4.0505        3.9321        .10327E-06   -.48314E-03
  23  Prefactor     33.064        51.743       -.14838E-06    .40434E-01
  24  Normalizat    .80434        .21150       -.53087E-05   -.85364E-05
  25  Prefactor     .96826        .17045        .33864E-05   -.18880E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.25455e-08
  Prefactor  = 2.38698e-08
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 3.09813
  norm       = 0.67386
  norm       = 2.08744e-06
  Prefactor  = 2.58534
  Prefactor  = 10.4396
  norm       = 29.6247
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0
  norm       = 5.23263
  norm       = 0.0441091
  Prefactor  = 1.66533e-10
  norm       = 0.534318
  norm       = 7.33921
  norm       = 8.2876
  norm       = 4.05055
  Prefactor  = 33.0643
  Normalizat = 0.804343
  Prefactor  = 0.968256
 **********
 **   18 **HESSE 
 **********

 FCN=   7324.313     FROM HESSE     STATUS=OK           481 CALLS     2727 TOTAL
                     EDM=   .87E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .12546E-07    33.641        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .23870E-07    22.386        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        .81643        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor      .0000        1.8539        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        5.7000        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     3.0981        2.7235        .57573E-03   -1.5673    
   7  norm          .67386        .17149        .34062E-03   -1.5692    
   8  norm          .20874E-05    96.063        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     2.5853        33.869        .64918E-03   -1.5676    
  10  Prefactor     10.440        4.7423        .30989E-03   -1.5643    
  11  norm          29.625        29.992        .18406E-03   -1.5599    
  12  Prefactor      .0000        .49966        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor      .0000        .66715        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor      .0000        4.0048        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor      .0000        2.2025        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          5.2326        1.7741        .43918E-03   -1.5662    
  17  norm          .44109E-01    .65116        .21417E-02   -1.5704    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .16653E-09    15.095        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .53432        .79947        .75338E-03   -1.5693    
  20  norm          7.3392        9.0391        .36969E-03   -1.5654    
  21  norm          8.2876        2.3349        .34806E-03   -1.5650    
  22  norm          4.0505        3.9716        .50223E-03   -1.5668    
  23  Prefactor     33.064        57.241        .17171E-03   -1.5593    
  24  Normalizat    .80434        .17563        .63121E-01   -.99908    
  25  Prefactor     .96826        .14042        .45866E-01   -.93795    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.66308e-07
Minuit parameter uncertainties:
  1  0.00129894
  2  0.00146139
  3  4.91394e-07
  4  3.26724e-06
  5  7.54485e-06
  6  2.7235
  7  0.17149
  8  0.0283218
  9  18.7151
  10  4.74234
  11  29.9925
  12  6.57068e-07
  13  9.58308e-07
  14  6.0451e-06
  15  5.85606e-06
  16  1.77409
  17  0.338952
  18  9.35841e-05
  19  0.799467
  20  9.0391
  21  2.3349
  22  3.97156
  23  57.2416
  24  0.175756
  25  0.14047
Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  0.000e+00  6.571e-07  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  9.683e-01  1.405e-01  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  8.043e-01  1.758e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 250.119 39.763
Photon Flux Upper Limit: 6.72e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.20e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/891318/likelihoodResults_692409601_692668801_4FGL_J1640.4+3945_daily_bin1748.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) = 7324.32016951
delta logL = -0.0076202571172

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 7324.3125563
delta logL = -7.04424019204e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .15073E-05   1.0000          .0000       .10000E+07
     2 'Index     '    2.7979       1.0000          .0000       10.000    
     3 'Normalizat'    .80377       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96880       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6620E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   7324.313     FROM MIGRAD    STATUS=CONVERGED     40 CALLS      225 TOTAL
                     EDM=   .85E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        .51915        .42118E-03** at limit **
   2  Index         2.2382        .93447        .61714E-05     .0000    
   3  Normalizat    .80434        1.1428       -.10454E-04    .38336E-04
   4  Prefactor     .96826        1.3096        .72427E-05   -.14507E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 2.23817
  Normalizat = 0.804343
  Prefactor  = 0.968256
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   7324.313     FROM HESSE     STATUS=FAILED         9 CALLS      234 TOTAL
                     EDM=   .85E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        .51915        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .55490        1.7536        .61714E-05   -.58520    
   3  Normalizat    .80434        1.1428       -.10454E-04   -.99908    
   4  Prefactor     .96826        1.3096        .72427E-05   -.93795    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 8.48929e-12
Minuit parameter uncertainties:
  1  1.3878e-06
  2  0.942482
  3  1.17998
  4  1.35664
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/891318': 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): 101
logL (Free Index) = 7324.31254926
delta logL = -6.36646291241e-12

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  0.000e+00  1.388e-06  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.238e+00  9.425e-01  0.000e+00  1.000e+01 (-1.000e+00)
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  9.683e-01  1.357e+00  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  8.043e-01  1.180e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 250.119 39.763

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/891318/cmap_HighResolution_692409601_692668801_4FGL_J1640.4+3945_daily_bin1748.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.20e-03', job_status='DONE', photon_flux_upper_limit='6.72e-08', time_completed='2022-12-14 01:09:27.346802', job_id='891318', GAL2='0.97', fit_tolerance='1e-08', EG2='0.80', EG='0.80', time_epoch_completed='1671008967.35', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='0.97', dlogl='-6.37e-12', ts2='0.00', photon_index_error='0.00', photon_index='2.42' WHERE bin_id='1748' AND source_name='4FGL J1640.4+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Dec 14 01:09:27 PST 2022


------------------------------------------------------------
Sender: LSF System <lsf@bullet0065>
Subject: Job 891318: <4FGL_J1640.4+3945_daily_bin1748> in cluster <slac> Done

Job <4FGL_J1640.4+3945_daily_bin1748> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Wed Dec 14 00:55:25 2022
Job was executed on host(s) <bullet0065>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Dec 14 00:55:26 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Dec 14 00:55:26 2022
Terminated at Wed Dec 14 01:09:27 2022
Results reported at Wed Dec 14 01:09:27 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.4+3945_daily_bin1748 250.119 39.7626 692409601 692668801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1640.4+3945 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   750.41 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             304.07 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   841 sec.
    Turnaround time :                            842 sec.

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

