pleiades.utils.helper module
Helper functions for parameter file handling.
- class pleiades.utils.helper.VaryFlag(value)[source]
Bases:
Enum- NO = 0
- YES = 1
- PUP = 3
- USE_FROM_PARFILE = -1
- USE_FROM_OTHERS = -2
- pleiades.utils.helper.check_pseudo_scientific(val: str) float[source]
Check for pseudo scientific notation sometimes found in SAMMY files.
- Parameters:
val (str) – The input string potentially containing pseudo scientific notation.
- Returns:
The fixed string with proper scientific notation.
- Return type:
Examples:
- pleiades.utils.helper.safe_parse(s: str, as_int: bool = False) float | None[source]
Helper function to safely parse numeric values
- Parameters:
s – String to parse
as_int – Flag to parse as integer (default: False)
- Returns:
Parsed value or None if parsing failed
- pleiades.utils.helper.format_float(value: float | None, width: int = 11) str[source]
Helper to format float values in fixed width with proper spacing