mrpro.utils.filters.gaussian_filter

mrpro.utils.filters.gaussian_filter(x: Tensor, sigmas: float | Sequence[float] | Tensor, dim: int | Sequence[int] | None = None, truncate: int = 3, pad_mode: Literal['constant', 'reflect', 'replicate', 'circular'] = 'constant', pad_value: float = 0.0) → Tensor

Apply a and-Gaussian filter.

Parameters:
  • x (Tensor) – Tensor to filter

  • sigmas (float | Sequence[float] | Tensor) – Standard deviation for Gaussian kernel. If iterable, must have length equal to the number of axes.

  • dim (int | Sequence[int] | None, default: None) – Axis or axes to filter over. If None, filters over all axes.

  • truncate (int, default: 3) – Truncate the filter at this many standard deviations.

  • pad_mode (Literal['constant', 'reflect', 'replicate', 'circular'], default: 'constant') – Padding mode

  • pad_value (float, default: 0.0) – Padding value for pad_mode = constant