finesse.model.Model.sim_trace_config_manager¶
- Model.sim_trace_config_manager(**kwargs)[source]¶
Change the
Model.sim_trace_config
within a context.This provides a convenient pattern through which one can temporarily set the simulation beam tracing behaviour in a
with
block. The methodModel.reset_sim_trace_config()
is called on exit.- Parameters
- kwargskeyword arguments
Examples
Temporarily change the tracing order:
with model.sim_trace_config_manager(order=["cavXARM", "gaussBS", "cavYARM"]): out = model.run()
Disable certain dependencies in a context:
with model.sim_trace_config_manager(disable="cavIMC"): out = model.run()
Switch off re-tracing and enable only two specific trace dependencies:
with model.sim_trace_config_manager( retrace=False, enable_only=["cavXARM", "cavYARM"] ): out = model.run()
Use asymmetric tracing and mask all data points where any unstable cavity is encountered:
with model.sim_trace_config_manager(symmetric=False, unstable_handling="mask"): out = model.run()