Skip to content

Use geometric mean for HIT energy bin centers - #3574

Merged
daralynnrhode merged 1 commit into
IMAP-Science-Operations-Center:devfrom
daralynnrhode:hit_mean_energy_arithtogoe
Oct 19, 2026
Merged

daralynnrhode merged 1 commit into
IMAP-Science-Operations-Center:devfrom
daralynnrhode:hit_mean_energy_arithtogoe

Conversation

@daralynnrhode

Copy link
Copy Markdown
Contributor

Changing the Energy Bin Centers to be the Geometric Mean

Overview

The energy mean variables were listed as geometric means in the L1A and L1B CDF attributes, but add_energy_variables() computed the arithmetic midpoint [(min + max) / 2] instead of [sqrt(min * max)].

The values were hardcoded into the original tests, so I just updated them to calculate and check for the geometric mean instead.

closes #3562

File changes

  • imap_processing/tests/hit/test_hit_utils.py
  • imap_processing/hit/hit_utils.py

Testing

  • test_hit_utils.py Updated two tests that expected arithmetic means. No validation data includes energy values.

@daralynnrhode daralynnrhode added this to the October 2026 milestone Oct 19, 2026
@daralynnrhode daralynnrhode self-assigned this Oct 19, 2026
@daralynnrhode daralynnrhode added bug Something isn't working Student Tasks suitable for student work labels Oct 19, 2026

@lacoak21 lacoak21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice job! This looks great.

@daralynnrhode
daralynnrhode merged commit a47f346 into IMAP-Science-Operations-Center:dev Oct 19, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Student Tasks suitable for student work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hit l1a: Update energy bin calculation

2 participants