moabb.datasets.Liu2024#
- class moabb.datasets.Liu2024(break_events=False, instr_events=False)[source]#
Dataset summary
#Subj
#Chan
#Classes
#Trials
Trial length
Freq
#Session
#Runs
Total_trials
50
29
2
20
4s
500Hz
1
1
2000
Dataset [1] from the study on motor imagery [2].
Dataset description This dataset includes data from 50 acute stroke patients (the time after stroke ranges from 1 day to 30 days) admitted to the stroke unit of Xuanwu Hospital of Capital Medical University. The patients included 39 males (78%) and 11 females (22%), aged between 31 and 77 years, with an average age of 56.70 years (SD = 10.57) Before the start of the experiment, the subject sat in a chair in a position as comfortable as possible with an EEG cap placed on their head; subjects were positioned approximately 80 cm away from a computer screen in front of them. The computer played audio instructions to the patient about the procedure. Each experiment lasted approximately 20 minutes, including preparation time and approximately 10 minutes of signal recording. Before the start of the MI experiment, the patients opened their eyes and closed their eyes for 1 minute each. The MI experiment was divided into 40 trials, and each trial took 8 seconds, which consisted of three stages (instruction, MI and break). In the instruction stage, patients were prompted to imagine grasping a spherical object with the left- or right-hand. In the MI stage, participants imagined performing this action, a video of gripping motion is played on the computer, which leads the patient imagine grabbing the ball. This video stays playing for 4 s. Patients only imagine one hand movement.In the break stage, participants were allowed to relax and rest. The MI experiments alternated between the left- and right-hand, and the patients moved onto the next stage of the experiment according to the instructions.
The EEG data were collected through a wireless multichannel EEG acquisition system (ZhenTec NT1, Xi’an ZhenTec Intelligence Technology Co., Ltd., China). The system includes an EEG cap, an EEG acquisition amplifier, a data receiver and host computer software. The EEG cap had electrodes placed according to the international 10-10 system, including 29 EEG recording electrodes and 2 electrooculography (EOG) electrodes. The reference electrode located at CPz position and the grounding electrode located at FPz position. All the EEG electrodes and grounding electrode are Ag/AgCl semi-dry EEG electrodes based on highly absorbable porous sponges that are dampened with 3% NaCl solution. The EOG electrodes are composed by Ag/AgCl electrodes and conductive adhesive hydrogel. The common-mode rejection ratio was 120 dB, the input impedance was 1 GΩ, the input noise was less than 0.4 μVrms, and the resolution was 24 bits. The acquisition impedance was less than or equal to 20 kΩ. The sampling frequency was 500 Hz.
References
- 1
Liu, Haijie; Lv, Xiaodong (2022). EEG datasets of stroke patients. figshare. Dataset. DOI: https://doi.org/10.6084/m9.figshare.21679035.v5
- 2
Liu, Haijie, Wei, P., Wang, H. et al. An EEG motor imagery dataset for brain computer interface in acute stroke patients. Sci Data 11, 131 (2024). DOI: https://doi.org/10.1038/s41597-023-02787-8
Notes
To add the break and instruction events, set the break_events and instr_events parameters to True while instantiating the class.
New in version 1.1.1.
- static create_event_array(raw: Any, event_category: ndarray) ndarray [source]#
This method creates an event array based on the stimulus channel.
- Parameters
raw (mne.io.Raw) – The raw data.
event_category (np.ndarray) – The event categories.
- Returns
events – The created events array.
- Return type
np.ndarray
- data_infos()[source]#
Returns the data paths of the electrodes and events information
This function downloads the necessary data files for electrodes and events from their respective URLs and returns their local file paths.
- Returns
A tuple containing the local file paths to the channels, electrodes, and events information files.
- Return type
- data_path(subject, path=None, force_update=False, update_path=None, verbose=None)[source]#
Return the data paths of a single subject.
- Parameters
subject (int) – The subject number to fetch data for.
path (None | str) – Location of where to look for the data storing location. If None, the environment variable or config parameter MNE_(dataset) is used. If it doesn’t exist, the “~/mne_data” directory is used. If the dataset is not found under the given path, the data will be automatically downloaded to the specified folder.
force_update (bool) – Force update of the dataset even if a local copy exists.
update_path (bool | None) – If True, set the MNE_DATASETS_(dataset)_PATH in mne-python config to the given path. If None, the user is prompted.
verbose (bool, str, int, or None) – If not None, override default verbose level (see mne.verbose()).
- Returns
A list containing the path to the subject’s data file.
- Return type
- encoding(events_df: DataFrame) Tuple[array, Dict[int, str]] [source]#
Encode the columns ‘value’ and ‘trial_type’ into a single event type.
- Parameters
events_df (pd.DataFrame) – DataFrame containing the events information.
- Returns
Array of encoded event types.
- Return type
np.ndarray
Notes
- The ‘trial_type’ variable can take the following values:
1 : Left hand
2 : Right hand
- The ‘value’ variable can take the following values:
1 : instructions
2 : MI
3 : break