Skip to main content

grid_source_space

Function grid_source_space 

Source
pub fn grid_source_space(
    spacing: f64,
    radius: f64,
    center: [f64; 3],
) -> (Array2<f64>, Array2<f64>)
Expand description

Generate a volume source space on a regular 3-D grid.

§Arguments

  • spacing — Grid spacing in metres (e.g., 0.01 for 1 cm).
  • radius — Only include points inside a sphere of this radius.
  • center — Centre of the sphere [x, y, z] in metres.

§Returns

(positions, normals) where both have shape [n_sources, 3]. For a volume source space, normals are set to [0, 0, 1] (arbitrary).