You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way the simulation mode for the survey-multi-select is set up is not only having the RT hard-coded (see line 343) but also does not account for cases where data.response might be empty.
E.g. say I have simulations options defined like so:
where the expected output is that in 50% of the cases I get random responses (as generated by the plugin) after 100ms and in the other 50% of cases I would expect the response to be null.
2 issues:
If data.response is null, the simulate_visual errors when defining answers, line 322
if rt is null, there is no way to end the trial as this one does not support trial_duration
Solution
Apart from the fact that I don't quite understand why there is no trial_duration for this one, the solution I've implemented for myself is by first defining the simulation options like this:
and then check if data.response is null in simulate_visual function -- if it is, then we end the trial after data.rt (in this case, 100ms) using setTimeout, inside of which we call jsPsych.finishTrial(new_data), wherein new_data is the same as data but the rt is changed to be null
in code (notice that in my setup I've also got rid of the hardcoded 1000):
Problem statement
The way the simulation mode for the survey-multi-select is set up is not only having the RT hard-coded (see line 343) but also does not account for cases where data.response might be empty.
E.g. say I have simulations options defined like so:
where the expected output is that in 50% of the cases I get random responses (as generated by the plugin) after 100ms and in the other 50% of cases I would expect the response to be null.
2 issues:
simulate_visual
errors when defininganswers
, line 322Solution
Apart from the fact that I don't quite understand why there is no trial_duration for this one, the solution I've implemented for myself is by first defining the simulation options like this:
(notice how the rt is 100 for both now)
and then check if data.response is null in
simulate_visual
function -- if it is, then we end the trial after data.rt (in this case, 100ms) using setTimeout, inside of which we calljsPsych.finishTrial(new_data)
, wherein new_data is the same as data but the rt is changed to be nullin code (notice that in my setup I've also got rid of the hardcoded 1000):
The text was updated successfully, but these errors were encountered: