Skip to content

Coordinate conversion utility function #216

@relativistic

Description

@relativistic

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions