make_fourier_convolution

hcipy.fourier.make_fourier_convolution(input_grid, kernel, q=1)[source]

Create a FourierFilter that performs convolution with a spatial kernel.

Parameters:
input_gridGrid

The grid that is expected for the input field.

kernelField or Field generator

The spatial convolution kernel. If a callable, it is evaluated on the internal spatial grid and must return a Field. If a Field, its grid’s delta must equal input_grid.delta.

qscalar

The amount of zeropadding to perform in the real domain. A value of 1 means no zeropadding.

Returns:
FourierFilter

An operator that performs the convolution.

Raises:
ValueError

When a Field is given as the kernel, and its pixel size is not the same as the pixel size of the input grid.