Add IMAP_HRC frame to SpiceFrame enum and update science frames kernel to v1.2.0#2808
Conversation
Co-authored-by: subagonsouth <16110870+subagonsouth@users.noreply.github.com>
Co-authored-by: subagonsouth <16110870+subagonsouth@users.noreply.github.com>
|
@copilot, please remove the old science frames kernel: imap_science_100.tf from the spice test_data directory. |
…/test_data/ Co-authored-by: subagonsouth <16110870+subagonsouth@users.noreply.github.com>
Co-authored-by: subagonsouth <16110870+subagonsouth@users.noreply.github.com>
Done — removed |
|
LGTM! Im not really sure what that new frame is but its not a blocker and ill ask at the next tagup. |
|
@copilot, I suggest modifying that function to try instantiating the SpiceFrame using `f"IMAP_{frame.upper()}" or similar in a try/except block so that the frames don't need to be explicitly mapped in that function. |
…pport Co-authored-by: subagonsouth <16110870+subagonsouth@users.noreply.github.com>
Done in commit 174a0fa. |
It's a frame that's oriented to the center of the IBEX ribbon which we suspect has something to do with an axis of symmetry in the interstellar medium (hand-wavey). |
Got it thanks! |
Adds the new
IMAP_HRC(Heliospheric Ram Corotating) SPICE frame introduced inimap_science_120.tfto theSpiceFrameenum, updates all kernel references from v1.0.0 to v1.2.0, and makes the new frame available to L2 ENA maps.Changes
New kernel
imap_science_120.tf(v1.2.0): replacesimap_science_100.tfin bothtests/spice/test_data/andultra/l1c/sim_spice_kernels/. Adds theIMAP_HRCframe at ID-43930— a TWO-VECTOR parameterized frame with X aligned to the heliospheric ram direction and Z to the solar rotation axis (IAU_SUN), making it distinct fromIMAP_HREwhich uses the ecliptic normal for Z.SpiceFrameenum (spice/geometry.py): addedIMAP_HRC = -43930afterIMAP_GCS.All kernel references updated from
imap_science_100.tf→imap_science_120.tfacross 15 files.ena_maps/utils/naming.py: refactoredget_map_coord_frameto dynamically look upSpiceFrame[f"IMAP_{frame_str.upper()}"]in a try/except block instead of a hardcoded if/elif chain. AnyKeyError(unrecognized frame) is re-raised asNotImplementedError, preserving existing error behavior."hrc"added to_coord_frame_str_types.Test Coverage
test_spice_frame_enumiterates over allSpiceFramemembers and asserts each maps to a valid frame ID in the loaded kernel — this automatically coversIMAP_HRC.test_get_map_frameupdated to assert"hrc"→SpiceFrame.IMAP_HRC.Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.