consolidate_calibrations

consolidate_calibrations(all_my_calapps)[source]

Consolidate a list of (CalTo, [CalFrom..]) 2-tuples into a smaller set of equivalent applications by consolidating their data selection arguments.

This function works by merging the data selections of CalTo objects that have the same calibration application, as determined by the values and data selection present in the CalFroms.

Parameters:

calapps -- an iterable of (CalTo, [CalFrom..]) 2-tuples

Returns:

a list of (CalTo, [CalFrom..]) tuples