idstools.compute.wall

Module Contents

class idstools.compute.wall.WallCompute(ids_object)[source]
ids_object
get_inner_wall()[source]

Retrieves the inner wall coordinates from the IDS object.

This method extracts the radial (r) and vertical (z) coordinates of the inner wall outline from the first limiter unit in the IDS object’s 2D description. It appends the first coordinate to the end of the array to close the loop of the wall outline.

Returns:

A tuple containing two numpy arrays:

rw (numpy.ndarray): Radial coordinates of the inner wall. zw (numpy.ndarray): Vertical coordinates of the inner wall.

If an error occurs during extraction, returns None.

Return type:

tuple

get_limiter_units(select_description2d=':', select_unit=':')[source]

Retrieve information about limiter units from the IDS object.

Parameters:

select_description2dstr, optional

A slice notation string to select specific description_2d entries. Default is “:” (select all).

select_unitstr, optional

A slice notation string to select specific units within each description_2d. Default is “:” (select all).

Returns:

description2d_infosdict
A dictionary where keys are indices of description_2d entries and values are dictionaries containing:
  • “name”str

    The name of the description_2d type.

  • “description”str

    The description of the description_2d type.

  • “limiterunits”dict
    A dictionary where keys are indices of units and values are dictionaries containing:
    • “name”str

      The name of the unit.

    • “description”str

      The description of the unit (empty string if not available).

    • “r”numpy.ndarray

      The r-coordinates of the unit’s outline.

    • “z”numpy.ndarray

      The z-coordinates of the unit’s outline.

    • “closed”bool

      Indicates if the unit is closed (default is False if not available).

    • “resistivity”float

      The resistivity of the unit.

static get_rectangle_coordinates(r, z, h, closed=False)[source]

The function get_rectangle_coordinates calculates the coordinates of rectangles based on input parameters.

Parameters:
r

The parameter r in the get_rectangle_coordinates function represents the x-coordinates of the corners of the rectangles.

z

The z parameter in the get_rectangle_coordinates function represents the vertical coordinates of the corners of rectangles. It is used to define the vertical positions of the rectangle vertices in the 3D space.

h

The h parameter in the get_rectangle_coordinates function represents the height of the rectangle at each point. It is a list containing the height values for each rectangle.

closed=False

The closed parameter in the get_rectangle_coordinates function is a boolean parameter that determines whether the rectangle should be closed or not. If closed is set to True, the function will close the rectangle by connecting the last point to the first point. If closed is set. Defaults to False

Returns:

The function get_rectangle_coordinates returns a list of tuples, where each tuple contains two lists. The two lists in each tuple represent the x and y coordinates of the vertices of a rectangle in 2D space.

get_vessel_units(select_description2d=':', select_unit=':', name_filter=None)[source]

Retrieve vessel units information from the IDS object.

Parameters:
select_description2d=':'

A slice notation string to filter the description_2d list. Default is “:”.

select_unit=':'

A slice notation string to filter the units list. Default is “:”.

name_filter=None

A string to filter units by name or identifier. Default is None.

Returns:

A dictionary containing information about the vessel units. The keys are the indices of the description_2d elements, and the values are dictionaries containing the name, description, and vessel units information.

Return type:

dict

idstools.compute.wall.timeit_decorator(func)[source]
idstools.compute.wall.logger