mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 03:53:41 +02:00
small bug fixes after first pull request
This commit is contained in:
parent
76b7f159aa
commit
b8b1d36125
1 changed files with 3 additions and 4 deletions
|
@ -8,7 +8,7 @@ import numpy as np # Thinly-wrapped numpy
|
||||||
from ..obs import Obs
|
from ..obs import Obs
|
||||||
from . import utils
|
from . import utils
|
||||||
|
|
||||||
def read_sfcf(path, prefix, name, quarks='.*', noffset=0, wf=0, wf2=0, **kwargs):
|
def read_sfcf(path, prefix, name, quarks='.*', noffset=0, wf=0, wf2=0, version = "1.0", **kwargs):
|
||||||
"""Read sfcf c format from given folder structure.
|
"""Read sfcf c format from given folder structure.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
|
@ -66,8 +66,7 @@ def read_sfcf(path, prefix, name, quarks='.*', noffset=0, wf=0, wf2=0, **kwargs)
|
||||||
#due to higher usage in current projects, compact file format is default
|
#due to higher usage in current projects, compact file format is default
|
||||||
compact = True
|
compact = True
|
||||||
#get version string
|
#get version string
|
||||||
version = "1.0"
|
known_versions = ["0.0","1.0","2.0","1.0c","2.0c","1.0a","2.0a"]
|
||||||
known_versions = ["0.0","1.0","2.0","1.0c","2.0c"]
|
|
||||||
if "version" in kwargs:
|
if "version" in kwargs:
|
||||||
version = kwargs.get("version")
|
version = kwargs.get("version")
|
||||||
if not version in known_versions:
|
if not version in known_versions:
|
||||||
|
@ -247,7 +246,7 @@ def read_sfcf(path, prefix, name, quarks='.*', noffset=0, wf=0, wf2=0, **kwargs)
|
||||||
deltas[k - start][i][cnfg] = floats[1 + im - single]
|
deltas[k - start][i][cnfg] = floats[1 + im - single]
|
||||||
|
|
||||||
if "check_configs" in kwargs:
|
if "check_configs" in kwargs:
|
||||||
print("Chekcing for missing configs...")
|
print("Checking for missing configs...")
|
||||||
che = kwargs.get("check_configs")
|
che = kwargs.get("check_configs")
|
||||||
if not (len(che) == len(idl)):
|
if not (len(che) == len(idl)):
|
||||||
raise Exception("check_configs has to be the same length as replica!")
|
raise Exception("check_configs has to be the same length as replica!")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue