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

VectorField does not reproject angle #295

Closed
poplarShift opened this issue Feb 9, 2019 · 5 comments · Fixed by #296
Closed

VectorField does not reproject angle #295

poplarShift opened this issue Feb 9, 2019 · 5 comments · Fixed by #296

Comments

@poplarShift
Copy link

Same data, two different projections (PlateCarree and NorthPolarStereo). Note how the arrows are the same, just their locations changes. The obvious fix is to reproject before calculating magnitude and angle but it might be nice to mention this in the documentation.

Cartopy on the other hand (further below) seems to do this (using quiver), so it might be easy to implement (then, however, using East/North velocities instead of magnitude/angle:

platecarree

npstereographic

cartopy1

cartopy2

@philippjfr
Copy link
Member

I'll consider this as a bug, this should definitely be handled.

@philippjfr
Copy link
Member

I've had a quick go at implementing a VectorField project operation that takes into account the angle in #296. Do you think you could give that a try?

@poplarShift
Copy link
Author

poplarShift commented Feb 10, 2019

Great! I've checked it out, see my small changes.

On a slightly more general note, I must admit I am not super happy with using magnitude and angle instead of u,v for the VectorField plot. First, oceanographers/meteorologists and probably many other fields often use compass direction as angle (i.e., 0 degrees is North, 90 degrees is East), easily leading to confusion about what the angle is in a geographic context, and second, General Circulation Models usually return east/north velocity. Instruments may return angle/magnitude, but again, there are different conventions (for meteorologists, wind direction is where it is coming from, for oceanographers, current direction is where the flow goes).

@philippjfr
Copy link
Member

On a slightly more general note, I must admit I am not super happy with using magnitude and angle instead of u,v for the VectorField plot.

Absolutely agree with this, I think we should open an issue in HoloViews that either adds a mode to VectorField to switch between mag/angle and u/v or add an entirely separate element that accepts u,v components.

@oarcher
Copy link

oarcher commented Dec 26, 2021

oceanographers/meteorologists and probably many other fields often use compass direction as angle (i.e., 0 degrees is North, 90 degrees is East)

At least, it would be a good thing that vectorfield accept a keyword like deg=True or deg_north=True.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants