imap_processing.hi.hi_l1c.get_tof_window_mask#

imap_processing.hi.hi_l1c.get_tof_window_mask(de_ds: Dataset, prod_config_row: NamedTuple, fill_vals: dict) ndarray[tuple[int, ...], dtype[bool]]#

Generate a mask indicating which DEs to keep based on TOF windows.

Parameters:
  • de_ds (xarray.Dataset) – The Direct Event Dataset for the DEs to filter based on the TOF windows.

  • prod_config_row (NamedTuple) – A single row of the prod config dataframe represented as a named tuple.

  • fill_vals (dict) – A dictionary containing the fill values used in the input DE TOF dataframe values. This value should be derived from the L1B DE CDF TOF variable attributes.

Returns:

window_mask – A mask with one entry per DE in the input de_df indicating which DEs contain TOF values within the windows specified by prod_config_row. The mask is intended to directly filter the DE dataframe.

Return type:

np.ndarray