meegsim.sources.PatchSource#

class meegsim.sources.PatchSource(name, src_idx, vertno, waveform, std=1.0, hemi=None)[source]#

Patch source of activity that is located in one of the vertices in the source space.

Attributes:
namestr

The name of source.

src_idxint

The index of source space that the patch source belong to.

vertnolist

The vertices that the patch sources correspond to including the central vertex.

waveformnp.array

The waveform of source activity.

stdfloat, optional

The standard deviation of the source activity (1 by default).

hemistr or None, optional

Human-readable name of the hemisphere (e.g, lh or rh).

Methods

to_label(src)

Get an mne.Label object containing all vertices belonging to the current source.

to_stc(src, tstep[, subject])

Convert the source into a SourceEstimate object in the context of the provided SourceSpaces.

to_label(src)[source]#

Get an mne.Label object containing all vertices belonging to the current source.

Parameters:
srcSourceSpaces

The source space where the source should be considered.

Returns:
labelLabel

The constructed label.

to_stc(src, tstep, subject=None)[source]#

Convert the source into a SourceEstimate object in the context of the provided SourceSpaces.

Parameters:
srcSourceSpaces

The source space where the source should be considered.

tstepfloat

The sampling interval of the source time series (1 / sfreq).

subjectstr or None, optional

Name of the subject that the stc corresponds to. If None, the subject name from the provided src is used if present.

Returns:
stcSourceEstimate

SourceEstimate that corresponds to the source in the provided src.

Raises:
ValueError

If the source does not exist in the provided src.