tune#

class ConfigModel(*, name, description=None, lattice_names=None, quad_array_name, betatron_tune_name, response_matrix)[source]#

Bases: ElementConfigModel

Configuration model for Tune

Parameters:
  • quad_array_name (str) – Array name of quad used to adjust the tune

  • betatron_tune_name (str) – Name of the diagnostic pyaml device for measuring the tune

  • quad_delta (float) – Delta strength used to get the response matrix

Create 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.

betatron_tune_name: str#
quad_array_name: str#
response_matrix: str | ResponseMatrixData#
class Tune(cfg)[source]#

Bases: TuningTool

Class providing tune adjustment tool

Construct a Tune adjustment object.

Parameters:

cfg (ConfigModel) – Configuration for the tune adjustment.

add(dtune, wait_time=0.0)[source]#

Add delta tune to the tune

Parameters:
  • dtune (np.array) – Delta tune

  • iter_nb (int)

  • wait_time (float)

correct(dtune)[source]#

Return delta strengths for tune correction

Parameters:

dtune (np.array) – Delta tune

get()[source]#

Return the betatron tune setpoint

load(load_path)[source]#

Dynamically loads a response matrix.

Parameters:

load_path (Path) – Filename of the ResponseMatrixData to load

readback()[source]#

Return the betatron tune measurement

set(tune, iter=1, wait_time=0.0)[source]#

Sets the tune

Parameters:
  • tune (np.array) – Tune setpoint

  • iter_nb (int) – Number of iteration

  • wait_time (float) – Time to wait in second between 2 iterations

property response_matrix: ResponseMatrixData | None#

Return the response matrix if it has been loaded None otherwise