odc.geo.roi.roi_normalise
- odc.geo.roi.roi_normalise(roi: Union[slice, int, NormalizedSlice], shape: Union[int, Tuple[int]]) NormalizedSlice [source]
- odc.geo.roi.roi_normalise(roi: Tuple[Union[slice, int, NormalizedSlice], ...], shape: Tuple[int, ...]) Tuple[NormalizedSlice, ...]
Normalise ROI.
Fill in missing
.start/.stop
, also deal with negative values, which are treated as offsets from the end..step
parameter is left unchanged.Example
np.s_[:3, 4: ], (10, 20) => np.s_[0:3, 4:20] np.s_[:3, :-3], (10, 20) => np.s_[0:3, 0:17]