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

Add placeholder function for converting from esa_step to esa_energy_step #1146

Conversation

subagonsouth
Copy link
Contributor

Change Summary

Overview

Added a placeholder function for where the algorithm for computing esa_energy_step. The function will eventually be updated to use the L1B housekeeping to correctly populate the data. See ticket #779

Updated Files

  • imap_processing/hi/l1b/hi_l1b.py
    • Update the annotate direct events algorithm to call the new placeholder function
    • Add placeholder function for populating esa_energy_step. For now, copy the esa_step value.
  • imap_processing/tests/hi/test_hi_l1b.py
    • Add test coverage for new placeholder function

closes: #1145

@subagonsouth subagonsouth added the Ins: Hi Related to the IMAP-Hi instrument label Nov 13, 2024
@subagonsouth subagonsouth self-assigned this Nov 13, 2024
@subagonsouth subagonsouth requested review from a team, bourque, sdhoyt and tech3371 and removed request for a team November 13, 2024 00:14
Copy link
Collaborator

@bourque bourque left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -341,3 +341,32 @@ def compute_hae_coordinates(dataset: xr.Dataset) -> dict[str, xr.DataArray]:
new_vars["hae_longitude"].values = pointing_coordinates[:, 1]

return new_vars


def de_esa_energy_step(dataset: xr.Dataset) -> dict[str, xr.DataArray]:
Copy link
Contributor

Choose a reason for hiding this comment

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

Just clarification question. Is this function to figure out ESA voltages of input energy steps?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not quite. The esa_step in telemetry references an index in the sweep table that was used. The sweep table determines the voltages that the ESA inner and outer are set to and thus the energy bandpass of what particles get through. I don't quite understand all of the details of the algorithm that will be implemented in this function yet. But it will use the housekeeping data to look at voltages and then maybe map those voltages to an energy step. This ticket has some additional detail: #779

Copy link
Contributor

@tech3371 tech3371 left a comment

Choose a reason for hiding this comment

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

LGTM

@subagonsouth subagonsouth merged commit 1e06973 into IMAP-Science-Operations-Center:dev Nov 19, 2024
17 checks passed
@subagonsouth subagonsouth deleted the 1145-hi-l1b-placeholder-function-for-esa_step-esa_energy_step branch November 19, 2024 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ins: Hi Related to the IMAP-Hi instrument
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Hi L1B - Placeholder function for esa_step -> esa_energy_step
3 participants