pyaml.magnet.corrector#

Corrector magnet elements.

This module defines horizontal and vertical orbit-corrector elements.

Classes

RWCorrectorAngle(corr)

Set the angle of a horizontal or vertical corrector.

class pyaml.magnet.corrector.RWCorrectorAngle(corr)#

Bases: ReadWriteFloatScalar

Set the angle of a horizontal or vertical corrector.

The kick-angle sign convention is defined by the global PyAML constant pyaml.common.constants.HORIZONTAL_KICK_SIGN. To change the convention, run the following before building the accelerator:

import pyaml.common.constants
pyaml.common.constants.HORIZONTAL_KICK_SIGN = -1.0
Parameters:

corr (Magnet) – Corrector magnet whose strength represents the kick angle.

Methods

get()

Get the corrector kick angle.

set()

Set the corrector kick angle.

set_and_wait()

Set the kick angle and wait for it to reach the setpoint.

unit()

Get the unit for the kick angle.

get()#

Get the corrector kick angle.

Returns:

float – Kick angle in radians.

Return type:

float

set(value)#

Set the corrector kick angle.

Parameters:

value (float) – Target kick angle in radians.

set_and_wait(value)#

Set the kick angle and wait for it to reach the setpoint.

Parameters:

value (float) – Target kick angle in radians

Raises:

NotImplementedError – This method is not yet implemented

unit()#

Get the unit for the kick angle.

Returns:

str – Unit string, always ‘rad’ for radians

Return type:

str