-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add pitch, attitude constraints and 2- and 3-star solutions #31
Conversation
410ce78
to
c8891ec
Compare
07a9307
to
46db7b3
Compare
Does "coming up with a solution" to 2-star inputs count as an interface change? I only mention in that we probably want to update the web app to have some reasonable warning on that. |
I would say the web app won't support 2-star inputs. I'm somewhat leaning to having the web app continue to only support the no-constraints interface. Instead we would just run a template jupyter notebook that makes it easy to provide the inputs and evaluate the results. |
Looks like the find_attitude code and the demo/test notebook use a dev ska_helpers that doesn't appear to have been checked in. |
I have updated the description. |
The description should also be updated to note that this requires the new distances file with the healpix index, so that's a post-promotion install activity. |
And as an enhancement request - I think catalog mags for the solution stars should be in the solution "summary" to save the user doing that lookup. Naively it also seems like that could get rolled into some kind of goodness-of-solution metric, but I didn't think about that too much except wonder about it in passing. |
find_attitude/constraints.py
Outdated
Maximum off-nominal roll angle in degrees (default=2.0). | ||
min_stars : int or None | ||
Minimum number of stars required for a valid solution. Default is None, meaning | ||
the minimum number of stars is determined from the constraints. Key use case for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding "Default is None, meaning the minimum number of stars is determined from the constraints." - I don't understand what this means. This is the constraint so how is the minimum number of stars determined from the constraints?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest a reference to see get_min_stars() .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. My only non-required comments are docs improvements. As noted it would be good to reference get_min_stars in the Constraints min_stars area. It would also be helpful to mention someplace for our future selves that the distance pairs file has one fixed epoch, so the date of the constraint doesn't change that, but the constraint date is used in the other attitude constraints (pitch, roll) and for the reporting of the residuals on the stars pairs that were pulled out as being the closest ones. And given how easy it is to make a new-epoch distances.h5 file (even if it doesn't make much difference), perhaps that update should be something that just gets done on a regular basis.
Thanks for the review, I'll address your doc requests. |
Description
This adds a new
Constraint
object that allows specifying constraints on the selected star pairs and attitude solutions.3-star solutions
Previously the code required at least 4 stars because it was searching the entire sky. Now with at least a pitch constraint (to within +1.5 deg of the estimated pitch), one can reliably get a good attitude with only 3 stars. This pitch constraint reduces the star pairs by at least a factor of 10.
If there is a reliable estimated attitude this constrains the search space even more (by over a factor of 100).
2-stars solutions
With these constraints, it is now possible to generate an attitude solution with as few as two stars, but from testing we find that this is not reliable enough for operational use (e.g. updating the on-board attitude and maneuvering).
Requires
Interface impacts
The
find_attitude_solutions()
API is backward compatible.If no constraint is provided, that falls back to the legacy behavior of doing an all-sky search with no constraints. This option is not generally recommended going forward since in real operations we almost always know at least the pitch and expect that the spacecraft is sun-pointed (off-nominal roll close to zero).
If a constraint is provided then this requires a distances HDF5 file created with this PR that includes the HEALpix indices.
Post-install action
Create a new
distances_1p8.h5
file (if not already available - needs to be made with the code from this PR that includes b2c4e54).Testing
Unit tests
Independent check of unit tests by Jean
Functional tests
New notebook
test-find-attitude.ipynb
does significant functional testing.