mne.
extract_label_time_course
(stcs, labels, src, mode=’mean_flip’, allow_empty=False, return_generator=False, verbose=None)[source]¶Extract label time course for lists of labels and source estimates.
This function will extract one time course for each label and source estimate. The way the time courses are extracted depends on the mode parameter.
Valid values for mode are:
 ‘mean’: Average within each label.
 ‘mean_flip’: Average within each label with sign flip depending on source orientation.
 ‘pca_flip’: Apply an SVD to the time courses within each label and use the scaled and signflipped first rightsingular vector as the label time course. The scaling is performed such that the power of the label time course is the same as the average pervertex time course power within the label. The sign of the resulting time course is adjusted by multiplying it with “sign(dot(u, flip))” where u is the first leftsingular vector, and flip is a singflip vector based on the vertex normals. This procedure assures that the phase does not randomly change by 180 degrees from one stc to the next.
 ‘max’: Max value within each label.
Parameters:  stcs : SourceEstimate  list (or generator) of SourceEstimate
labels : Label  list of Label
src : list
mode : str
allow_empty : bool
return_generator : bool
verbose : bool, str, int, or None


Returns:  label_tc : array  list (or generator) of array, shape=(len(labels), n_times)
