bids#
- brainmaze_bci2000.bids.bci2000_to_mefd(path_bci: str, path_mefd: str = None)#
Converts a BCI2000 .dat file to a MEF (Multiscale Electrophysiology Format) directory.
This function reads data from a BCI2000 .dat file, processes it, and writes the data into a MEF directory format. The output includes EEG data, accelerometer data (if available), state variables, and metadata such as sampling rate, amplification factor, and stimulus annotations.
- Parameters:
path_bci (str) – Path to the input BCI2000 .dat file. Must be a valid file path.
path_mefd (str, optional) – Path to the output MEF directory. If not provided, the output path will be derived from the input file by replacing the .dat extension with .mefd.
- Raises:
ValueError – If the input file does not have a .dat extension.
TypeError – If the input path is not a string.
FileNotFoundError – If the input file does not exist or is inaccessible.
- Returns:
The function writes the output to the specified MEF directory and does not return any value.
- Return type:
None
- brainmaze_bci2000.bids.capitalize_words(input_string)#
Capitalizes the first letter of each word in the input string. Words are defined as being separated by spaces, hyphens, or underscores. Removes spaces, hyphens, and underscores in the process.
- Parameters:
input_string (str) – The input string to process.
- Returns:
The processed string with words capitalized and separators removed.
- Return type:
str
- brainmaze_bci2000.bids.convert_sourcedata_bci2000_to_bids(path_source: str, path_bids: str)#
The structure has to contain subject/session/task/acquisition/run directories.