Hello, I'm trying to prepare an experiment that consists of three different tasks/steps, each running in a different script. The first task is a simple learning task, the second one is a staircase to establish participants' visual detection threshold. Finally, I need to pass the final threshold value from the staircase script to the main task (third task). This is a crucial part of the experiment: I need to pick a specific main task script based on participants' threshold value and to do so I produced several main task scripts, each one picking the stimuli at the appropriate threshold level. I've already checked forum discussions and the guide about passing values and parameters between different scripts, but it doesn't seem to work for me. Despite the threshold value generated at the end of the staircase task is always in the appropriate range for one of my main task scripts, whenever the staircase ends I only see a series of white flickering screens, as if every single script is aborted. Do you have any idea about the potential issue? Or do you think there is a better solution?
I’ve attached the code below. I apologise if I’m missing something trivial.
In the staircase, I defined:
<values>
/DiffThreshold1 = 0
</values>
and final trial:
<trial thresholds>
/trialduration = 0
/recorddata = true
/ ontrialend = [
values.DiffThreshold1 = expressions.DiffThreshold
]
</trial>
The threshold value can range from 15 to 29 (I'm excluding participants that fall below or above). I rounded the final threshold value in order to get two possible values per final script (eg 15 or 15.5).
This is how I set the main task for passing the threshold value (eg maintask_15.iqx):
<parameters>
/ DiffThreshold1 = 0
</parameters>
<expt>
/ onexptbegin = [
if (parameters.DiffThreshold1!= 15.5 || parameters.DiffThreshold1!= 15) script.abort(false)
]
/ blocks = [1=cardtask; 2=balltask; 3=audiocheck;]
</expt>
<expt>
/blocks = [1 = blockedtask_congruent; 2=blockedtask_incongruent; 3= imagery]
/onexptend = [values.completed = 1]
</expt>
This is my batch:
<parameters>
/ DiffThreshold1 = 0
</parameters>
<values>
/ DiffThreshold1 = 0
</values>
<batch assoc>
/ file = "learningtsk.iqx"
/ file = "stairc.iqx"
/ file = "maintask_15.iqx"
/ file = "maintask_16.iqx"
/ file = "maintask_17.iqx"
/ file = "maintask_18.iqx"
/ file = "maintask_19.iqx"
/ file = "maintask_20.iqx"
/ file = "maintask_21.iqx"
/ file = "maintask_22.iqx"
/ file = "maintask_23.iqx"
/ file = "maintask_24.iqx"
/ file = "maintask_25.iqx"
/ file = "maintask_26.iqx"
/ file = "maintask_27.iqx"
/ file = "finaltask_28.iqx"
/ file = "maintask_29.iqx"
/ onscriptend = [
if (batch.assoc.currentscript == "stairc.iqx")
{
parameters.DiffThreshold1 = values.DiffThreshold1;
}
]
</batch>
Many thanks for your help.