bulum.io.iqqm_out_reader module
Read .OUT files with an associated .IQN file.
- class IqqmOutReader(iqn_filepath: str | Path)
Bases:
objectRead and parse IQQM .OUT files with associated .IQN index files.
Examples
reader = IqqmOutReader("abcd01.IQN") reader.require(node=1) reader.require(node=23) df = reader.read()
- available: dict[str, dict[str, Any]]
A dictionary of all nodes that are available to be read based off the .OUT file.
- num_to_name(*, which: Literal['required', 'available'] = 'required') dict[str, str]
Return a mapping between node numbers and (IQQM) names.
Purely here for convenience in cross-referencing nodes.
- read(remove_temp_files: bool = True, read_all_availabe: bool = False, *, engine: Literal['iqqmgui', 'python'] = 'iqqmgui', iqqmgui_path: str | Path | None = None) DataFrame
Invoke the class to read the associated data.
- Parameters:
remove_temp_files (bool, default=True) – Clean up after yourself (remove artifacts from running
iqmgui).read_all_availabe (bool, default=False) – Read all nodes instead of just those previously marked by the user as required.
engine ({"iqqmgui", "python"}, default="iqqmgui") – Decides how to parse the OUT file data. “iqqmgui” will call on the executable (on path or provided by iqqmgui_path), while python will use the bulum native implementation.
iqqmgui_path (str or Path, optional) – If engine is set to iqqmgui, you can specify the executable to use to extract data.
- Return type:
- require(node: int | str | None = None, supertype: float | None = None, type: float | None = None, output: Any = None) bool
Mark a node or multiple nodes as ‘required’ i.e. for reading. At least one argument must be non-null.
- Returns:
True if at least one node was marked, False otherwise, likely indicating failure or a bad node specification.
- Return type:
- class iqqm_out_reader(iqn_filepath: str | Path)
Bases:
IqqmOutReaderFor backwards compatibility. See
IqqmOutReader.Deprecated since version 0.3.0: Non-pythonic naming