finesse.analysis.actions.temporary.temporary

finesse.analysis.actions.temporary.temporary(action)[source]

Converts an action into a temporary action.

This function takes a target action, and returns an action that takes multiple actions as arguments. When the returned action is run, it will first run the target action, then all actions passed to it, then restore the changes made by the target action, e.g.

temporary(Change({‘m1.phi’: 10}))(

Xaxis(l1.P, ‘lin’, 0, 10, 100)

)

will first set the parameter m1.phi to 10, then run a sweep of l1.P, then restore m1.phi to its previous value.

Parameters
actionAction

The action to make temporary.

Returns
action

An action that temporarily applies the passed action when run.