-
Notifications
You must be signed in to change notification settings - Fork 125
/
Copy path00x__n170_run_experiment.py
42 lines (35 loc) · 1.09 KB
/
00x__n170_run_experiment.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""
N170 run experiment
===============================
This example demonstrates the initiation of an EEG stream with eeg-notebooks, and how to run
an experiment.
"""
###################################################################################################
# Setup
# ---------------------
#
# Imports
import os
from eegnb import generate_save_fn
from eegnb.devices.eeg import EEG
from eegnb.experiments.visual_n170 import n170
# Define some variables
board_name = "muse"
experiment = "visual_n170"
subject_id = 0
session_nb = 0
record_duration = 120
###################################################################################################
# Initiate EEG device
# ---------------------
#
# Start EEG device
eeg_device = EEG(device=board_name)
# Create save file name
save_fn = generate_save_fn(board_name, experiment, subject_id, session_nb)
print(save_fn)
###################################################################################################
# Run experiment
# ---------------------
#
n170.present(duration=record_duration, eeg=eeg_device, save_fn=save_fn)