sup3r.preprocessing.samplers.utilities.nsrdb_reduce_daily_data#
- nsrdb_reduce_daily_data(data, shape, csr_ind=0)[source]#
Takes a 5D array and reduces the axis=3 temporal dim to daylight hours.
- Parameters:
data (Union[np.ndarray, da.core.Array]) – 5D data array, where […, csr_ind] is assumed to be clearsky ratio with NaN at night. (n_obs, spatial_1, spatial_2, temporal, features)
shape (int) – (time_steps) Size of time slice to sample from data. If this is greater than data.shape[-2] data won’t be reduced.
csr_ind (int) – Index of the feature axis where clearsky ratio is located and NaN’s can be found at night.
- Returns:
data (Union[np.ndarray, da.core.Array]) – Same as input but with axis=3 reduced to dailylight hours with requested shape.