BGlib.gmode.proc.fft.get_2d_gauss_lpf¶
- BGlib.gmode.proc.fft.get_2d_gauss_lpf(radius_mat, filter_width)[source]¶
Builds a 2D, radially symmetric, low-pass Gaussian filter based on the provided radius matrix. The corresponding high pass filter can be built simply by subtracting the resulting low-pass filter from 1.
Multiply the output of this function with the (shifted) fft of an image to apply the filter.
- Parameters:
radius_mat (2d numpy float array) – A [NxM] matrix of the same size as the image that this filter will be applied to
filter_width (float) – Size of the filter
- Returns:
gauss_filt – matrix with a single gaussian peak at the center of the matrix.
- Return type:
2D numpy float array