dtc_super_resolution.rcm_emulator.ml_module.datasets

Dataset and helper functions for inference in the super-resolution model.

Functions

create_mask(true_smb)

Create a mask for the true SMB data, marking sea pixels as 0 and land pixels as 1.

standardize(data)

Standardize the data using either its own mean and std or provided mean and std.

unstandardize(data[, mean, std])

Unstandardize the data using provided mean and std.

Classes

InferenceDataset(era5_patches, patches_metadata)

Custom Dataset for inference, handling ERA5 patches and their metadata.

class InferenceDataset(era5_patches: ndarray, patches_metadata: list)

Bases: Dataset

Custom 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.