IterativeGeneralizedGaussian.apply_1d_sized¶
giant.point_spread_functions.gaussians
:
- IterativeGeneralizedGaussian.apply_1d_sized(image_1d, size, direction=None, step=1)¶
Applies the defined PSF using the stored parameters to the 1D image scans provided with a given kernel size.
image_1d
can be a 2D array but in that case each row will be treated as an independent 1D scan.For non-symmetric PSFs, a
direction
argument can be supplied which should be the direction in the image of each scan line. This can be used to determine the appropriate cross-section of the PSF to use for applying to the 1D scans (if applicable). If no direction is provided then the x direction [1, 0] is assumed.This method works by sampling the PSF in the (optionally) specified direction(s) centered around the centroid of the PSF according to the input
size
. These kernels are then applied to the input scan lines using a Fourier transform, and the resulting scan lines are returned.- Parameters:
image_1d (ndarray) – The scan line(s) to be blurred using the PSF
size (int) – The size of the kernel to use when convolving the PSF with the scan line
direction (ndarray | None) – The direction for the 1D cross section of the PSF. This should be either None, a length 2 array, or a shape nx2 array where n is the number of scan lines
step (Real) – The step size of the lines being blurred.
- Returns:
an array containing the input after blurring with the defined PSF
- Return type:
ndarray