get_calstate_shape¶
- get_calstate_shape(ms: MeasurementSet)[source]¶
Get an IntervalTree shaped to the dimensions of the given measurement set.
This function calculates the size of each metadata dimension (spw; intent; field; antenna), creating and returning an IntervalTree shaped to match. The output of this function is used to trim a calibration applied globally in one or more dimensions to a valid data selection.
Output from this function is cached as it can take several seconds to calculate the result, which is done repeatedly when importing a calstate containing many entries.
Note: this assumes that shape of an MS never changes, which should be true; the number of spws, fields, ants, etc. never changes.
- Parameters:
ms -- The MeasurementSet to analyse.
- Returns:
IntervalTree shaped to match valid data dimensions.