trim_to_valid_data_selection

trim_to_valid_data_selection(calstate: IntervalCalState, vis: str | None = None) dict[str, IntervalTree][source]

Trim an IntervalCalState to the shape of valid (present) data selections.

This is achieved by trimming Intervals for each dimension (antenna, spw, field, intent) to exclude ranges for which no data is present.

See CAS-9415: CalLibrary needs a way to filter out calibration applications for missing data selections

Parameters:
  • calstate -- The calstate to shape.

  • vis -- Name of the calstate to shape. If not defined, shape all.

Returns:

A dictionary mapping name of MS to its trimmed IntervalTree.