Skip to content

Commit

Permalink
code cov update
Browse files Browse the repository at this point in the history
  • Loading branch information
laspsandoval committed Aug 20, 2024
1 parent c7339b7 commit 1aa2890
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions imap_processing/pointing_frame_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,10 @@ def average_quaternions(et_times: np.ndarray) -> tuple[np.ndarray, list[np.ndarr
z_eclip_time.append(body_rots[:, 2])

# Standardize the quaternion so that they may be compared.
if body_quat[0] < 0:
body_quat = -body_quat
body_quat = body_quat * np.sign(body_quat[0])

# Aggregate quaternions into a single matrix.
aggregate += np.outer(body_quat, body_quat)
aggregate += np.outer(np.abs(body_quat), body_quat)

# Reference: "On Averaging Rotations"
# Link: https://link.springer.com/content/pdf/10.1023/A:1011129215388.pdf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def et_times(create_kernel_list):
return et_times


@pytest.mark.xfail(reason="Will fail unless kernels in pointing_frame/test_data.")
def test_create_rotation_matrix(et_times, kernel_path):
"""Tests create_rotation_matrix function."""

Expand All @@ -86,7 +87,7 @@ def test_create_rotation_matrix(et_times, kernel_path):
np.testing.assert_allclose(rotation_matrix, rotation_matrix_expected, atol=1e-4)


# @pytest.mark.xfail(reason="Will fail unless kernels in pointing_frame/test_data.")
@pytest.mark.xfail(reason="Will fail unless kernels in pointing_frame/test_data.")
def test_create_pointing_frame(monkeypatch, kernel_path, create_kernel_list):
"""Tests create_pointing_frame function."""
monkeypatch.setenv("EFS_MOUNT_PATH", str(kernel_path))
Expand All @@ -112,7 +113,7 @@ def test_create_pointing_frame(monkeypatch, kernel_path, create_kernel_list):
np.testing.assert_allclose(rotation_matrix_1, rotation_matrix_expected, atol=1e-4)


# @pytest.mark.xfail(reason="Will fail unless kernels in pointing_frame/test_data.")
@pytest.mark.xfail(reason="Will fail unless kernels in pointing_frame/test_data.")
def test_z_axis(create_kernel_list):
"""Tests Inertial z axis and provides visualization."""
kernels, ck_kernel = create_kernel_list
Expand Down

0 comments on commit 1aa2890

Please sign in to comment.