PolarMagnet¶
-
class
zgoubidoo.commands.magnetique.
PolarMagnet
(label1: str = '', label2: str = '', *params, **kwargs)[source]¶ Bases:
zgoubidoo.commands.magnetique.Magnet
Base class for magnetic elements in polar coordinates.
TODO
Command attributes
-
LABEL1=''
Primary label for the Zgoubi command (default: auto-generated hash).
- Type
str
-
LABEL2=''
Secondary label for the Zgoubi command.
- Type
str
-
HEIGHT='20 centimeter'
Height of the magnet (distance between poles), used by plotting functions.
- Type
Quantity
-
POLE_WIDTH='150 centimeter'
Pole width (used for plotting only).
- Type
Quantity
-
PIPE_THICKNESS='2 centimeter'
Thickness of the pipe, used by plotting functions.
- Type
Quantity
-
PIPE_COLOR='grey'
Color of the pipe, used by plotting functions.
- Type
str
-
REFERENCE_FIELD_COMPONENT='BZ'
Orientation of the reference field (used by field maps)
- Type
str
-
KINEMATICS='None'
A kinematics object.
- Type
NoneType
-
APERTURE_LEFT='10 centimeter'
Aperture size of the magnet, left side (used for plotting only).
- Type
Quantity
-
APERTURE_RIGHT='10 centimeter'
Aperture size of the magnet, right side (used for plotting only).
- Type
Quantity
-
APERTURE_TOP='10 centimeter'
Aperture size of the magnet, top side (used for plotting only).
- Type
Quantity
-
APERTURE_BOTTOM='10 centimeter'
Aperture size of the magnet, bottom side (used for plotting only).
- Type
Quantity
Default initializer for all Commands.
Attributes Summary
Parameters of the command, with their default value, their description and optionally an index used by other commands (e.g.
Returns:
Returns:
Returns:
Returns:
Returns:
Returns:
Returns:
Returns:
Returns:
Returns:
Methods Summary
adjust_tracks_variables
(tracks)drift_length_from_polar
(radius, …)- param radius
the reference radius of the magnet
efb_angle_from_polar
(magnet_angle, poles_angle)- param magnet_angle
total angular opening of the magnet (i.e. of the field-map)
efb_offset_from_polar
(radius, magnet_angle, …)- param radius
the reference radius of the magnet
Attributes Documentation
-
PARAMETERS
: dict = {'APERTURE_BOTTOM': (<Quantity(10, 'centimeter')>, 'Aperture size of the magnet, bottom side (used for plotting only).'), 'APERTURE_LEFT': (<Quantity(10, 'centimeter')>, 'Aperture size of the magnet, left side (used for plotting only).'), 'APERTURE_RIGHT': (<Quantity(10, 'centimeter')>, 'Aperture size of the magnet, right side (used for plotting only).'), 'APERTURE_TOP': (<Quantity(10, 'centimeter')>, 'Aperture size of the magnet, top side (used for plotting only).'), 'COLOR': ('blue',), 'HEIGHT': (<Quantity(20, 'centimeter')>, 'Height of the magnet (distance between poles), used by plotting functions.'), 'KINEMATICS': (None, 'A kinematics object.'), 'LABEL1': ('', 'Primary label for the Zgoubi command (default: auto-generated hash).'), 'LABEL2': ('', 'Secondary label for the Zgoubi command.'), 'PIPE_COLOR': ('grey', 'Color of the pipe, used by plotting functions.'), 'PIPE_THICKNESS': (<Quantity(2, 'centimeter')>, 'Thickness of the pipe, used by plotting functions.'), 'POLE_WIDTH': (<Quantity(150, 'centimeter')>, 'Pole width (used for plotting only).'), 'REFERENCE_FIELD_COMPONENT': ('BZ', 'Orientation of the reference field (used by field maps)')}¶ Parameters of the command, with their default value, their description and optionally an index used by other commands (e.g. fit).
-
angular_opening
¶ Returns:
-
center
¶ Returns:
-
entrance_efb
¶ Returns:
-
entry_patched
¶ Returns:
-
entry_wedge_angle
¶
-
exit
¶ Returns:
-
exit_efb
¶ Returns:
-
exit_patched
¶ Returns:
-
exit_wedge_angle
¶
-
length
¶ Returns:
-
radius
¶ Returns:
-
reference_angles
¶ Returns:
Methods Documentation
-
static
drift_length_from_polar
(radius: pint.quantity.build_quantity_class.<locals>.Quantity, magnet_angle: pint.quantity.build_quantity_class.<locals>.Quantity, poles_angle: pint.quantity.build_quantity_class.<locals>.Quantity) → pint.quantity.build_quantity_class.<locals>.Quantity[source]¶ - Parameters
radius – the reference radius of the magnet
magnet_angle – total angular opening of the magnet (i.e. of the field-map)
poles_angle – angular opening of the poles
Returns:
-
static
efb_angle_from_polar
(magnet_angle: pint.quantity.build_quantity_class.<locals>.Quantity, poles_angle: pint.quantity.build_quantity_class.<locals>.Quantity) → pint.quantity.build_quantity_class.<locals>.Quantity[source]¶ - Parameters
magnet_angle – total angular opening of the magnet (i.e. of the field-map)
poles_angle – angular opening of the poles
Returns:
-
static
efb_offset_from_polar
(radius: pint.quantity.build_quantity_class.<locals>.Quantity, magnet_angle: pint.quantity.build_quantity_class.<locals>.Quantity, poles_angle: pint.quantity.build_quantity_class.<locals>.Quantity) → pint.quantity.build_quantity_class.<locals>.Quantity[source]¶ - Parameters
radius – the reference radius of the magnet
magnet_angle – total angular opening of the magnet (i.e. of the field-map)
poles_angle – angular opening of the poles
Returns:
-