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

Pointing frame code #759

Merged
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
224fe42
pointing frame code
laspsandoval Aug 20, 2024
c27926b
pointing frame code format
laspsandoval Aug 20, 2024
47ae480
add data
laspsandoval Aug 20, 2024
ff6ce92
format test
laspsandoval Aug 20, 2024
49039f8
env
laspsandoval Aug 20, 2024
c7339b7
code cov update
laspsandoval Aug 20, 2024
1aa2890
code cov update
laspsandoval Aug 20, 2024
804c3ac
code cov update
laspsandoval Aug 20, 2024
6c3f133
update to poetrylock
laspsandoval Aug 20, 2024
93fe87b
pr response
laspsandoval Aug 20, 2024
1f1bb35
change ck
laspsandoval Aug 20, 2024
bdf51e3
pr response
laspsandoval Aug 21, 2024
295e4e8
pr response
laspsandoval Aug 21, 2024
373be7e
pr response
laspsandoval Aug 21, 2024
de2e83a
pr response
laspsandoval Aug 21, 2024
72c0f72
formatting
laspsandoval Aug 21, 2024
fd7971c
response to pr
laspsandoval Aug 21, 2024
b2e8bf0
added new path
laspsandoval Aug 21, 2024
682c5e9
pr resposne
laspsandoval Aug 21, 2024
3353f07
response to pr
laspsandoval Aug 22, 2024
64b0a4c
move to kernels.py
laspsandoval Aug 22, 2024
f208bd8
tests work
laspsandoval Aug 22, 2024
3d38e6f
update test
laspsandoval Aug 22, 2024
579ea27
deleted files
laspsandoval Aug 22, 2024
f2d8319
change docstring
laspsandoval Aug 22, 2024
5a41884
added todo
laspsandoval Aug 22, 2024
42ce81b
added tmp path
laspsandoval Aug 22, 2024
d308c41
add todo;
laspsandoval Aug 22, 2024
bcb2d9c
rename
laspsandoval Aug 26, 2024
aa8feac
pr response
laspsandoval Aug 26, 2024
e36b90f
pr response
laspsandoval Aug 27, 2024
4f4efbe
pr response
laspsandoval Aug 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tests work
laspsandoval committed Aug 22, 2024
commit f208bd894fc7c97c87854b81104561a2b5d3cc52
14 changes: 7 additions & 7 deletions imap_processing/tests/spice/test_kernels.py
Original file line number Diff line number Diff line change
@@ -7,36 +7,36 @@
import spiceypy as spice
from spiceypy.utils.exceptions import SpiceyError

from imap_processing.spice import kernels
from imap_processing.spice.kernels import (
_average_quaternions,
_create_rotation_matrix,
_get_et_times,
create_pointing_frame,
ensure_spice,
)


@kernels.ensure_spice
@ensure_spice
def single_wrap_et2utc(et, fmt, prec):
"""Directly decorate a spice function with ensure_spice for use in tests"""
return spice.et2utc(et, fmt, prec)


@kernels.ensure_spice
@ensure_spice
def double_wrap_et2utc(et, fmt, prec):
"""Decorate a spice function twice with ensure_spice for use in tests. This
simulates some decorated outer functions that call lower level functions
that are already decorated."""
return single_wrap_et2utc(et, fmt, prec)


@kernels.ensure_spice(time_kernels_only=True)
@ensure_spice(time_kernels_only=True)
def single_wrap_et2utc_tk_only(et, fmt, prec):
"""Directly wrap a spice function with optional time_kernels_only set True"""
return spice.et2utc(et, fmt, prec)


@kernels.ensure_spice(time_kernels_only=True)
@ensure_spice(time_kernels_only=True)
def double_wrap_et2utc_tk_only(et, fmt, prec):
"""Decorate a spice function twice with ensure_spice for use in tests. This
simulates some decorated outer functions that call lower level functions
@@ -60,7 +60,7 @@ def test_ensure_spice_emus_mk_path(func, use_test_metakernel):

def test_ensure_spice_time_kernels():
"""Test functionality of ensure spice with timekernels set"""
wrapped = kernels.ensure_spice(spice.et2utc, time_kernels_only=True)
wrapped = ensure_spice(spice.et2utc, time_kernels_only=True)
# TODO: Update/remove this test when a decision has been made about
# whether IMAP will use the time_kernels_only functionality and the
# ensure_spice decorator has been update.
@@ -70,7 +70,7 @@ def test_ensure_spice_time_kernels():

def test_ensure_spice_key_error():
"""Test functionality of ensure spice when all branches fail"""
wrapped = kernels.ensure_spice(spice.et2utc)
wrapped = ensure_spice(spice.et2utc)
# The ensure_spice decorator should raise a SpiceyError when all attempts to
# furnish a set of kernels with sufficient coverage for the spiceypy
# functions that it decorates.