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

Handle catalogs with very few stars #124

Open
jeanconn opened this issue Jul 26, 2019 · 1 comment
Open

Handle catalogs with very few stars #124

jeanconn opened this issue Jul 26, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@jeanconn
Copy link
Contributor

It looks like sparkles will throw an unhandled exception on P2 for a one-star catalog

    661 
    662             # Probability of 2 or fewer stars => conservative fail criteria
--> 663             p2 = p_n_cum[2]
    664 
    665             if verbose:

IndexError: index 2 is out of bounds for axis 0 with size 2

and the geometry check fails if we don't have more than 2 guide stars

    774         min_dist = 500
    775         min_dist2 = min_dist ** 2
--> 776         for idxs in combinations(guide_idxs, n_guide - 2):
    777             for idx0, idx1 in combinations(idxs, 2):
    778                 # If any distance in this combination exceeds min_dist then

ValueError: r must be non-negative

These are basically fine to not handle in operational use with ORViewer (if the catalogs are that bad, an error and no catalog is probably fine) but I think we should just throw appropriate critical warnings and complete the review in these cases.

I can also try to handle these specific errors in yoshi (where this is coming up) but that seems the wrong place.

@jeanconn jeanconn added the bug Something isn't working label Jul 26, 2019
@jeanconn
Copy link
Contributor Author

Oops, my mistake, the first error is a proseco issue not a sparkles one.

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

1 participant