Skip to content

Commit b0c11df

Browse files
author
LegrandNico
committed
Add HBC wrapper
1 parent baf3665 commit b0c11df

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

wrappers/hbc.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Author: Nicolas Legrand <[email protected]>
2+
3+
4+
from psychopy import gui
5+
6+
from cardioception.HBC.parameters import getParameters
7+
from cardioception.HBC.task import run
8+
9+
# Create a GUI and ask for high-evel experiment parameters
10+
g = gui.Dlg()
11+
g.addField("participant", initial="Participant")
12+
g.addField("session", initial="HBC")
13+
g.addField("Serial Port:", initial=None)
14+
g.addField("Setup:", initial="behavioral")
15+
g.show()
16+
17+
# Set global task parameters here
18+
parameters = getParameters(
19+
participant=g.data[0],
20+
session=g.data[1],
21+
serialPort=g.data[2],
22+
setup=g.data[3],
23+
nTrials=120,
24+
screenNb=0,
25+
)
26+
27+
# Run task
28+
run(parameters, confidenceRating=True, runTutorial=True)
29+
30+
parameters["win"].close()

wrappers/hrd.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
session=g.data[1],
2121
serialPort=g.data[2],
2222
setup=g.data[3],
23+
stairType="psi",
24+
catchTrials=0.0,
2325
nTrials=120,
24-
screenNb=0,
26+
exteroception=True,
2527
)
2628

2729
# Run task

0 commit comments

Comments
 (0)