meegsim.location.select_random#
- meegsim.location.select_random(src, *, n=1, vertices=None, sort_output=False, random_state=None)[source]#
Randomly selects a specified number of vertices from a given source space.
- Parameters:
- src
SourceSpaces An instance of source spaces to select the vertices from.
- n
int, optional The number of random vertices to select. By default, one vertex is selected.
- vertices
None(default) orlist A subset of vertices to choose from. If None (default), the function uses all vertices from the provided
src.- sort_outputbool, optional
Indicates if sorting is needed for the output. By default, the output is not sorted.
- random_state
None(default) orint Seed for the random number generator. If None (default), results will vary between function calls. Use a fixed value for reproducibility.
- src
- Returns:
- selected
list A list of tuples (index of the source space, vertno of the selected vertex).
- selected