-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Request: LSR conversion ignoring 3D position #10782
Comments
I believe we talked about this general situation early on when adding support for velocities in astropy.coordinates. There are other cases where assuming a distance or assuming values for proper motion components can have confusing or unexpected consequences for the user, so we decided to err on the side of "make the user be explicit about what they want to do" as opposed to special-casing certain transformations where it makes sense to fill the other component values. However, you are probably right that this transformation should be allowed because the component of interest already has velocity units. To get into the details a bit, one barrier to easily enabling this with the current transformation machinery is that we want to be able to tell the cc @mhvk as well |
As @adrn notes, generally the result depends on knowing the distance and proper motion. For LSR, though, the radial velocity and proper motion are essentially decoupled, so indeed there is a case to do them separately. I guess the main question would be what to do with the proper motion that results (which is of course proportional to distance):
I guess the options are:
It also depends a little on how useful the result would be... |
The question I generally ask about LSR is, "What is the velocity of the barycenter wrt the LSR in that direction?" This is a meaningful question, and is more correct than assigning a position to a spectrum - for HI and CO Galactic observations in particular, there is no possible unique coordinate to define along a given line of sight, since a given spectrum contains much cloud (you might say "many clouds", but they're strictly not countable things). The feature request is for the user to be able to ask that question. Solution (1), "Improve the error message", would really be telling the user they are wrong to ask that question, which I do not believe is true. Both options (2) and (3) seem reasonable, but perhaps the real solution is to define a |
@keflavich - thanks, always helps to understand the background! A separate function or method might indeed make most sense - this does seem rather analogous to something like |
Ah, right! A 4th option would be to add a |
This last option is what I expected to exist when I looked at |
Sounds good. Do we need a way to tell that |
Any updates on this? From a user's perspective, it seems "wrong" to have to supply an arbitrary distance and proper motion when converting radial velocities from the heliocentric frame to the LSR frame. Requiring these values indicates to the user that they are somehow used in the conversion, which is not true and creates confusion. |
The following code fails:
with
The workaround is:
which gives the same answer for any combination of parameters except
distance=0
and some weird combinations I tried (1.0 deg / s 1.0 Gpc 29895.66008725245 km / s
).This conversion should not require creating a full 3D coordinate object.
@eteq, @astrofrog, and @adrn, this is the continuation of a conversation we started at last year's astropy meeting. It might have ended up in some other issues, but I didn't find them at a glance. This certainly overlaps w/#10185, but we didn't resolve itt.
The text was updated successfully, but these errors were encountered: