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
sunpy.coordinates.transformations._times_are_equal()
should have greater tolerance for similar times
#7266
Comments
@ayshih Any objections to changing |
I appreciate that the rigor is frustrating here, but I'm not a fan of making this change. All of the loopback code – why I think we'd have to approach this in the same vein as the previously discussed context manager for saying that frames are equivalent enough. |
This is private API anyway - is there an example using only public API that motivates this request for a change? |
Doing from_coord.transform_to(to_frame) triggers an observer shift, is the effect on public API. |
And why from a user facing perspective is that an issue? Performance? |
It could also be annoying for off-disk helioprojective coordinates without a screen assumption |
That was the one that got us. |
Would it be feasible to have it as a user-provided argument defaulting to False? Then it would preserve the strict checking in most cases but there would be a workaround for cases like mine where that level of accuracy is unneccessary. |
It can't be "user-provided" because the loopback generation is performed on module import. If we don't approach this with a context manager, the tolerance would need to be developer-defined. This is conceptually fine, because the developer knows which frame is being loopbacked, so can certainly make the per-frame judgement on the tolerance for that frame's attribute. It would take an upstream enhancement of |
Callback function to evaluate if two frames are the same? |
Sure, that'd work. |
Describe the bug
sunpy.coordinates.transformations._times_are_equal()
appears to check if the times are exactly equal. Obviously this is going to be fine in many situations but I have a case where they are the same to within 1e-9. This is being caught as not equal and breaking a coordinate transformation. A tolerance should be introduced here to address this.To Reproduce
System Details
Installation method
pip
The text was updated successfully, but these errors were encountered: