pyampp.gxbox.view_h5
Attributes
Classes
Functions
|
Convert canonical H5 zyx cubes into viewer xyz cubes. |
|
|
|
|
|
|
|
Return |
|
Load a saved model file into the in-memory objects expected by |
|
Module Contents
- pyampp.gxbox.view_h5.normalize_viewer_axis_order(b3d: dict) dict[source]
Convert canonical H5 zyx cubes into viewer xyz cubes. MagFieldViewer expects (x, y, z).
- pyampp.gxbox.view_h5.can_prepare_model_for_viewer(model_path: str | pathlib.Path) bool[source]
Return
Truewhen a file looks like a viewer-compatible saved model.This is a lightweight gate for enabling UI actions. It intentionally avoids full SAV conversion and only checks file existence, supported suffix, and the presence of recognizable top-level model groups for HDF5 files.
- pyampp.gxbox.view_h5.prepare_model_for_viewer(model_path: str | pathlib.Path) tuple[SimpleBox, astropy.time.Time, str, pathlib.Path | None][source]
Load a saved model file into the in-memory objects expected by
MagFieldViewer.- Returns:
(box, obs_time, b3dtype, temp_h5_path)wheretemp_h5_pathis a temporary conversion artifact when the canonical loader had to materialize one.- Return type:
tuple