imap_processing.codice.utils.process_by_table_id#
- imap_processing.codice.utils.process_by_table_id(unpacked_dataset: Dataset, lut_file: Path, process_fn: Callable[[...], Dataset]) Dataset#
Split dataset by unique table_id values, process each group, and recombine.
This is the shared wrapper logic used by all non-DE/NHK L1A processing functions. It extracts the fields that are uniform across a packet stream (
view_id,apid,plan_id,plan_step), iterates over every uniquetable_idfound in the dataset, filters to that group viaisel, calls process_fn for each group, and finally concatenates the results sorted by epoch.- Parameters:
unpacked_dataset (xarray.Dataset) – Full unpacked dataset from the L0 packet file.
lut_file (pathlib.Path) – Path to the SCI-LUT JSON file passed through to process_fn.
process_fn (Callable) – The private
_process_xxxfunction to call for each table_id group. It must accept the signature(group_ds, lut_file, table_id, view_id, apid, plan_id, plan_step)and return anxr.Dataset.
- Returns:
Combined L1A dataset sorted by epoch.
- Return type: