pylbo.gimli.utils
Functions
|
Validates and returns the output directory for the parfiles. |
|
Checks whether an expression depends on any of the symbols in a given list. |
|
Checks whether an expression is a number. |
|
Removes the wavenumbers from the equilibrium parameters. |
|
Creates a file with a given path (or asks whether to overwrite it if it |
|
Writes a string to a file with a given indentation level. |
Module Contents
- pylbo.gimli.utils.validate_output_dir(output_dir)
Validates and returns the output directory for the parfiles.
- Parameters:
output_dir (str, PathLike) – The output directory to store the parfiles in. If not given, defaults to the current working directory.
- Raises:
NotADirectoryError – If the output directory is not found.
- pylbo.gimli.utils.is_symbol_dependent(symbols, expr)
Checks whether an expression depends on any of the symbols in a given list.
- pylbo.gimli.utils.is_sympy_number(expr)
Checks whether an expression is a number.
- Parameters:
expr (sympy expression) – The expression to check.
- Returns:
Whether the expression is a number.
- Return type:
- pylbo.gimli.utils.get_equilibrium_parameters(param)
Removes the wavenumbers from the equilibrium parameters.