read#
- _HdfData.read(*args, unit=None, mesh=None, order=None, scales=True)[source]#
Read data by index with optional unit conversion and coordinate scales.
Attention
When reading/slicing data, the
*argsare always supplied in physical (e.g. \((r, \theta, \phi)\)) order. However, unless specified with theorderargument, the sliced data array will be returned in storage order.- Parameters:
- *args
int|tuple|slice|None Index-space axis arguments in physical
(r, t, p)order.- unit
UnitLike|None, optional Output unit. Default is
None(code units).- mesh
MeshLike|None, optional Target stagger mesh. Default is
None(no remeshing).- order
ArrayOrdering|None, optional Transpose the output if it differs from storage order. Default is
None.- scalesbool, optional
If
True(default), return coordinate slices alongside data.
- *args
- Returns:
Examples
>>> data, r, t, p = reader.read() >>> data_gauss = reader.read(scales=False, unit='Gauss')