_HdfData#
- class _HdfData(ifile, dataset_id=None, **kwargs)[source]#
-
Abstract base class for a PSI MAS or POT3D HDF data reader.
Extends
_HdfArraywith file lifecycle management, coordinate scale readers, value-space slicing, and spatial interpolation. Concrete implementations areH4Data(HDF4 backend) andH5Data(HDF5 backend).Instances should be obtained via
PsiData(), not constructed directly.- Attributes:
- _filepath
pathlib.Path Absolute path to the open HDF file.
- _icache
RegularGridInterpolator|None Cached scipy interpolator, or
Noneif not yet built.
- _filepath
See also
H4DataHDF4 concrete implementation.
H5DataHDF5 concrete implementation.
PsiDataPublic factory function.
Methods
|
Release cached data and/or the cached interpolator. |
|
Close the open file handle and set the internal reference to |
|
Release the file handle during garbage collection (called by |
|
Interpolate the dataset at arbitrary spatial positions. |
|
Load the data array and optionally build the interpolator into memory. |
|
Re-open the file handle if it was previously closed. |
|
Read data by index with optional unit conversion and coordinate scales. |
Validate data-reader metadata including model, scale, and shape consistency. |
|
|
Read data by physical coordinate value with linear interpolation. |
Class Methods
|
Open the HDF file at ifile and return the format-specific file handle. |
Properties
Whether a |
|
PSI model type string. |
|
Named tuple of coordinate scale readers |
|
Time-step sequence number extracted from the filename or file attributes. |