MNT: Change the definition of H/O that goes into a Lo pset#2617
Conversation
imap_processing/lo/l1c/lo_l1c.py
Outdated
| L1B Direct Event dataset with only triple coincidence events. | ||
| """ | ||
| triple_types = ["111111", "111100", "111000"] | ||
| triple_idx = np.where(np.isin(de["coincidence_type"], triple_types))[0] |
There was a problem hiding this comment.
For a while now, I always try to comment that np.nonzero should be used instead of where... That's according to numpy documentation, but where is so ubiquitous that I'm not sure anymore.
There was a problem hiding this comment.
Yeah, I agree with you here. I was mostly copying what was here before and moving it around. Surprisingly the nonzero() doesn't work with xarray arrays and I had to explicitly get the .values() out of it. Maybe there is a better way to use xarray.where or something like that instead even...
imap_processing/lo/l1c/lo_l1c.py
Outdated
| "001101", | ||
| "001000", | ||
| ] | ||
| double_idx = np.where(np.isin(de["coincidence_type"], double_types))[0] |
There was a problem hiding this comment.
Same comment about using np.nonzero()
| h_peak_low = [20, 10, 10] | ||
| h_peak_high = [70, 50, 40] |
There was a problem hiding this comment.
It seems like these may change. Should we write a ticket to put them in an ancillary file?
There was a problem hiding this comment.
Yes, good idea.
subagonsouth
left a comment
There was a problem hiding this comment.
Looks good other than minor nits
Even though something may be identified as an H species, we want to be a little bit more strict in the pointing set H/O counts and require a golden triple with specific ranges for H and O TOFs to identify the species. Refactor out the logic for filtering species into helper functions rather than inlining this more complex logic.
3d54181 to
f86bcee
Compare
3b6f99d
into
IMAP-Science-Operations-Center:dev
Even though something may be identified as an H species, we want to be a little bit more strict in the pointing set H/O counts and require a golden triple with specific ranges for H and O TOFs to identify the species.
Refactor out the logic for filtering species into helper functions rather than inlining this more complex logic.
NOTE: I need to verify the coincidence types and range values with the Lo team still to verify those are what they want in the pointing set. The "species" identifier is still OK to be "H" in the l1b file, this is just more strict for the l1c pset values apparently.
closes #2613