Skip to content

Commit

Permalink
Merge pull request #206 from sot/ska-sun-yaw-sign-change
Browse files Browse the repository at this point in the history
Update find_er_attitude test for yaw sign change in get/apply sun_pit…
  • Loading branch information
taldcroft authored Feb 13, 2024
2 parents 08e6c1e + 2a96ec2 commit dcc777f
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions sparkles/tests/test_find_er_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import numpy as np
import pytest
import Ska.Sun
import ska_sun
from proseco import get_aca_catalog
from proseco.tests.test_common import mod_std_info
from Quaternion import Quat
Expand Down Expand Up @@ -56,9 +56,9 @@ def ACA(KWARGS):

@pytest.fixture
def ATTS(ACA):
DPITCHES, DYAWS = np.ogrid[-0.01:-3.5:4j, -3.1:3:3j]
SUN_RA, SUN_DEC = Ska.Sun.position(ACA.date)
return Ska.Sun.apply_sun_pitch_yaw(
DPITCHES, DYAWS = np.ogrid[-0.01:-3.5:4j, 3.1:-3.0:3j]
SUN_RA, SUN_DEC = ska_sun.position(ACA.date)
return ska_sun.apply_sun_pitch_yaw(
ACA.att, pitch=DPITCHES, yaw=DYAWS, sun_ra=SUN_RA, sun_dec=SUN_DEC
)

Expand Down Expand Up @@ -95,18 +95,18 @@ def test_find_er_catalog_minus_2_pitch_bins(proseco_agasc_1p7, ACA, ATTS):
assert att_opts[TEST_COLS].pformat_all() == [
"dpitch dyaw count_9th count_10th count_all count_ok n_critical att ",
"------ ----- --------- ---------- --------- -------- ---------- -----------------",
" -0.01 -3.10 4.18 6.00 5.65 True 2 7.66 -25.21 29.3",
" -0.01 -0.05 2.00 2.67 2.25 False -- 6.47 -26.05 26.1",
" -0.01 3.00 2.62 7.92 5.26 False -- 5.21 -26.84 22.8",
" -1.17 -3.10 2.00 9.33 5.92 False -- 8.49 -26.10 29.7",
" -1.17 -0.05 0.00 1.23 0.78 False -- 7.25 -26.99 26.4",
" -1.17 3.00 0.75 6.87 4.03 False -- 5.94 -27.81 23.1",
" -2.34 -3.10 1.89 7.77 5.21 False -- 9.33 -26.99 30.1",
" -2.34 -0.05 2.87 8.52 5.97 False -- 8.04 -27.92 26.8",
" -2.34 3.00 8.53 13.90 12.67 True 0 6.67 -28.78 23.5",
" -3.50 -3.10 2.12 10.01 6.66 False -- 10.19 -27.87 30.5",
" -3.50 -0.05 5.60 10.63 8.39 True -- 8.84 -28.84 27.2",
" -3.50 3.00 2.83 8.93 5.47 False -- 7.42 -29.74 23.8",
" -0.01 3.10 4.18 6.00 5.65 True 2 7.66 -25.21 29.3",
" -0.01 0.05 2.00 2.67 2.25 False -- 6.47 -26.05 26.1",
" -0.01 -3.00 2.62 7.92 5.26 False -- 5.21 -26.84 22.8",
" -1.17 3.10 2.00 9.33 5.92 False -- 8.49 -26.10 29.7",
" -1.17 0.05 0.00 1.23 0.78 False -- 7.25 -26.99 26.4",
" -1.17 -3.00 0.75 6.87 4.03 False -- 5.94 -27.81 23.1",
" -2.34 3.10 1.89 7.77 5.21 False -- 9.33 -26.99 30.1",
" -2.34 0.05 2.87 8.52 5.97 False -- 8.04 -27.92 26.8",
" -2.34 -3.00 8.53 13.90 12.67 True 0 6.67 -28.78 23.5",
" -3.50 3.10 2.12 10.01 6.66 False -- 10.19 -27.87 30.5",
" -3.50 0.05 5.60 10.63 8.39 True -- 8.84 -28.84 27.2",
" -3.50 -3.00 2.83 8.93 5.47 False -- 7.42 -29.74 23.8",
]


Expand All @@ -117,18 +117,18 @@ def test_find_er_catalog_minus_2_count_all(proseco_agasc_1p7, ACA, ATTS):
assert att_opts[TEST_COLS].pformat_all() == [
"dpitch dyaw count_9th count_10th count_all count_ok n_critical att ",
"------ ----- --------- ---------- --------- -------- ---------- -----------------",
" -0.01 -3.10 4.18 6.00 5.65 True -- 7.66 -25.21 29.3",
" -0.01 -0.05 2.00 2.67 2.25 False -- 6.47 -26.05 26.1",
" -0.01 3.00 2.62 7.92 5.26 False -- 5.21 -26.84 22.8",
" -1.17 -3.10 2.00 9.33 5.92 False -- 8.49 -26.10 29.7",
" -1.17 -0.05 0.00 1.23 0.78 False -- 7.25 -26.99 26.4",
" -1.17 3.00 0.75 6.87 4.03 False -- 5.94 -27.81 23.1",
" -2.34 -3.10 1.89 7.77 5.21 False -- 9.33 -26.99 30.1",
" -2.34 -0.05 2.87 8.52 5.97 False -- 8.04 -27.92 26.8",
" -2.34 3.00 8.53 13.90 12.67 True 0 6.67 -28.78 23.5",
" -3.50 -3.10 2.12 10.01 6.66 False -- 10.19 -27.87 30.5",
" -3.50 -0.05 5.60 10.63 8.39 True -- 8.84 -28.84 27.2",
" -3.50 3.00 2.83 8.93 5.47 False -- 7.42 -29.74 23.8",
" -0.01 3.10 4.18 6.00 5.65 True -- 7.66 -25.21 29.3",
" -0.01 0.05 2.00 2.67 2.25 False -- 6.47 -26.05 26.1",
" -0.01 -3.00 2.62 7.92 5.26 False -- 5.21 -26.84 22.8",
" -1.17 3.10 2.00 9.33 5.92 False -- 8.49 -26.10 29.7",
" -1.17 0.05 0.00 1.23 0.78 False -- 7.25 -26.99 26.4",
" -1.17 -3.00 0.75 6.87 4.03 False -- 5.94 -27.81 23.1",
" -2.34 3.10 1.89 7.77 5.21 False -- 9.33 -26.99 30.1",
" -2.34 0.05 2.87 8.52 5.97 False -- 8.04 -27.92 26.8",
" -2.34 -3.00 8.53 13.90 12.67 True 0 6.67 -28.78 23.5",
" -3.50 3.10 2.12 10.01 6.66 False -- 10.19 -27.87 30.5",
" -3.50 0.05 5.60 10.63 8.39 True -- 8.84 -28.84 27.2",
" -3.50 -3.00 2.83 8.93 5.47 False -- 7.42 -29.74 23.8",
]


Expand All @@ -139,18 +139,18 @@ def test_find_er_catalog_minus_2_input_order(proseco_agasc_1p7, ACA, ATTS):
assert att_opts[TEST_COLS].pformat_all() == [
"dpitch dyaw count_9th count_10th count_all count_ok n_critical att ",
"------ ----- --------- ---------- --------- -------- ---------- -----------------",
" -0.01 -3.10 4.18 6.00 5.65 True 2 7.66 -25.21 29.3",
" -0.01 -0.05 2.00 2.67 2.25 False -- 6.47 -26.05 26.1",
" -0.01 3.00 2.62 7.92 5.26 False -- 5.21 -26.84 22.8",
" -1.17 -3.10 2.00 9.33 5.92 False -- 8.49 -26.10 29.7",
" -1.17 -0.05 0.00 1.23 0.78 False -- 7.25 -26.99 26.4",
" -1.17 3.00 0.75 6.87 4.03 False -- 5.94 -27.81 23.1",
" -2.34 -3.10 1.89 7.77 5.21 False -- 9.33 -26.99 30.1",
" -2.34 -0.05 2.87 8.52 5.97 False -- 8.04 -27.92 26.8",
" -2.34 3.00 8.53 13.90 12.67 True 0 6.67 -28.78 23.5",
" -3.50 -3.10 2.12 10.01 6.66 False -- 10.19 -27.87 30.5",
" -3.50 -0.05 5.60 10.63 8.39 True -- 8.84 -28.84 27.2",
" -3.50 3.00 2.83 8.93 5.47 False -- 7.42 -29.74 23.8",
" -0.01 3.10 4.18 6.00 5.65 True 2 7.66 -25.21 29.3",
" -0.01 0.05 2.00 2.67 2.25 False -- 6.47 -26.05 26.1",
" -0.01 -3.00 2.62 7.92 5.26 False -- 5.21 -26.84 22.8",
" -1.17 3.10 2.00 9.33 5.92 False -- 8.49 -26.10 29.7",
" -1.17 0.05 0.00 1.23 0.78 False -- 7.25 -26.99 26.4",
" -1.17 -3.00 0.75 6.87 4.03 False -- 5.94 -27.81 23.1",
" -2.34 3.10 1.89 7.77 5.21 False -- 9.33 -26.99 30.1",
" -2.34 0.05 2.87 8.52 5.97 False -- 8.04 -27.92 26.8",
" -2.34 -3.00 8.53 13.90 12.67 True 0 6.67 -28.78 23.5",
" -3.50 3.10 2.12 10.01 6.66 False -- 10.19 -27.87 30.5",
" -3.50 0.05 5.60 10.63 8.39 True -- 8.84 -28.84 27.2",
" -3.50 -3.00 2.83 8.93 5.47 False -- 7.42 -29.74 23.8",
]


Expand Down

0 comments on commit dcc777f

Please sign in to comment.