sup3r.preprocessing.samplers.utilities.uniform_time_sampler

sup3r.preprocessing.samplers.utilities.uniform_time_sampler#

uniform_time_sampler(data_shape, sample_shape, crop_slice=slice(None, None, None))[source]#

Returns temporal slice used to extract temporal chunk from data.

Parameters:
  • data_shape (tuple) – (rows, cols, n_steps) Size of full spatiotemporal data grid available for sampling

  • sample_shape (int) – (time_steps) Size of time slice to sample from data grid

  • crop_slice (slice) – Optional slice used to restrict the sampling window.

Returns:

slice (slice) – time slice with size shape