imap_processing.hi.utils.compute_qualified_event_mask#

imap_processing.hi.utils.compute_qualified_event_mask(de_ds: Dataset, cal_product_config: DataFrame, esa_energy_steps: ndarray[tuple[int, ...], dtype[int64]]) ndarray[tuple[int, ...], dtype[bool]]#

Compute mask of events qualifying for ANY calibration product.

An event qualifies if it passes BOTH coincidence_type AND TOF window checks for ANY (calibration_prod, esa_energy_step) combination in the configuration.

Parameters:
  • de_ds (xarray.Dataset) – Direct Event dataset with coincidence_type and TOF variables. TOF variables must have FILLVAL attribute for fill value handling.

  • cal_product_config (pandas.DataFrame) – Config DataFrame with multi-index (calibration_prod, esa_energy_step). Must have coincidence_type_values column and TOF window columns.

  • esa_energy_steps (np.ndarray) – ESA energy step for each event in de_ds.

Returns:

qualified_mask – Boolean mask - True if event qualifies for at least one cal product.

Return type:

np.ndarray