-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Velocities in spherical coordinates #11402
Comments
Welcome to Astropy 👋 and thank you for your first issue! A project member will respond to you as soon as possible; in the meantime, please double-check the guidelines for submitting issues and make sure you've provided the requested details. If you feel that this issue has not been responded to in a timely manner, please leave a comment mentioning our software support engineer @embray, or send a message directly to the development mailing list. If the issue is urgent or sensitive in nature (e.g., a security vulnerability) please send an e-mail directly to the private e-mail [email protected]. |
You need to specify the (cgs.differentials['s'].d_lon * dist * u.kpc).to(u.km/u.s, equivalencies=u.dimensionless_angles()) |
Yes, for an immediate solution, I use what @ayshih suggests. But it has been a longstanding issue for me that non-cartesian representations don't provide access to velocities in velocity units when possible (similar issues for |
@ayshih @adrn Thanks for the help. Unfortunately I don't think I know enough to give any meaningful input about how to solve that in a nice way. Follow-up question: is there anything like this (https://docs.astropy.org/en/stable/coordinates/galactocentric.html) explaining the math for the velocity coordinate transform? I tried looking at this (https://github.com/astropy/astropy/blob/master/astropy/coordinates/builtin_frames/galactocentric.py) but didn't find anything there. Thanks. |
About a solution for this: we already have a astropy/astropy/coordinates/representation.py Lines 1856 to 1862 in 7811614
|
Coming back to this because of velocity conversion headaches the students are facing at our Galactic Dynamics summer school — we should really just implement your proposed solution @mhvk (and same for |
Sounds good! Mostly just needs agreement on the name! Also for the attributes: |
It could also be nice to have a shorthand, like |
Hi, I'm converting some positions and velocities from ICRS to Galactocentric, and then turning that into a spherical representation. The velocities are given as angular velocities, which is a little strange since I would have expected them in km/s.
How can I get these in km/s? For
d_distance
I can dobut for
d_lon
andd_lat
I can't do the conversion, even when I multiply by the distance:gives the following error:
Thanks.
The text was updated successfully, but these errors were encountered: