File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,11 @@ def getParameters(
127127 Subject ID. Default is 'Participant'.
128128 path : str
129129 The task working directory.
130+ referenceTone : callable
131+ Function selecting the reference tones for the exteroceptive condition.
132+ The output should be a single float matching the name of the `.wav` files
133+ (ending with `.0` or `.5`). Default is uniform between 40.0 and 100.0 BPM
134+ (`np.random.choice(np.arange(40, 100, 0.5))`).
130135 serial : PySerial instance
131136 The serial port used to record the PPG activity.
132137 screenNb : int
@@ -175,6 +180,7 @@ def getParameters(
175180 parameters ["nBreaking" ] = nBreaking
176181 parameters ["lambdaIntero" ] = [] # Save the history of lambda values
177182 parameters ["lambdaExtero" ] = [] # Save the history of lambda values
183+ parameters ["referenceTone" ] = np .random .choice (np .arange (40 , 100 , 0.5 ))
178184
179185 parameters ["signal_df" ] = pd .DataFrame ([]) # Physiological recording
180186 parameters ["results_df" ] = pd .DataFrame ([]) # Behavioral results
Original file line number Diff line number Diff line change @@ -529,7 +529,7 @@ def trial(
529529 startTrigger = time .time ()
530530
531531 # Random selection of HR frequency
532- listenBPM = np . random . choice ( np . arange ( 40 , 100 , 0.5 ))
532+ listenBPM = parameters [ "referenceTone" ]
533533
534534 # Play the corresponding beat file
535535 listenFile = pkg_resources .resource_filename (
You can’t perform that action at this time.
0 commit comments