# Convolution Filters¶

Convolution filters suitable for use in gridding and degridding.

## API¶

 convolution_filter(half_support, …) Create a 2D Convolution Filter suitable for use with gridding and degridding functions.
africanus.filters.convolution_filter(half_support, oversampling_factor, filter_type, **kwargs)[source]

Create a 2D Convolution Filter suitable for use with gridding and degridding functions.

Parameters: half_support : integer Half support (N) of the filter. The filter has a full support of N*2 + 3 taps. Two of the taps exist as padding. oversampling_factor : integer Number of spaces in-between grid-steps (improves gridding/degridding accuracy) filter_type : {‘kaiser-bessel’, ‘sinc’} Filter type. See Convolution Filters for further information. beta : float, optional Beta shape parameter for Kaiser Bessel filters. normalise : {True, False} Normalise the filter by the it’s volume. Defaults to True. ConvolutionFilter namedtuple containing filter attributes
africanus.filters.ConvolutionFilter(half_sup, oversample, full_sup_wo_padding, full_sup, no_taps, filter_taps) = <class 'africanus.filters.conv_filters.ConvolutionFilter'>

## Kaiser Bessel¶

The Kaiser Bessel function.

 kaiser_bessel(u, W, beta) Compute a 1D Kaiser Bessel filter as defined in Selection of a Convolution Function for Fourier Inversion Using Gridding. kaiser_bessel_with_sinc(u, W, oversample, beta) Produces a filter composed of Kaiser Bessel multiplied by a sinc. kaiser_bessel_fourier(x, W, beta) Computes the Fourier Transform of a 1D Kaiser Bessel filter. estimate_kaiser_bessel_beta(W) Estimate the kaiser bessel beta using the following heuristic:
africanus.filters.kaiser_bessel_filter.kaiser_bessel(u, W, beta)[source]

Compute a 1D Kaiser Bessel filter as defined in Selection of a Convolution Function for Fourier Inversion Using Gridding.

Parameters: Filter positions W : int Width of the filter beta : float, optional Kaiser Bessel shape parameter numpy.ndarray Kaiser Bessel filter with the same shape as u
africanus.filters.kaiser_bessel_filter.kaiser_bessel_with_sinc(u, W, oversample, beta, normalise=True)[source]

Produces a filter composed of Kaiser Bessel multiplied by a sinc.

Accounts for the oversampling factor, as well as normalising the filter.

Parameters: Filter positions W : int Width of the filter oversample : int Oversampling factor beta : float Kaiser Bessel shape parameter normalise : optional, {True, False} True if the filter should be normalised numpy.ndarray Filter with the same shape as u
africanus.filters.kaiser_bessel_filter.kaiser_bessel_fourier(x, W, beta)[source]

Computes the Fourier Transform of a 1D Kaiser Bessel filter. as defined in Selection of a Convolution Function for Fourier Inversion Using Gridding.

Parameters: Filter positions W : int Width of the filter. beta : float Kaiser bessel shape parameter numpy.ndarray Fourier Transform of the Kaiser Bessel, with the same shape as x.
africanus.filters.kaiser_bessel_filter.estimate_kaiser_bessel_beta(W)[source]

Estimate the kaiser bessel beta using the following heuristic:

$\beta = 2.34 \times W$
Parameters: W : int Width of the filter float Kaiser Bessel beta shape parameter

## Sinc¶

The Sinc function.