sup3r.preprocessing.samplers.utilities

sup3r.preprocessing.samplers.utilities#

Miscellaneous utilities for sampling

Functions

daily_time_sampler(data, shape, time_index)

Finds a random temporal slice from data starting at midnight

nsrdb_reduce_daily_data(data, shape[, csr_ind])

Takes a 5D array and reduces the axis=3 temporal dim to daylight hours.

nsrdb_sub_daily_sampler(data, shape[, ...])

Finds a random sample during daylight hours of a day.

uniform_box_sampler(data_shape, sample_shape)

Returns a 2D spatial slice used to extract a sample from a data array.

uniform_time_sampler(data_shape, sample_shape)

Returns temporal slice used to extract temporal chunk from data.

weighted_box_sampler(data_shape, ...)

Extracts a temporal slice from data with selection weighted based on provided weights

weighted_time_sampler(data_shape, ...)

Returns a temporal slice with selection weighted based on provided weights used to extract temporal chunk from data