Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about analysis methods #260

Open
bendudson opened this issue Dec 2, 2022 · 1 comment
Open

Question about analysis methods #260

bendudson opened this issue Dec 2, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@bendudson
Copy link
Contributor

I'd like to add a cross-phase diagnostic, to plot the phase difference between two variables as a function of position and frequency. Should this be implemented as a standalone function or as a data array method?

i.e. if ds is a dataset:

result = crossphase(ds['Ne'], ds['phi'])

or

result = ds['Ne'].crossphase(ds['phi'])

?

@TomNicholas
Copy link
Collaborator

Should this be implemented as a standalone function or as a data array method?

The difference is only semantic. But the syntax for the second approach would have to be something like

result = ds['Ne'].xbout.crossphase(ds['phi'])

as xarray accessors add methods under a separated namespace.

You should check if this crossphase function in xrft suits your needs first though. You could also wrap that in xbout.

@TomNicholas TomNicholas added the enhancement New feature or request label Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants