sup3r.preprocessing.samplers.utilities.nsrdb_sub_daily_sampler

sup3r.preprocessing.samplers.utilities.nsrdb_sub_daily_sampler#

nsrdb_sub_daily_sampler(data, shape, time_index=None)[source]#

Finds a random sample during daylight hours of a day. Nightime is assumed to be marked as NaN in feature axis == csr_ind in the data input.

Parameters:
  • data (Union[Sup3rX, Sup3rDataset]) – Dataset object with ‘clearsky_ratio’ accessible as data[‘clearsky_ratio’] (spatial_1, spatial_2, temporal, features)

  • shape (int) – (time_steps) Size of time slice to sample from data, must be an integer less than or equal to 24.

  • time_index (pd.DatetimeIndex) – Time index corresponding the the time axis of data. If None then data.time_index will be used.

Returns:

tslice (slice) – time slice with size shape of data starting at the beginning of the day