|
@@ -2,7 +2,7 @@
|
|
|
# -*- coding: utf-8 -*-
|
|
|
"""
|
|
|
This experiment was created using PsychoPy3 Experiment Builder (v2023.2.3),
|
|
|
- on Wed Dec 6 17:58:52 2023
|
|
|
+ on Tue Dec 12 13:24:05 2023
|
|
|
If you publish work using this script the most relevant publication is:
|
|
|
|
|
|
Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, Lindeløv JK. (2019)
|
|
@@ -43,7 +43,7 @@ from device.data_client import NeuracleDataClient
|
|
|
from device.trigger_box import TriggerNeuracle
|
|
|
from device.fubo_pneumatic_finger import FuboPneumaticFingerClient
|
|
|
from settings.config import settings
|
|
|
-from bci_core.online import Controller
|
|
|
+from bci_core.online import Controller, model_loader
|
|
|
from settings.config import settings
|
|
|
|
|
|
|
|
@@ -93,9 +93,15 @@ def parse_args():
|
|
|
return parser.parse_args()
|
|
|
args = parse_args()
|
|
|
|
|
|
+# load model
|
|
|
+input_kwargs = {
|
|
|
+ 'state_trans_prob': args.state_trans_prob,
|
|
|
+ 'state_change_threshold': args.state_change_threshold
|
|
|
+ }
|
|
|
+control_model = model_loader(args.model_path, **input_kwargs)
|
|
|
+
|
|
|
# build bci controller
|
|
|
-controller = Controller(0., args.model_path,
|
|
|
- state_change_threshold=args.state_change_threshold)
|
|
|
+controller = Controller(0., control_model)
|
|
|
# Run 'Before Experiment' code from device
|
|
|
# connect neo
|
|
|
receiver = NeuracleDataClient(n_channel=len(config_info['channel_labels']),
|