Adding `minimum_trial_duration` parameter to plugins
See original GitHub issueBackground
I propose to add a paramater that I would call response_ends_trial_after_stimulus_duration
that as the name says ends a trial when a response is given and the provided stimulus_duration elapsed. Currently, the parameter response_ends_trial
ignores stimulus duration that can be fine in a lot circumstances but can be problematic for certain types of experiments.
For instance in the field of memory research, we typically want our stimulus to be presented for the same duration during a learning phase regardless whether a response is given. This is important as we want to be able contrast conditions that might come with different RTs. My proposed feature would ensure that even if Condition A is faster than Condition B, stimuli in both conditions are displayed for the same duration allowing me attribute a subsequent memory effect to something other than shorter presentation times in one of the conditions. At the same time, we also often want the possiblity to end a trial when a response is given.
Implementation
I’ve started adding this feature to my fork and create an example. So far, I’ve only added this parameter to /jspsych-html-keyboard-response.js.
Crucially, I made a change that automatically sets response_ends_trial
to true because it would otherwise conflict with response_ends_trial_after_stimulus
.
@becky-gilbert thankfully gave some advice to improve my original modification. The discussion can be found here.
PS
I am happy to make the changes to the other plugins as well depending on the feedback here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (1 by maintainers)
Great! Thanks very much for the update. We’ll look at this ASAP and get back to you.
And as far as dealing with invalid/inconsistent parameter values, this can be a bit tricky and we don’t expect plugins to catch everything. But one option is to just show a warning in the console, something like this:
Good idea 😃