mrpro.utils.apply_lowres

mrpro.utils.apply_lowres(function: Callable[[Tensor], Tensor], size: Sequence[int], dim: Sequence[int]) Callable[source]

Apply function f on low-res version of tensor x and then return the upsampled f(x).

Parameters:
  • function (Callable[[Tensor], Tensor]) – Function to be applied on low-resolution version of tensor.

  • size (Sequence[int]) – Low-resolution size of tensor.

  • dim (Sequence[int]) – Low-resolution axes. Must have the same length as size.

Returns:

Function which downsamples tensor, applies function and upsamples result.