Description of the issue
Issue 1: Use IDEX instrument spin phase instead of spacecraft spin phase
Problem
idex_l1b.get_spice_data() currently calculates spacecraft spin phase using:
get_spacecraft_spin_phase(query_met_times=met)
The expected quantity is IDEX instrument-frame spin phase
The shared SPICE utility already provides this calculation:
get_instrument_spin_phase(met, SpiceFrame.IMAP_IDEX)
Evidence
- All 13 manually reviewed event times matched L1B records within 0.8 ms.
- CDF phases differed from manually calculated phases by approximately 176°.
- Applying the defined IDEX offset reduced the disagreement to 3.4–4.5° and placed every event in the same 90° bin as the manual calculation.
The remaining few-degree discrepancy should be investigated using identical spin-table, frame-kernel, and spacecraft-clock dependencies.
Recommended changes
- Confirm that the required quantity is IDEX instrument spin phase.
- Use get_instrument_spin_phase(..., SpiceFrame.IMAP_IDEX) in L1B.
- Update L1B and L2B metadata to identify the phase frame explicitly.
- Add regression tests using known event times and expected instrument phases.
Steps to reproduce the issue
No response
Expected vs Actual behavior
No response
Code Snippet (If applicable)
Additional notes, affected areas, and suggested fixes
No response
Description of the issue
Issue 1: Use IDEX instrument spin phase instead of spacecraft spin phase
Problem
idex_l1b.get_spice_data() currently calculates spacecraft spin phase using:
get_spacecraft_spin_phase(query_met_times=met)
The expected quantity is IDEX instrument-frame spin phase
The shared SPICE utility already provides this calculation:
get_instrument_spin_phase(met, SpiceFrame.IMAP_IDEX)
Evidence
The remaining few-degree discrepancy should be investigated using identical spin-table, frame-kernel, and spacecraft-clock dependencies.
Recommended changes
Steps to reproduce the issue
No response
Expected vs Actual behavior
No response
Code Snippet (If applicable)
CodeAdditional notes, affected areas, and suggested fixes
No response