Skip to content

Conversation

@subagonsouth
Copy link
Contributor

Change Summary

Overview

Update IMAP frames kernel to version 100 kernel from APL based on gro…und calibration report.

  • Had to update the s/c to instrument spin-offset lookup based on the updated rotations in the kernel.
  • Part of this change required fixing the bug reported in the iALiRT function for transforming MAG vectors.

New Files

  • imap_processing/tests/spice/test_data/imap_100.tf
    • The latest release of the IMAP frames kernel with updated rotations for most instruments.

Updated Files

  • imap_processing/ialirt/l0/ialirt_spice.py
    • During a review of @laspsandoval 's presentation for the Science Team Meeting, I found that this rotation matrix should be inverted to go from the spacecraft frame to the instrument frame b/c the complete transform is composed backward, going from HAE to instrument frame and then inverted (transposed) to get the forward transform.
  • imap_processing/spice/geometry.py
    • Update the hard coded instrument spin-phase offsets.
  • imap_processing/tests/conftest.py
    • Use the version 100 imap frames kernel in testing.
  • imap_processing/tests/glows/test_glows_l1b.py
    • Use the version 100 imap frames kernel in testing.
  • imap_processing/tests/ialirt/unit/test_parse_mag.py
    • Use the version 100 imap frames kernel in testing.
  • imap_processing/tests/mag/test_mag_l1d.py
    • Use the version 100 imap frames kernel in testing.
  • imap_processing/tests/spice/test_geometry.py
    • Updates to force LO to work without LO pivot kernel.
    • New expected fail tests that will function when we get a Lo pivot kernel.
  • imap_processing/tests/spice/test_pointing_frame.py
    • Use the version 100 imap frames kernel in testing.
  • imap_processing/tests/spice/test_spin.py
    • Test using IMAP_LO frame for getting spin phase.
  • imap_processing/tests/ultra/unit/test_ultra_l1b_annotated.py

Closes: #2140

@subagonsouth subagonsouth self-assigned this Sep 22, 2025
@subagonsouth subagonsouth added the SPICE Related to SPICE label Sep 22, 2025
Copy link
Contributor

@maxinelasp maxinelasp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I think probably you should wait for a review from @laspsandoval since the main changes are to her code.

SpiceFrame.IMAP_HI_90: 15 / 360, # (285 + 90) % 360 = 15
SpiceFrame.IMAP_ULTRA_45: 123 / 360, # 33 + 90 = 123
SpiceFrame.IMAP_ULTRA_90: 300 / 360, # 210 + 90 = 300
# Phase offset values based on imap_100.tf frame kernel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a little more detail on how these were generated from the kernel? If I was meant to update these values I would have no clue how to do it.


# Get static mount matrix
mount_matrix = spice.pxform(instrument_frame.name, spacecraft_frame.name, 0.0)
mount_matrix = spice.pxform(instrument_frame.name, spacecraft_frame.name, 0.0).T
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Looks good to me.

Copy link
Contributor

@laspsandoval laspsandoval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good Tim. Thank you.

@subagonsouth subagonsouth merged commit 2669637 into IMAP-Science-Operations-Center:dev Sep 29, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this to Done in IMAP Sep 29, 2025
@subagonsouth subagonsouth deleted the 2140-spice---updates-based-on-new-imap_frames-kernel branch September 29, 2025 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SPICE Related to SPICE

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

SPICE - Updates based on new imap_frames kernel

3 participants