Spatial positions functions

The spatial module contains parameters related to spatial positions of the nodes.

Syntax:

nest.spatial.grid(shape, center,
  extent, edge_wrap)
class nest.spatial.hl_api_spatial.free(pos, extent=None, edge_wrap=False, num_dimensions=None)

Defines positions for nodes based on a list of positions, or a Parameter object.

Parameters:
  • pos ([list | Parameter]) – Either a list of two- or three-element lists containing positions, depending on number of dimensions, a two- or three-element list of Parameters, depending on number of dimensions, or a single Parameter.

  • extent (list, optional) – Extent of the layer in each dimension.

  • edge_wrap (bool, optional) – Specifies periodic boundary conditions.

  • num_dimensions (int, optional) – If a single Parameter is given as position, and no extent is specified, the number of dimensions must be set explicitly.

class nest.spatial.hl_api_spatial.grid(shape, center=None, extent=None, edge_wrap=False)

Defines grid-based positions for nodes.

Parameters:
  • shape (list) – Two- or three-element list with the grid shape in two or three dimensions, respectively.

  • center (list, optional) – Position of the center of the layer.

  • extent (list, optional) – Extent of the layer in each dimension.

  • edge_wrap (bool, optional) – Specifies periodic boundary conditions.

class nest.spatial.hl_api_spatial.pos

Position of node in a specific dimension.

Three properties are defined, x, y, and z, which represent the position in their respective dimensions. Note that this parameter can only be used in contexts with one node, e.g. when setting node status.

static n(dimension)

Position in given dimension.

Parameters:

dimension (int) – Dimension in which to get the position.

Returns:

Object yielding the position in the given dimension.

Return type:

Parameter

class nest.spatial.hl_api_spatial.source_pos

Position of the source node in a specific dimension.

Three properties are defined, x, y, and z, which represent the source node position in their respective dimensions. Note that this parameter can only be used in contexts with two nodes, e.g. when connecting.

static n(dimension)

Position of source node in given dimension.

Parameters:

dimension (int) – Dimension in which to get the position.

Returns:

Object yielding the position in the given dimension.

Return type:

Parameter

class nest.spatial.hl_api_spatial.target_pos

Position of the target node in a specific dimension.

Three properties are defined, x, y, and z, which represent the target node position in their respective dimensions. Note that this parameter can only be used in contexts with two nodes, e.g. when connecting.

static n(dimension)

Position of target node in given dimension.

Parameters:

dimension (int) – Dimension in which to get the position.

Returns:

Object yielding the position in the given dimension.

Return type:

Parameter

nest.spatial.distance: DistanceParameter

A singleton instance representing the distance between two nodes in space.

If used alone, the DistanceObject represents simply the Euclidean distance between two nodes.

Alternatively the distance in a single dimension may be chosen. Three properties are defined, x, y, and z, which represent the distance in their respective dimensions. Note that the distance parameter can only be used in contexts with two nodes, e.g. when connecting.