center_element#
- class brainspike.spatial.center_element(layer)[source]#
Local index of the node nearest the layer centroid (NEST
FindCenterElement).Ties resolve to the lowest index (matching NEST).
- Parameters:
layer (
Layer) – A concrete position layer.- Returns:
The population-local index of the most central node.
- Return type:
Examples
>>> import brainspike >>> brainspike.spatial.center_element(brainspike.spatial.grid([4, 3], extent=[2.0, 1.5])) 4