Commit c44d2d9e authored by Andrea Paris's avatar Andrea Paris Committed by Boris Bonev
Browse files

updated docstring

parent 43e3e720
...@@ -67,23 +67,38 @@ def _normalize_convolution_tensor_s2( ...@@ -67,23 +67,38 @@ def _normalize_convolution_tensor_s2(
functions, compute mean normalization across all basis functions, or use support functions, compute mean normalization across all basis functions, or use support
weights. The function also optionally merges quadrature weights into the tensor. weights. The function also optionally merges quadrature weights into the tensor.
Args: Parameters
psi_idx: Index tensor for the sparse convolution tensor. -----------
psi_vals: Value tensor for the sparse convolution tensor. psi_idx: torch.Tensor
in_shape: Tuple of (nlat_in, nlon_in) representing input grid dimensions. Index tensor for the sparse convolution tensor.
out_shape: Tuple of (nlat_out, nlon_out) representing output grid dimensions. psi_vals: torch.Tensor
kernel_size: Number of kernel basis functions. Value tensor for the sparse convolution tensor.
quad_weights: Quadrature weights for numerical integration. in_shape: Tuple[int]
transpose_normalization: If True, applies normalization in transpose direction. Tuple of (nlat_in, nlon_in) representing input grid dimensions.
basis_norm_mode: Normalization mode, one of ["none", "individual", "mean", "support"]. out_shape: Tuple[int]
merge_quadrature: If True, multiplies values by quadrature weights. Tuple of (nlat_out, nlon_out) representing output grid dimensions.
eps: Small epsilon value to prevent division by zero. kernel_size: int
Number of kernel basis functions.
Returns: quad_weights: torch.Tensor
torch.Tensor: Normalized convolution tensor values. Quadrature weights for numerical integration.
transpose_normalization: bool
Raises: If True, applies normalization in transpose direction.
ValueError: If basis_norm_mode is not one of the supported modes. basis_norm_mode: str
Normalization mode, one of ["none", "individual", "mean", "support"].
merge_quadrature: bool
If True, multiplies values by quadrature weights.
eps: float
Small epsilon value to prevent division by zero.
Returns
-------
torch.Tensor
Normalized convolution tensor values.
Raises
------
ValueError
If basis_norm_mode is not one of the supported modes.
""" """
# exit here if no normalization is needed # exit here if no normalization is needed
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment