orbit#
- class ConfigModel(*, name, description=None, lattice_names=None, bpm_array_name, hcorr_array_name, vcorr_array_name, rf_plant_name=None, singular_values=None, singular_values_H=None, singular_values_V=None, virtual_target=0, response_matrix)[source]#
Bases:
ElementConfigModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- response_matrix: str | OrbitResponseMatrixData#
- class Orbit(cfg)[source]#
Bases:
TuningTool- correct(plane=None, gain=1.0, gain_H=None, gain_V=None, gain_RF=None, singular_values_H=None, singular_values_V=None, reference=None, rf=False, virtual_target=None)[source]#
Perform orbit correction using the configured response matrix and corrector arrays.
- Parameters:
reference (optional) – Optional reference orbit to correct towards. If not specified, corrects to zero orbit.
gain (float, default 1.0) – Global gain applied to all corrector kicks if per-plane gains are not specified.
plane ({'H', 'V'}, optional) – Plane to correct. If ‘H’, only horizontal correction is performed. If ‘V’, only vertical correction is performed. If None (default), both planes are corrected.
gain_H (float, optional) – Gain for the horizontal plane. Overrides gain for H-plane if specified.
gain_V (float, optional) – Gain for the vertical plane. Overrides gain for V-plane if specified.
gain_RF (optional) – Gain for the correction with the rf frequency. If not specified, the gain of the horizontal plane is used.
singular_values_H (int, optional) – Number of singular values to use for SVD decomposition in the horizontal plane. If not specified, uses the default or configured value.
singular_values_V (int, optional) – Number of singular values to use for SVD decomposition in the vertical plane. If not specified, uses the default or configured value.
rf (bool, default False,) – If set to true, the rf_response will also be used in the response matrix for correction of the horizontal orbit. Only takes into effect if plane is None or if plane = ‘H’.
- load(load_path)[source]#
Dynamically loads a response matrix.
- Parameters:
load_path (Path) – Filename of the
OrbitResponseMatrixDatato load
- property response_matrix: OrbitResponseMatrixData | None#
Return the response matrix if it has been loaded None otherwise