Skip to main content

Module source_space

Module source_space 

Source
Expand description

Source space generation.

Defines where the dipole sources live inside the head volume. Two methods are provided:

  • Icosahedron subdivision: recursively subdivided icosahedron projected onto a sphere, then scaled to a given radius. This approximates a cortical surface with roughly uniform spacing.

  • Regular grid: axis-aligned 3-D grid inside a sphere, useful for volume source spaces.

§Example

use exg_source::source_space::{ico_source_space, grid_source_space};

// ~162 sources on a sphere of radius 0.07 m (cortex)
let (pos, nn) = ico_source_space(2, 0.07, [0.0, 0.0, 0.04]);
assert_eq!(pos.nrows(), nn.nrows());

// Volume grid with 0.01 m spacing inside a 0.08 m sphere
let (pos, nn) = grid_source_space(0.01, 0.08, [0.0, 0.0, 0.04]);

Functions§

grid_source_space
Generate a volume source space on a regular 3-D grid.
ico_n_vertices
Expected vertex count for a given icosahedron subdivision level.
ico_source_space
Generate a source space by subdividing an icosahedron.