You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FYI, this is not explicitly addressed in the APE5 API. But my current thinking is that for low-level classes, equality means must be the same frame, all meatdata and data the same. For high-level classes it's a bit more ambiguous, but that can be addressed later. So this issue will be a reminder to get that figured out.
@taldcroft - That's right - I thought we concluded this is the safest for coordinates, given that it's ambiguous what is actually meant? It may be that's what I decided, and we didn't really talk about it, though... my memory is a bit hazy.
I thought we were going with "equal if all data and attributes are equal" as a safe option for low-level. I do think that c2 = copy(c1); assert c1 == c2 should work for 0.4.
What about having a coordinates.allclose method that transforms c1 into the c2 frame and checks that the sky separations are all less than a separation tolerance (angle) and the distances are the same within some rtol and atol (distance).
It seems this issue has become two: (1) there should be a way to test for strict equality; (2) there should be a way to test coordinates are close. I think the former should indeed exist but in practice is not very useful, while the latter will take quite a bit of work to get it really right. So, I suggest relabeling this issue to 0.4.1 to deal with equality only, and raise another for 1.0 for dealing with allclose.
p.s. Sorry, in case it wasn't clear from other issues: the goal is to get the list of 0.4 issues and PRs small, so that the overdue release can happen.
Activity
eteq commentedon Mar 25, 2014
FYI, this is not explicitly addressed in the APE5 API. But my current thinking is that for low-level classes, equality means must be the same frame, all meatdata and data the same. For high-level classes it's a bit more ambiguous, but that can be addressed later. So this issue will be a reminder to get that figured out.
eteq commentedon May 27, 2014
@taldcroft - do you consider this closed by APE5, or should we push it to 1.0 and consider changing the equality operation then?
taldcroft commentedon May 27, 2014
@eteq - from what I can tell equality comparison has gone to the other extreme of just not being implemented. Am I missing something??
eteq commentedon May 30, 2014
@taldcroft - That's right - I thought we concluded this is the safest for coordinates, given that it's ambiguous what is actually meant? It may be that's what I decided, and we didn't really talk about it, though... my memory is a bit hazy.
taldcroft commentedon May 31, 2014
I thought we were going with "equal if all data and attributes are equal" as a safe option for low-level. I do think that
c2 = copy(c1); assert c1 == c2should work for 0.4.What about having a
coordinates.allclosemethod that transformsc1into thec2frame and checks that the sky separations are all less than a separation tolerance (angle) and the distances are the same within somertolandatol(distance).mhvk commentedon Jun 17, 2014
It seems this issue has become two: (1) there should be a way to test for strict equality; (2) there should be a way to test coordinates are close. I think the former should indeed exist but in practice is not very useful, while the latter will take quite a bit of work to get it really right. So, I suggest relabeling this issue to 0.4.1 to deal with equality only, and raise another for 1.0 for dealing with
allclose.mhvk commentedon Jun 17, 2014
p.s. Sorry, in case it wasn't clear from other issues: the goal is to get the list of 0.4 issues and PRs small, so that the overdue release can happen.
astrofrog commentedon Jun 22, 2014
@mhvk - done. This is now 0.4.1 and I opened a feature request for
allclosefor 1.0 (#2650)embray commentedon Dec 2, 2014
Is this still something that needs to be resolved?
bsipocz commentedon Jul 31, 2017
The original snippet is not working any more, and
so I wonder whether this can be closed now?
adrn commentedon Sep 19, 2017
I'm closing this because it is a duplicate of #3182 and I think the discussion there is more relevant now.