I'd like a function that gives you the "freq" version of a given xarray coordinate. Essentially the xrft equivalent of np.fftfreq.
So something like this:
freq_x = xrft.fftfreq(data.coords['x'])
I'd want the return to be identical to xrft.fft(data, dim='x').coords['freq_x']
Currently my workaround is to do something this:
freq_x = xrft.fft(data.coords['x']).coords['freq_x']
But this seems wasteful as I don't actually want to take the Fourier transform of the coordinate.
Is there an existing way to do this? If not, would this be a reasonable feature to add?
I'd like a function that gives you the "freq" version of a given xarray coordinate. Essentially the xrft equivalent of np.fftfreq.
So something like this:
I'd want the return to be identical to
xrft.fft(data, dim='x').coords['freq_x']Currently my workaround is to do something this:
But this seems wasteful as I don't actually want to take the Fourier transform of the coordinate.
Is there an existing way to do this? If not, would this be a reasonable feature to add?