wall_outline#

cherab.lhd.machine.wall_outline(phi: float, basis: str = 'rz') ndarray[Any, dtype[float64]]Source#

\((r, z)\) or \((x, y, z)\) coordinates of LHD wall outline at a toroidal angle \(\varphi\).

If no \((r, z)\) coordinates data is at \(\varphi\), then one point of wall outline \(xyz\) is interpolated linearly according to the following equation:

\[xyz = \frac{(\varphi - \varphi_i) xyz_{i+1} + (\varphi_{i+1} - \varphi) xyz_{i}}{\varphi_{i+1} - \varphi_{i}}\]

where \(\varphi_{i} < \varphi < \varphi_{i+1}\) and \(xyz_{i}\) and \(xyz_{i+1}\) is wall outline coordinates at \(\varphi_{i}\) and \(\varphi_{i+1}\), respectively.

Parameters:
phifloat

Toroidal angle in units of degree.

basis{“rz”, “xyz”}, optional

Coordinate system for returned points, by default “rz”.

Returns:
(N, 2) or (N, 3) array_like

Wall outline points in either \((r, z)\) or \((x, y, z)\) coordinates which depends on the basis parameter.

Examples

>>> from cherab.lhd.machine import wall_outline
>>> rz = wall_outline(15.0, basis="rz")
>>> rz
array([[ 4.40406713,  1.51311291],
       [ 4.39645296,  1.42485631],
       ...
       [ 4.40406713,  1.51311291]])