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


Performing analysis on: 4FGL_J1640.4+3945_daily_bin1778
RA = 250.119, Dec = 39.7626
tmin = 700185601, tmax = 700444801
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='970340', job_status='RUN', time_executed='2023-03-14 01:30:32.804393', time_epoch_executed='1678782632.8' WHERE source_name='4FGL J1640.4+3945' and cadence='daily' and bin_id='1778'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/970340

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/970340/ft1_4FGL_J1640.4+3945_daily_bin1778.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/970340/ft2_4FGL_J1640.4+3945_daily_bin1778.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/970340/ft1_4FGL_J1640.4+3945_daily_bin1778.fits outfile=/scratch/kocevski/970340/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin1778.fits ra=250.119 dec=39.7626 rad=12.0 tmin=700185601.0 tmax=700444801.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.96
user 3.68
sys 0.24

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/970340/ft2_4FGL_J1640.4+3945_daily_bin1778.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/970340/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin1778.fits evtable="EVENTS" outfile="/scratch/kocevski/970340/ft1_filtered_4FGL_J1640.4+3945_daily_bin1778.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: 747

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/970340/ft1_filtered_4FGL_J1640.4+3945_daily_bin1778.fits" evtable="EVENTS" scfile=/scratch/kocevski/970340/ft2_4FGL_J1640.4+3945_daily_bin1778.fits sctable="SC_DATA" outfile=/scratch/kocevski/970340/ltcube_700185601_700444801_4FGL_J1640.4+3945_daily_bin1778.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/970340/ft2_4FGL_J1640.4+3945_daily_bin1778.fits
.....................!
real 13.14
user 12.79
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/970340/ft1_filtered_4FGL_J1640.4+3945_daily_bin1778.fits evtable="EVENTS" scfile=/scratch/kocevski/970340/ft2_4FGL_J1640.4+3945_daily_bin1778.fits sctable="SC_DATA" expcube=/scratch/kocevski/970340/ltcube_700185601_700444801_4FGL_J1640.4+3945_daily_bin1778.fits outfile=/scratch/kocevski/970340/expmap_700185601_700444801_4FGL_J1640.4+3945_daily_bin1778.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/970340/ltcube_700185601_700444801_4FGL_J1640.4+3945_daily_bin1778.fits
.....................!
real 191.31
user 185.79
sys 5.17

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/970340/ft1_filtered_4FGL_J1640.4+3945_daily_bin1778.fits scfile=/scratch/kocevski/970340/ft2_4FGL_J1640.4+3945_daily_bin1778.fits outfile=/scratch/kocevski/970340/cmap_700185601_700444801_4FGL_J1640.4+3945_daily_bin1778.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.55
user 0.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/970340/ft1_filtered_4FGL_J1640.4+3945_daily_bin1778.fits scfile=/scratch/kocevski/970340/ft2_4FGL_J1640.4+3945_daily_bin1778.fits outfile=/scratch/kocevski/970340/cmap_HighResolution_700185601_700444801_4FGL_J1640.4+3945_daily_bin1778.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.39
sys 0.16

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/970340/ft1_filtered_4FGL_J1640.4+3945_daily_bin1778.fits', '/scratch/kocevski/970340/ft2_4FGL_J1640.4+3945_daily_bin1778.fits', expMap='/scratch/kocevski/970340/expmap_700185601_700444801_4FGL_J1640.4+3945_daily_bin1778.fits', expCube='/scratch/kocevski/970340/ltcube_700185601_700444801_4FGL_J1640.4+3945_daily_bin1778.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/970340/Model_4FGL_J1640.4+3945_daily_bin1778.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/970340/ft1_filtered_4FGL_J1640.4+3945_daily_bin1778.fits
Spacecraft file(s): /scratch/kocevski/970340/ft2_4FGL_J1640.4+3945_daily_bin1778.fits
Exposure map: /scratch/kocevski/970340/expmap_700185601_700444801_4FGL_J1640.4+3945_daily_bin1778.fits
Exposure cube: /scratch/kocevski/970340/ltcube_700185601_700444801_4FGL_J1640.4+3945_daily_bin1778.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/970340/Model_4FGL_J1640.4+3945_daily_bin1778.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) = 8207.94142239

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .39513E-03   1.0000          .0000       .10000E+07
     2 'Prefactor '    .38220E-03   1.0000          .0000       .10000E+07
     3 'Prefactor '    .15821E-05   1.0000          .0000       .10000E+07
     4 'Prefactor '    .19061E-04   1.0000          .0000       .10000E+07
     5 'Prefactor '    7.3977       1.0000          .0000       .10000E+07
     6 'Prefactor '    .17081E-02   1.0000          .0000       .10000E+07
     7 'norm      '    .55284E-01   1.0000          .0000       .10000E+07
     8 'norm      '    .27729E-04   1.0000          .0000       .10000E+07
     9 'Prefactor '    61.323       1.0000          .0000       .10000E+07
    10 'Prefactor '    2.8711       1.0000          .0000       .10000E+07
    11 'norm      '    .49802E-03   1.0000          .0000       .10000E+07
    12 'Prefactor '    .36294E-04   1.0000          .0000       .10000E+07
    13 'Prefactor '    .51108E-05   1.0000          .0000       .10000E+07
    14 'Prefactor '    2.2799       1.0000          .0000       .10000E+07
    15 'Prefactor '    .27715E-05   1.0000          .0000       .10000E+07
    16 'norm      '    5.4406       1.0000          .0000       .10000E+07
    17 'norm      '    .13721E-04   1.0000          .0000       .10000E+07
    18 'Prefactor '    8.5446       1.0000          .0000       .10000E+07
    19 'norm      '    .38907       1.0000          .0000       .10000E+07
    20 'norm      '    1.7745       1.0000          .0000       .10000E+07
    21 'norm      '    1.7910       1.0000          .0000       .10000E+07
    22 'norm      '    20.682       1.0000          .0000       .10000E+07
    23 'Prefactor '    4.9558       1.0000          .0000       .10000E+07
    24 'Normalizat'    1.1026       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.0272       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=   8207.886     FROM MIGRAD    STATUS=CONVERGED    212 CALLS     2217 TOTAL
                     EDM=   .96E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .16653E-09    14.817        .43657E-07** at limit **
   2  Prefactor     .83267E-08    32.627       -.48099E-07** at limit **
   3  Prefactor      .0000        .71502       -.32715E-08** at limit **
   4  Prefactor     .94369E-09    19.488       -.46419E-07** at limit **
   5  Prefactor     7.4372        19.347       -.14131E-06    .34846E-03
   6  Prefactor     .17208E-08    50.326        .45230E-06** at limit **
   7  norm          .52865E-01    .13292       -.47281E-09** at limit **
   8  norm           .0000        6.0533        .15355E-07** at limit **
   9  Prefactor     62.134        4.9992       -.41824E-08    .29619E-01
  10  Prefactor     2.9156        4.3760       -.33303E-07    .47701E-04
  11  norm           .0000        20.434        .42978E-08** at limit **
  12  Prefactor      .0000        .65483        .25546E-08** at limit **
  13  Prefactor      .0000        .56991        .85146E-08** at limit **
  14  Prefactor     2.2683        3.3934       -.95689E-08   -.28963E-04
  15  Prefactor      .0000        1.8211       -.12425E-07** at limit **
  16  norm          5.4409        1.8796        .24680E-08   -.31627E-03
  17  norm           .0000        .61344       -.65055E-08** at limit **
  18  Prefactor     8.6628        8.5426        .59024E-08    .16200E-03
  19  norm          .38644        .82819       -.25252E-08   -.56911E-04
  20  norm          1.7936        9.2971        .43167E-07    .12742E-04
  21  norm          1.7897        1.7211        .40862E-08   -.10686E-03
  22  norm          20.779        7.9526        .14723E-07   -.22411E-03
  23  Prefactor     2.6745        654.20        .18014E-05   -.48764E-04
  24  Normalizat    1.1010        .22172       -.36280E-06    .87981E-05
  25  Prefactor     1.0279        .17537       -.93109E-08    .86673E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.66533e-10
  Prefactor  = 8.32667e-09
  Prefactor  = 0
  Prefactor  = 9.4369e-10
  Prefactor  = 7.43721
  Prefactor  = 1.72085e-09
  norm       = 0.0528647
  norm       = 0
  Prefactor  = 62.1342
  Prefactor  = 2.91563
  norm       = 0
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 2.26825
  Prefactor  = 0
  norm       = 5.44091
  norm       = 0
  Prefactor  = 8.66279
  norm       = 0.386444
  norm       = 1.79357
  norm       = 1.78971
  norm       = 20.7789
  Prefactor  = 2.67454
  Normalizat = 1.10102
  Prefactor  = 1.02786
 **********
 **   18 **HESSE 
 **********

 FCN=   8207.886     FROM HESSE     STATUS=OK           487 CALLS     2704 TOTAL
                     EDM=   .54E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .16653E-09    14.873        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .83267E-08    33.411        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        .71896        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .94369E-09    19.451        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     7.4372        19.605        .36851E-03   -1.5653    
   6  Prefactor     .17208E-08    2.2218        .48101E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .52865E-01    .10534        .11067E-02   -1.5713    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm           .0000        6.0504        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     62.134        23.030        .12771E-03   -1.5550    
  10  Prefactor     2.9156        4.4079        .59964E-03   -1.5674    
  11  norm           .0000        20.530        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor      .0000        .64442        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor      .0000        .56429        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     2.2683        3.4311        .67973E-03   -1.5678    
  15  Prefactor      .0000        1.8090        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          5.4409        1.8830        .43056E-03   -1.5661    
  17  norm           .0000        .60301        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     8.6628        8.7829        .34269E-03   -1.5649    
  19  norm          .38644        .86827        .90764E-03   -1.5696    
  20  norm          1.7936        9.4041        .78563E-03   -1.5681    
  21  norm          1.7897        1.7454        .78125E-03   -1.5681    
  22  norm          20.779        8.0771        .21996E-03   -1.5617    
  23  Prefactor     2.6745        682.51        .45153E-03   -1.5675    
  24  Normalizat    1.1010        .19023        .63252E-01   -.89719    
  25  Prefactor     1.0279        .14762        .41488E-01   -.91807    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.39905e-07
Minuit parameter uncertainties:
  1  9.24346e-05
  2  0.00105647
  3  2.26562e-07
  4  0.000270935
  5  19.6055
  6  0.00012433
  7  0.105337
  8  5.65344e-06
  9  23.0298
  10  4.40789
  11  3.1257e-05
  12  1.55329e-08
  13  3.80356e-08
  14  3.43115
  15  2.73644e-07
  16  1.88297
  17  1.41568e-07
  18  8.78291
  19  0.868275
  20  8.21389
  21  1.74542
  22  8.07706
  23  85.4591
  24  0.19035
  25  0.147683
Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  0.000e+00  1.553e-08  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:  1.028e+00  1.477e-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:  1.101e+00  1.903e-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: 7.64e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.91e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/970340/likelihoodResults_700185601_700444801_4FGL_J1640.4+3945_daily_bin1778.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) = 8207.89074958
delta logL = -0.00501763330249

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 8207.82003268
delta logL = 0.0656992663862

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .18099E-02   1.0000          .0000       .10000E+07
     2 'Index     '    4.9274       1.0000          .0000       10.000    
     3 'Normalizat'    1.0792       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0392       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=   8207.886     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      284 TOTAL
                     EDM=   .12E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        .33340        .42118E-03** at limit **
   2  Index         1.3454        .68254        .21658E-05     .0000    
   3  Normalizat    1.1010        1.1823        .22650E-04   -.29731E-03
   4  Prefactor     1.0279        1.1989       -.17213E-04   -.16138E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 1.3454
  Normalizat = 1.10102
  Prefactor  = 1.02786
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   8207.886     FROM HESSE     STATUS=FAILED         9 CALLS      293 TOTAL
                     EDM=   .12E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        .33340        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .14465        1.2746        .21658E-05   -25.952    
   3  Normalizat    1.1010        1.1823        .22650E-04   -2.2444    
   4  Prefactor     1.0279        1.1989       -.17213E-04   -2.2235    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 1.20093e-10
Minuit parameter uncertainties:
  1  4.86614e-06
  2  0.687173
  3  1.21266
  4  1.23249
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/970340': 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) = 8207.88573194
delta logL = -8.0035533756e-11

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  0.000e+00  4.866e-06  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  1.345e+00  6.872e-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:  1.028e+00  1.232e+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:  1.101e+00  1.213e+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/970340/cmap_HighResolution_700185601_700444801_4FGL_J1640.4+3945_daily_bin1778.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.91e-03', job_status='DONE', photon_flux_upper_limit='7.64e-08', time_completed='2023-03-14 01:44:04.898671', job_id='970340', GAL2='1.03', fit_tolerance='1e-08', EG2='1.10', EG='1.10', time_epoch_completed='1678783444.9', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='1.03', dlogl='-8.00e-11', ts2='0.00', photon_index_error='0.00', photon_index='2.42' WHERE bin_id='1778' AND source_name='4FGL J1640.4+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Mar 14 01:44:04 PDT 2023


------------------------------------------------------------
Sender: LSF System <lsf@bullet0119>
Subject: Job 970340: <4FGL_J1640.4+3945_daily_bin1778> in cluster <slac> Done

Job <4FGL_J1640.4+3945_daily_bin1778> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Tue Mar 14 01:30:14 2023
Job was executed on host(s) <bullet0119>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Mar 14 01:30:15 2023
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Mar 14 01:30:15 2023
Terminated at Tue Mar 14 01:44:05 2023
Results reported at Tue Mar 14 01:44:05 2023

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.4+3945_daily_bin1778 250.119 39.7626 700185601 700444801 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 :                                   814.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             367.43 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   830 sec.
    Turnaround time :                            831 sec.

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

