Skip to content

add a feature of budget swapping to help create and test IFO variants

Lee McCuller requested to merge lee-mcculler/pygwinc:budget-swapping into master

This requires !166 (merged) first,

This MR adds a new attribute, swap = {OldBudget: NewBudget, OldCalibration: NewCalibration, ...} to noise budgets

Swaps in Parent Budgets are propagated to children. This allows a top level budget to adjusted sub budgets. This is a feature that helps account for the use of list and dicts, as class attributes, to store sub-budget trees. Such attributes don't otherwise respect inheritance well.

This is not supposed to be a feature used in any major top-level budgets, but for users to create and test budget variants without having to re-construct an entire budget tree for every variant. It pairs well with the precomp changes of !165, though is an independent MR.

The main use would be to sub-class a top-level budget and apply a handful of swaps. Such as swapping out a ResidualGas budget or some other budget that does not rely on a precomp that can be swapped using the new precomp mechanism.

Merge request reports

Loading