Utilities (utils
)¶
Utilities tools.
|
Process comment-line header (usually indicated by the '#' character) of text files. |
|
Load a parameter set from a file into a dictionary. |
- horizonground.utils.process_header(header, skipcols=0)[source]¶
Process comment-line header (usually indicated by the '#' character) of text files.
- Parameters
header (str) – File header line either delimited by comma or space.
skipcols (int, optional) – Skip the first columns (default is 0).
- Returns
columns – Column headings of the file.
- Return type
list of str
- horizonground.utils.load_parameter_set(parameter_file)[source]¶
Load a parameter set from a file into a dictionary.
- Parameters
parameter_file (str or
pathlib.Path
) – Parameter file with the header line giving the parameter names and the first non-comment line giving the parameter values delimited by comma.- Returns
parameter_set – Parameter set.
- Return type
Notes
Parameters with names beginning with ‘Delta’ are discarded.