Skip to content
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

calc_error_radius is an overly complex and unnecessary calculation #790

Open
ddobie opened this issue Nov 22, 2024 · 1 comment
Open

calc_error_radius is an overly complex and unnecessary calculation #790

ddobie opened this issue Nov 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ddobie
Copy link
Contributor

ddobie commented Nov 22, 2024

def calc_error_radius(ra, ra_err, dec, dec_err) -> float:

From a discussion with @mauch: The function seems to be doing calculations that make sense if your uncertainties are in image coordinates, not celestial. The numbers it produces are not correct for celestial coordinates in general. The correct calculation should be much simpler - just take the max of the ra and dec errors

@ddobie ddobie added the bug Something isn't working label Nov 22, 2024
@mauch
Copy link
Contributor

mauch commented Nov 22, 2024

Actually, upon further thought after our discussion - I realised the equivalent calculation would be to take sqrt(ra_err^2 + dec_err^2) since the calc_error_radius function is computing the vertices of a box surrounding the error ellipse rather than the edges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants