pyampp.gxbox.view_h5 ==================== .. py:module:: pyampp.gxbox.view_h5 Attributes ---------- .. autoapisummary:: pyampp.gxbox.view_h5.PyVistaDeprecationWarning Classes ------- .. autoapisummary:: pyampp.gxbox.view_h5.SimpleBox Functions --------- .. autoapisummary:: pyampp.gxbox.view_h5.normalize_viewer_axis_order pyampp.gxbox.view_h5.infer_dims pyampp.gxbox.view_h5.infer_time pyampp.gxbox.view_h5.infer_res pyampp.gxbox.view_h5.can_prepare_model_for_viewer pyampp.gxbox.view_h5.prepare_model_for_viewer pyampp.gxbox.view_h5.main Module Contents --------------- .. py:data:: PyVistaDeprecationWarning .. py:function:: normalize_viewer_axis_order(b3d: dict) -> dict Convert canonical H5 zyx cubes into viewer xyz cubes. MagFieldViewer expects (x, y, z). .. py:class:: SimpleBox Bases: :py:obj:`pyampp.gxbox.box.BoxGeometryMixin` .. py:attribute:: dims_pix :type: numpy.ndarray .. py:attribute:: res :type: astropy.units.Quantity .. py:attribute:: b3d :type: dict .. py:property:: grid_coords .. py:function:: infer_dims(b3d: dict) -> numpy.ndarray .. py:function:: infer_time(b3d: dict) -> astropy.time.Time .. py:function:: infer_res(b3d: dict) -> astropy.units.Quantity .. py:function:: can_prepare_model_for_viewer(model_path: str | pathlib.Path) -> bool Return ``True`` when 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. .. py:function:: prepare_model_for_viewer(model_path: str | pathlib.Path) -> tuple[SimpleBox, astropy.time.Time, str, pathlib.Path | None] Load a saved model file into the in-memory objects expected by ``MagFieldViewer``. :returns: ``(box, obs_time, b3dtype, temp_h5_path)`` where ``temp_h5_path`` is a temporary conversion artifact when the canonical loader had to materialize one. :rtype: tuple .. py:function:: main() -> int