mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 20:13:41 +02:00
fix: only allow irregularly spaced configs in hadrons input if idl is
specified.
This commit is contained in:
parent
c446898932
commit
a7ff26ed9c
1 changed files with 3 additions and 1 deletions
|
@ -45,9 +45,11 @@ def _get_files(path, filestem, idl):
|
||||||
raise Exception("Unsorted files")
|
raise Exception("Unsorted files")
|
||||||
if len(dc) == 1:
|
if len(dc) == 1:
|
||||||
idx = range(cnfg_numbers[0], cnfg_numbers[-1] + dc[0], dc[0])
|
idx = range(cnfg_numbers[0], cnfg_numbers[-1] + dc[0], dc[0])
|
||||||
else:
|
elif idl:
|
||||||
idx = idl
|
idx = idl
|
||||||
warnings.warn("Configurations are not evenly spaced.", RuntimeWarning)
|
warnings.warn("Configurations are not evenly spaced.", RuntimeWarning)
|
||||||
|
else:
|
||||||
|
raise Exception("Configurations are not evenly spaced.")
|
||||||
|
|
||||||
return filtered_files, idx
|
return filtered_files, idx
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue