comment get_specs
This commit is contained in:
parent
029239c701
commit
3cd7896ae1
1 changed files with 18 additions and 0 deletions
|
|
@ -229,6 +229,24 @@ def _map_params(params: dict[str, Any], spec_list: list[str]) -> dict[str, Any]:
|
||||||
|
|
||||||
|
|
||||||
def get_specs(key: str, parameters: dict[str, Any], sep: str = '/') -> str:
|
def get_specs(key: str, parameters: dict[str, Any], sep: str = '/') -> str:
|
||||||
|
"""
|
||||||
|
Get sepcification from the parameter file for a specific key in the read measurements
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
----------
|
||||||
|
key: str
|
||||||
|
The key for whioch the parameters are to be looked up.
|
||||||
|
parameters: dict[str, Any]
|
||||||
|
The dictionary with the parameters from the parameter file.
|
||||||
|
sep: str
|
||||||
|
Separator string for the key. (default="/")
|
||||||
|
|
||||||
|
Return
|
||||||
|
------
|
||||||
|
s: str
|
||||||
|
json string holding the parameters.
|
||||||
|
"""
|
||||||
|
|
||||||
key_parts = key.split(sep)
|
key_parts = key.split(sep)
|
||||||
if corr_types[key_parts[0]] == 'bi':
|
if corr_types[key_parts[0]] == 'bi':
|
||||||
param = _map_params(parameters, key_parts[1:-1])
|
param = _map_params(parameters, key_parts[1:-1])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue