pyavs.extract_roi_data¶
- pyavs.extract_roi_data(source_data: ndarray, src: mne.SourceSpaces, roi_labels: List[str], subjects_dir: str | None = None, subject: str = 'fsaverage', method: str = 'mean', verbose: bool = True) Dict[str, ndarray][source]¶
Extract data from regions of interest.
- Parameters:
source_data (np.ndarray) – Source space data with shape (n_epochs, n_sources, n_times)
src (mne.SourceSpaces) – Source space
subjects_dir (str, optional) – FreeSurfer subjects directory (default: None, uses get_default_subjects_dir())
subject (str, optional) – Subject name (default: ‘fsaverage’)
method (str, optional) – Aggregation method (‘mean’, ‘pca’, ‘max’) (default: ‘mean’)
verbose (bool, optional) – Whether to print progress information (default: True)
- Returns:
Dictionary mapping ROI names to extracted data
- Return type: