cherab.phix.tools.utils.calc_contours#
- cherab.phix.tools.utils.calc_contours(profile, level, r=None, z=None, rtc=None)Source#
Calculate \(R-Z\) 2-D profile’s contours using
contourpy.- Parameters:
profile (NDArray) – \(R-Z\) 2-D array. The shape of array is \((N_R, N_Z)\).
level (float) – contour level of a profile value
r (NDArray | None) – The r-coorinate of the profile values. The default is calculated by
rtc.z (NDArray | None) – The z-coorinate of the profile values. The default is calculated by
rtc.rtc (RayTransferCylinder | None) – RayTransferCylinder instance, by default returned instance of
import_phix_rtc.
- Returns:
list of contour lines 2-D array \((N, 2)\). The columns of each array show the values of the \(R\) and \(Z\) coordinates, respectively.
- Return type:
list[NDArray]