tfmri.signal.filter_kspace
tfmri.signal.filter_kspace¶
- filter_kspace(kspace, trajectory=None, filter_fn='hamming', filter_rank=None, filter_kwargs=None)[source]¶
Filter k-space.
Multiplies k-space by a filtering function.
- Parameters
kspace – A
Tensor
of any shape. The input k-space.trajectory – A
Tensor
of shapekspace.shape + [N]
, whereN
is the number of spatial dimensions. If None,kspace
is assumed to be Cartesian.filter_fn – A str (one of
'hamming'
,'hann'
or'atanfilt'
) or a callable that accepts a coordinate array and returns corresponding filter values.filter_rank – An int. The rank of the filter. Only relevant if k-space is Cartesian. Defaults to
kspace.shape.rank
.filter_kwargs – A dict. Additional keyword arguments to pass to the filtering function.
- Returns
A
Tensor
of shapekspace.shape
. The filtered k-space.