get_matching_calstate¶
- get_matching_calstate(context: launcher.Context, calstate: IntervalCalState, predicate_fn: Callable[[CalToArgs, CalFrom], bool]) IntervalCalState[source]¶
Return an IntervalCalState contain calibrations in the input IntervalCalState that match the predicate function.
The use case for this function is to identify calibrations matching a pattern so that those calibrations can be deleted or modified. For instance, matching registered bandpass caltables so they can be removed from the active CalState.
- Parameters:
context -- Pipeline context (required to create IntervalCalState).
calstate -- Calibration state to inspect.
predicate_fn -- Matching function that returns True when the selection is to be added to the output IntervalCalState.
- Returns:
IntervalCalState containing the calibrations from the input IntervalCalState that match the given predicate function.