sup3r.utilities.utilities.spatial_coarsening
- spatial_coarsening(data, s_enhance=2, obs_axis=True)[source]
Coarsen data according to s_enhance resolution
- Parameters:
data (np.ndarray) – 5D | 4D | 3D array with dimensions: (n_obs, spatial_1, spatial_2, temporal, features) (obs_axis=True) (n_obs, spatial_1, spatial_2, features) (obs_axis=True) (spatial_1, spatial_2, temporal, features) (obs_axis=False) (spatial_1, spatial_2, temporal_or_features) (obs_axis=False)
s_enhance (int) – factor by which to coarsen spatial dimensions
obs_axis (bool) – Flag for if axis=0 is the observation axis. If True (default) spatial axis=(1, 2) (zero-indexed), if False spatial axis=(0, 1)
- Returns:
data (np.ndarray) – 3D | 4D | 5D array with same dimensions as data with new coarse resolution