Repository navigation
Conversation
|
Responding to a comment from @mhvk from #4209:
In the current implementation, it's the "approximate" answer. I think this is good, because sometimes people actually want the dra_cos(dec) answer because that's a convention *and_ is quite a bit faster. Once #4339 is implemented, we should definitely make it clear in the |
|
The other similar methods are If you think about finding methods by tab completion and finding methods by doing |
|
@eteq - am OK with having just the simple version here. Do agree with @taldcroft on the name, and that there should be no warning. |
My thinking here is that this is subtly different from both I see the point about |
|
@eteq - I would say that position angle being off by 180 degrees is just as wrong as being off by the sign for the offset. Position angle has a unique definition [1] and when combined with separation can unambiguously reproduce the offset from source 1 to source 2. [1] Not necessarily in all of astronomy, but within astropy. |
|
@eteq - I think on balance I prefer it without the As for the name, I think I'd actually prefer |
|
I'd be OK with I restarted the failing Travis build and it again died hard after less than a minute with some configuration problem. |
|
|
||
| .. math:: | ||
|
|
||
| \Delta {\rm Dec} = \delta_2 - \delta_1 |
There was a problem hiding this comment.
Use the more general Lon / Lat here in the docstring instead of RA / DEC?
It's perfectly OK to compute this spherical offset in a GLON / GLAT or ALT / AZ frame, right?
|
I'm uneasy adding approximate offset methods because they fail badly near poles or for large offsets. Offsets based on great circles work well everywhere, and have a very natural interpretation based on change in longitude and latitude (e.g. RA and Dec): distance along the arc of a great circle = sqrt(dlong^2 + dlat^2), orientation of arc at starting point relative to the direction of increasing longitude = atan2(dlat, dlong). This gives the right answer for points on an image, even if the image is taken very near the pole (and if the long/lat axes align with image x/y, the deltas are simply pixels with appropriate scaling). |
|
@cdeil - yes this is independent, but, as @r-owen points out, it may be we don't want to actually do this given - probably we want an interface that looks like this PR for convenience, but the implementation should perhaps be more accurate. There were initially two main reasons for this function:
1 is now irrelevant, and 2 I think I've been persuaded it shouldn't be the default. The question is: should we still have an option to get the bad approximation to address use case 2? Something like |
|
I'd much prefer not to give the option of bad approximations, at least in the absence of a concrete reason why it is important (telescopes/finding charts arguably not being one: if they're that bad, the correct answer will almost certainly be a good enough approximation to the bad one!). In this particular case, I also feel that the bad approximation is so simple that we can simply leave it for the user to code if s/he really needs it. p.s. You may recall we had a long discussion about angular separation, where we considered giving the option of less accurate but faster methods, but ended up with deciding just to include the good one only. |
This implements the coordinate offset method described as the first step of #4209 .
cc @PBarmby @smaret @richardgmcmahon @mhvk @taldcroft as interested parties from #4209