tobac.utils.general.spectral_filtering#
- tobac.utils.general.spectral_filtering(dxy, field_in, lambda_min, lambda_max, return_transfer_function=False)#
This function creates and applies a 2D transfer function that can be used as a bandpass filter to remove certain wavelengths of an atmospheric input field (e.g. vorticity, IVT, etc).
Parameters:#
- dxyfloat
Grid spacing in m.
- field_in: numpy.array
2D field with input data.
- lambda_min: float
Minimum wavelength in m.
- lambda_max: float
Maximum wavelength in m.
- return_transfer_function: boolean, optional
default: False. If set to True, then the 2D transfer function and the corresponding wavelengths are returned.
Returns:#
- filtered_field: numpy.array
Spectrally filtered 2D field of data (with same shape as input data).
- transfer_function: tuple
Two 2D fields, where the first one corresponds to the wavelengths in the spectral space of the domain and the second one to the 2D transfer function of the bandpass filter. Only returned, if return_transfer_function is True.