sidpy.hdf.reg_ref.get_indices_for_region_ref¶
- sidpy.hdf.reg_ref.get_indices_for_region_ref(h5_main, ref, return_method='slices')[source]¶
Given an hdf5 region reference and the dataset it refers to, return an array of indices within that dataset that correspond to the reference.
- Parameters:
h5_main (HDF5 Dataset) – dataset that the reference can be returned from
ref (HDF5 Region Reference) – Region reference object
return_method ({'slices', 'corners', 'points'}) –
slices : the reference is return as pairs of slices
corners : the reference is returned as pairs of corners representing the starting and ending indices of each block
points : the reference is returns as a list of tuples of points
- Returns:
ref_inds – array of indices in the source dataset that ref accesses
- Return type:
Numpy Array