ENH: Add lo-de-rates data product#2566
Merged
greglucas merged 2 commits intoIMAP-Science-Operations-Center:devfrom Jan 23, 2026
Merged
ENH: Add lo-de-rates data product#2566greglucas merged 2 commits intoIMAP-Science-Operations-Center:devfrom
greglucas merged 2 commits intoIMAP-Science-Operations-Center:devfrom
Conversation
greglucas
commented
Jan 20, 2026
e26f11c to
9523e00
Compare
Collaborator
Author
|
Test added, pivot platform added. This is now ready for review. It includes #2601 for the refactor so I don't have to do it twice. |
subagonsouth
approved these changes
Jan 23, 2026
| double_mask = np.isin(coincidence_type, double_types) | ||
|
|
||
| # Vectorized histogramming using np.add.at with full index arrays | ||
| np.add.at(h_counts, (asc_idx[h_mask], esa_step_idx[h_mask], spin_bin[h_mask]), 1) |
| pivot_angle : float | ||
| The nearest pivot angle for the given epoch. | ||
| """ | ||
| return ds_nhk["pcc_cumulative_cnt_pri"].sel(epoch=epoch, method="nearest").item() |
Contributor
There was a problem hiding this comment.
Great use of xarray functionality.
| l1b_nhk = sci_dependencies["imap_lo_l1b_nhk"] | ||
| # Set the asc_start for each DE by removing the average spin cycle | ||
| # which is a function of esa_step | ||
| asc_start = l1b_de["spin_cycle"] - (7 + (l1b_de["esa_step"] - 1) * 2) |
Contributor
There was a problem hiding this comment.
It would be helpful to have a comment explaining this equation.
This turns the DE rates into a histogram product, summing the annotated direct events into histogram bins for comparison with the hist-rates and monitor-rates products.
9523e00 to
b647853
Compare
0b89a2b
into
IMAP-Science-Operations-Center:dev
14 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This turns the DE rates into a histogram product, summing the annotated direct events into histogram bins for comparison with the hist-rates and monitor-rates products.
Opening in draft mode for now because I haven't added any tests and have quite a few TODOs in here. This is to get a product out and have the code associated with it up.