mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 20:13:41 +02:00
docs: docstrings improved.
This commit is contained in:
parent
1d41a664ee
commit
c11410da5e
2 changed files with 25 additions and 17 deletions
|
@ -367,9 +367,9 @@ def read_qtop(path, prefix, c, dtr_cnfg=1, version="1.2", **kwargs):
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
path:
|
path : str
|
||||||
path of the measurement files
|
path of the measurement files
|
||||||
prefix:
|
prefix : str
|
||||||
prefix of the measurement files, e.g. <prefix>_id0_r0.ms.dat
|
prefix of the measurement files, e.g. <prefix>_id0_r0.ms.dat
|
||||||
c : double
|
c : double
|
||||||
Smearing radius in units of the lattice extent, c = sqrt(8 t0) / L
|
Smearing radius in units of the lattice extent, c = sqrt(8 t0) / L
|
||||||
|
@ -545,11 +545,19 @@ def read_qtop(path, prefix, c, dtr_cnfg=1, version="1.2", **kwargs):
|
||||||
|
|
||||||
|
|
||||||
def read_qtop_sector(target=0, **kwargs):
|
def read_qtop_sector(target=0, **kwargs):
|
||||||
"""target: int
|
"""Constructs reweighting factors to a specified topological sector.
|
||||||
specifies the topological sector to be reweighted to (default 0)
|
|
||||||
|
Parameters
|
||||||
|
----------
|
||||||
|
target : int
|
||||||
|
Specifies the topological sector to be reweighted to (default 0)
|
||||||
q_top : Obs
|
q_top : Obs
|
||||||
alternatively takes args of read_qtop method as kwargs
|
Alternatively takes args of read_qtop method as kwargs
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if not isinstance(target, int):
|
||||||
|
raise Exception("'target' has to be an integer.")
|
||||||
|
|
||||||
if "q_top" in kwargs:
|
if "q_top" in kwargs:
|
||||||
qtop = kwargs.get("q_top")
|
qtop = kwargs.get("q_top")
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -79,7 +79,7 @@ def _assert_equal_properties(ol, otype=Obs):
|
||||||
if not isinstance(o, otype):
|
if not isinstance(o, otype):
|
||||||
raise Exception("Wrong data type in list.")
|
raise Exception("Wrong data type in list.")
|
||||||
if not ol[0].is_merged == o.is_merged:
|
if not ol[0].is_merged == o.is_merged:
|
||||||
raise Exception("All Obs in list have to be defined on the same set of configs.")
|
raise Exception("All Obs in list have to have the same state 'is_merged'.")
|
||||||
if not ol[0].reweighted == o.reweighted:
|
if not ol[0].reweighted == o.reweighted:
|
||||||
raise Exception("All Obs in list have to have the same property 'reweighted'.")
|
raise Exception("All Obs in list have to have the same property 'reweighted'.")
|
||||||
if not ol[0].e_content == o.e_content:
|
if not ol[0].e_content == o.e_content:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue