-
Notifications
You must be signed in to change notification settings - Fork 22
ENH: Add lo-de-rates data product #2566
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
ENH: Add lo-de-rates data product #2566
Conversation
e26f11c to
9523e00
Compare
|
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
left a comment
There was a problem hiding this 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
| 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
| pivot_angle : float | ||
| The nearest pivot angle for the given epoch. | ||
| """ | ||
| return ds_nhk["pcc_cumulative_cnt_pri"].sel(epoch=epoch, method="nearest").item() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.