mne_bids.stats.count_events#
- mne_bids.stats.count_events(root_or_path, datatype='auto')[source]#
Count events present in dataset.
- Parameters:
- root_or_pathpath-like |
mne_bids.BIDSPath
If str or Path it is the root folder of the BIDS dataset. If a BIDSPath is passed it allows to limit the count to a subject, a session or a run by only considering the event files that match this BIDSPath.
- datatype
str
Type of the data recording. Can be
meg
,eeg
,ieeg
orauto
. Ifauto
and amne_bids.BIDSPath
isinstance is passed asroot_or_path
which has adatatype
attribute set, then this data type will be used. Otherwise, only one data type should be present in the dataset to avoid any ambiguity.
- root_or_pathpath-like |
- Returns:
- counts
pandas.DataFrame
The pandas dataframe containing all the counts of trial_type in all matching events.tsv files.
- counts
Notes
Changed in version 0.15: Table values were changed from floats (with NaN for missing values) to Pandas nullable integer arrays.
Examples using mne_bids.stats.count_events
#
02. Convert MNE sample data to BIDS format
04. Convert EEG data to BIDS format
05. BIDS conversion for group studies
13. Convert NIRS data to BIDS format