harmonica.filters.gaussian_lowpass_kernel
harmonica.filters.gaussian_lowpass_kernel¶
- harmonica.filters.gaussian_lowpass_kernel(fft_grid, wavelength)[source]¶
Filter for Gaussian low-pass in frequency domain
Return a
xarray.DataArray
with the values of a Gaussian low-pass filter the frequency domain. The filter is built upon the frequency coordinates of the passedfft_grid
and is defined as follows:\[g(\mathbf{k}) = e^{ - \frac{1}{2} \left( \frac{|\mathbf{k}|}{k_c} \right)^2 }\]where \(\mathbf{k}\) is the wavenumber vector (\(\mathbf{k} = 2\pi \mathbf{f}\) where \(\mathbf{f}\) is the frequency vector) and \(k_c\) is the cutoff wavenumber: \(k_c = \frac{2\pi}{\lambda_c}\), where \(\lambda_c\) is the cutoff wavelength.
- Parameters
fft_grid (
xarray.DataArray
) – Array with the Fourier transform of the original grid. Its dimensions should be in the following order: freq_northing, freq_easting. Usexrft.xrft.fft
andxrft.xrft.ifft
functions to compute the Fourier Transform and its inverse, respectively.wavelength (float) – The cutoff wavelength for the low-pass filter. Its units should be the inverse units of the coordinates in
fft_grid
.
- Returns
da_filter (
xarray.DataArray
) – Array with the kernel for the Gaussian low-pass filter in frequency domain.
References
See also