at.lattice.geometry#
Lattice geometry
Functions
|
Compute the 3D ring geometry in cartesian coordinates |
- get_geometry(ring, refpts=RefptsCode.All, start_coordinates=(0.0, 0.0, 0.0), h_angle=0.0, v_angle=0.0, centred=False, **kwargs)[source]#
Compute the 3D ring geometry in cartesian coordinates
- Parameters:
refpts (Type[Element] | Element | Callable[[Element], bool] | str | None | int | Sequence[int] | bool | Sequence[bool] | RefptsCode) – Element selection key. See “Selecting elements in a lattice”
start_coordinates (tuple[float, float, float]) – x, y, z at starting point. x and y are ignored if centred is
True
.h_angle (float) – initial horizontal angle.
v_angle (float) – initial vertical angle.
centred (bool) – if
True
the coordinates origin is the centre of the ring.
- Returns:
geomdata –
recarray
containing the fields x, y, z, angle, v_angle.radius – machine radius at the beginning of the lattice.
Attention
This radius is different from the radius usually defined as \(C/2\pi\)
Example
>>> geomdata, _ = get_geometry(ring) >>> xcoord = geomdata.x