Skip to content

Commit c9b11ff

Browse files
authored
Merge pull request #45 from embodied-computation-group/LegrandNico-patch-3
MAJOR FIX: Fix randomization of exteroception trials
2 parents 09c6e63 + 53a6d66 commit c9b11ff

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

cardioception/HRD/parameters.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,6 @@ def getParameters(
131131
Subject ID. Default is 'Participant'.
132132
path : str
133133
The task working directory.
134-
referenceTone : callable
135-
Function selecting the reference tones for the exteroceptive condition.
136-
The output should be a single float matching the name of the `.wav`
137-
files (ending with `.0` or `.5`). Default is uniform between 40.0 and
138-
100.0 BPM (`np.random.choice(np.arange(40, 100, 0.5))`).
139134
resultPath : str or None
140135
Where to save the results.
141136
serial : PySerial instance
@@ -198,7 +193,6 @@ def getParameters(
198193
parameters["nBreaking"] = nBreaking
199194
parameters["lambdaIntero"] = [] # Save the history of lambda values
200195
parameters["lambdaExtero"] = [] # Save the history of lambda values
201-
parameters["referenceTone"] = np.random.choice(np.arange(40, 100, 0.5))
202196
parameters["nFinger"] = None
203197
parameters["signal_df"] = pd.DataFrame([]) # Physiological recording
204198
parameters["results_df"] = pd.DataFrame([]) # Behavioral results

cardioception/HRD/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ def trial(
541541
parameters["triggers"]["listeningStart"] # Send triggers
542542

543543
# Random selection of HR frequency
544-
listenBPM = parameters["referenceTone"]
544+
listenBPM = np.random.choice(np.arange(40, 100, 0.5))
545545

546546
# Play the corresponding beat file
547547
listenFile = pkg_resources.resource_filename(

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def read(fname):
1313
DISTNAME = "cardioception"
1414
MAINTAINER = "Nicolas Legrand"
1515
MAINTAINER_EMAIL = "[email protected]"
16-
VERSION = "0.4.0"
16+
VERSION = "0.4.1"
1717

1818
INSTALL_REQUIRES = [
1919
"systole>=0.1.3",

0 commit comments

Comments
 (0)