ess.reduce.live.roi.apply_selection#
- ess.reduce.live.roi.apply_selection(data, *, selection, norm=1.0, spatial_dims=None)[source]#
Apply selection to data.
- Parameters:
selection (
Variable) – Variable with indices to select.norm (
float, default:1.0) – Normalization factor to apply to the selected data. This is used for cases where indices may be selected multiple times.spatial_dims (
tuple[str,...] |None, default:None) – Dimensions to flatten into ‘detector_number’. If None, all dims are flattened. For dense data like (time, x, y), pass (‘x’, ‘y’) to preserve time.
- Returns:
tuple[TypeVar(T,DataArray,Variable),Variable] – Filtered data and scale factor.