sup3r.utilities.utilities.nsrdb_sub_daily_sampler
- nsrdb_sub_daily_sampler(data, shape, time_index, csr_ind=0)[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 (np.ndarray) – Data array with dimensions, where […, csr_ind] is assumed to be clearsky ratio with NaN at night. (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 that matches the data axis=2
csr_ind (int) – Index of the feature axis where clearsky ratio is located and NaN’s can be found at night.
- Returns:
tslice (slice) – time slice with size shape of data starting at the beginning of the day