>>> import numpy, xarray, xrft
>>> Nx = 16
>>> da = xarray.DataArray(numpy.random.rand(Nx), coords=[numpy.linspace(0, 1.0, Nx)], dims=["x"])
>>> xrft.fft(da, real_dim="x", window='shrubbery')
Traceback (most recent call last):
File "<python-input-3>", line 1, in <module>
xrft.fft(da, real_dim="x", window='shrubbery')
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\xrft\xrft\xrft.py", line 433, in fft
_, da = _apply_window(da, dim, window_type=window)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\xrft\xrft\xrft.py", line 73, in _apply_window
raise NotImplementedError(
"Window type {window_type} not supported. Please adhere to scipy.signal.windows for naming convention."
)
NotImplementedError: Window type {window_type} not supported. Please adhere to scipy.signal.windows for naming convention.
The following session (with abbreviated paths) shows the issue:
The exception message should contain the window name ("shrubbery" above) instead of the replacement field (
{window_type}).