Skip to content

Commit

Permalink
Merge pull request #45 from embodied-computation-group/LegrandNico-pa…
Browse files Browse the repository at this point in the history
…tch-3

MAJOR FIX: Fix randomization of exteroception trials
  • Loading branch information
micahgallen authored Jun 8, 2021
2 parents 09c6e63 + 53a6d66 commit c9b11ff
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions cardioception/HRD/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ def getParameters(
Subject ID. Default is 'Participant'.
path : str
The task working directory.
referenceTone : callable
Function selecting the reference tones for the exteroceptive condition.
The output should be a single float matching the name of the `.wav`
files (ending with `.0` or `.5`). Default is uniform between 40.0 and
100.0 BPM (`np.random.choice(np.arange(40, 100, 0.5))`).
resultPath : str or None
Where to save the results.
serial : PySerial instance
Expand Down Expand Up @@ -198,7 +193,6 @@ def getParameters(
parameters["nBreaking"] = nBreaking
parameters["lambdaIntero"] = [] # Save the history of lambda values
parameters["lambdaExtero"] = [] # Save the history of lambda values
parameters["referenceTone"] = np.random.choice(np.arange(40, 100, 0.5))
parameters["nFinger"] = None
parameters["signal_df"] = pd.DataFrame([]) # Physiological recording
parameters["results_df"] = pd.DataFrame([]) # Behavioral results
Expand Down
2 changes: 1 addition & 1 deletion cardioception/HRD/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ def trial(
parameters["triggers"]["listeningStart"] # Send triggers

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

# Play the corresponding beat file
listenFile = pkg_resources.resource_filename(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def read(fname):
DISTNAME = "cardioception"
MAINTAINER = "Nicolas Legrand"
MAINTAINER_EMAIL = "[email protected]"
VERSION = "0.4.0"
VERSION = "0.4.1"

INSTALL_REQUIRES = [
"systole>=0.1.3",
Expand Down

0 comments on commit c9b11ff

Please sign in to comment.