simnibs.Nodes

class simnibs.Nodes(node_coord=None)

class to handle the node information:

Parameters:

(optional) (node_coord) – Coordinates of the nodes

node_coord

Coordinates of the nodes

Type:

(Nx3) ndarray

nr

Number of nodes

Type:

property

Examples

>>> nodes = Nodes(np.array([[[1, 0, 0], [0, 1, 0], [0, 0, 1]])
array([[1, 0, 0], [0, 1, 0], [0, 0, 1]])
>>> nodes.node_number
array([1, 2, 3])
>>> nodes[1]
array([1, 0, 0])
>>> nodes[array(True, False, True)]
array([[1, 0, 0], [0, 0, 1]])
__init__(node_coord=None)

Methods

__init__([node_coord])

find_closest_node(querry_points[, return_index])

Finds the closest node to each point in p

Attributes

node_number

Node numbers (1, ..., nr)

nr

Number of nodes