mirror of
https://github.com/fjosw/pyerrors.git
synced 2026-08-04 11:31:21 +02:00
correct docs, implement failesafe for therm. trajectories
This commit is contained in:
parent
8251ccf3e2
commit
52a2c67614
1 changed files with 3 additions and 1 deletions
|
|
@ -250,7 +250,7 @@ def _extract_flowed_energy_density(path, prefix, dtr_read, xmin, spatial_extent,
|
|||
dtr_read : int
|
||||
Determines how many trajectories should be skipped
|
||||
when reading the ms.dat files.
|
||||
Corresponds to dtr_cnfg / dtr_ms (dncnfg / dnms) in the openQCD input file.
|
||||
Corresponds to dtr_ms (dnms) in the openQCD input file.
|
||||
xmin : int
|
||||
First timeslice where the boundary
|
||||
effects have sufficiently decayed.
|
||||
|
|
@ -377,6 +377,8 @@ def _extract_flowed_energy_density(path, prefix, dtr_read, xmin, spatial_extent,
|
|||
for current in range(0, len(item), tmax)])
|
||||
|
||||
diffmeas = configlist[-1][-1] - configlist[-1][-2]
|
||||
if not np.isclose(configlist[-1][0]/diffmeas, int(configlist[-1][0]/diffmeas), 1e-12):
|
||||
raise ValueError("Spacing of the first configuration after thermalization is irregular.")
|
||||
configlist[-1] = [item // diffmeas for item in configlist[-1]]
|
||||
if kwargs.get('assume_thermalization', True) and configlist[-1][0] > 1:
|
||||
warnings.warn('Assume thermalization and that the first measurement belongs to the first config.')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue