pycartool.spi.SourceSpaceπŸ”—

class pycartool.spi.SourceSpace(names, coordinates, subject=None, filename=None)πŸ”—

Container for source space data.

Parameters:
nameslist of str

The solutions point names. Length (n_sources).

coordinatesndarray

The solutions point names coordinates. Shape(n_sources, 3).

subjectstr

Subject from who the source space was created.

filenamestr or file-like

If loaded from a file, the corresponding filename.

Attributes

n_sources

(int) Number of sources.

names

(list of str) The solutions point names. Length n_sources.

coordinates

(array) The solutions point names coordinates. Shape(n_sources, 3)

subject

(str) Subject from who the source space was created.

filename

(str or file-like) If loaded from a file, the corresponding filename.

Methods

get_center_of_mass([method])

Compute the center of mass of the Source Space.

get_coordinates()

Return a copy of sources coordinates.

get_names()

Return a copy of sources names.

save(filename)

Write SourceSpace to .spi file.

get_center_of_mass(method='mean')πŸ”—

Compute the center of mass of the Source Space.

Parameters:
methodstr

The method to use. Can be β€˜mean’, or β€˜median’.

Returns:
center_of_massarray

The x,y,z coordinates of the center of mass.

get_coordinates()πŸ”—

Return a copy of sources coordinates.

Returns:
coordinatesarray

The solutions point names coordinates. shape(n_sources, 3).

get_names()πŸ”—

Return a copy of sources names.

Returns:
nameslist of str

The solutions point names. Length n_sources.

save(filename)πŸ”—

Write SourceSpace to .spi file.

Parameters:
filenamestr or file-like

The .spi file to write.

Examples using pycartool.spi.SourceSpaceπŸ”—

Conpute SVD

Conpute SVD