dtc_super_resolution.rcm_emulator.ml_module.datasets
Dataset and helper functions for inference in the super-resolution model.
Functions
|
Create a mask for the true SMB data, marking sea pixels as 0 and land pixels as 1. |
|
Standardize the data using either its own mean and std or provided mean and std. |
|
Unstandardize the data using provided mean and std. |
Classes
|
Custom Dataset for inference, handling ERA5 patches and their metadata. |
- class InferenceDataset(era5_patches: ndarray, patches_metadata: list)
Bases:
DatasetCustom Dataset for inference, handling ERA5 patches and their metadata.
- create_mask(true_smb: ndarray) ndarray
Create a mask for the true SMB data, marking sea pixels as 0 and land pixels as 1.
- standardize(data: ndarray) ndarray
Standardize the data using either its own mean and std or provided mean and std.
- unstandardize(data: ndarray, mean: float = 14.94593, std: float = 29.616882) ndarray
Unstandardize the data using provided mean and std.