Skip to content

Commit

Permalink
Merge pull request #35 from sot/fix-regression-test-again-#34
Browse files Browse the repository at this point in the history
Constrain `test_ra_dec_roll` regression test to a specific date
  • Loading branch information
taldcroft authored Sep 14, 2024
2 parents a364d50 + 9506220 commit 0b22b6b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion find_attitude/tests/test_find_attitude.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,15 @@ def test_ra_dec_roll(
sigma_1axis=0.4,
sigma_mag=0.2,
):
"""Regression test at a specific attitude and date"""
global stars, agasc_id_star_maps, g_geom_match, g_dist_match, solutions
stars = get_stars(
ra, dec, roll, sigma_1axis=sigma_1axis, sigma_mag=sigma_mag, brightest=brightest
)
solutions = find_attitude_solutions(stars, tolerance=2.5)
# Enforce the date constraint and remove the default off_nom_roll constraint.
constraints = Constraints(date="2024-08-28", off_nom_roll_max=None)

solutions = find_attitude_solutions(stars, tolerance=2.5, constraints=constraints)
check_output(solutions, stars, ra, dec, roll)
summary = solutions[0]["summary"]
assert summary.pformat_all() == [
Expand Down

0 comments on commit 0b22b6b

Please sign in to comment.