Perceptual Vigilance Task


Author
Message
Eric del Rio
Eric del Rio
Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)
Group: Forum Members
Posts: 10, Visits: 29
Hi Millisecond Forum, I am new to Inquisit and am excited to run my first experiment on it. I am attempting to adapt the Perceptual Vigilance task to my methods, but instead of having the red circle be the target stimulus, I would like to have one of 3 image stimulus combinations for each trial.  When there is not a target stimulus, I would like there to be a non-target stimulus at all times on the screen. (I accomplished this by adding / bgstim to blocks).

The issue I've been having is replacing the target circle with my images (in <trials>). I would ideally like to have 3 different stimuli combinations appear at the same intervals that the circle would.

So far, I have this, which works for <trial start>, but after a response to the first target, the other target just sits around and doesn't change when a response is required. There should also be an interval before it appears. 

Being new to this program, I'm not sure if this is enough information, but would appreciate any input the community may have to offer.

Thanks!
Eric


<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

Note:
Main trial: presents the fixationcross and the stimulus (either in a fixed position or randomly) and waits for mouse click
<trial TargFace>
/ stimulusframes = [2 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);
]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>






Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargFace]
</trial>

Attachments
Test2 Adjusting PArameters.iqx (609 views, 18.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
Eric del Rio - Sunday, February 26, 2017
Hi Millisecond Forum, I am new to Inquisit and am excited to run my first experiment on it. I am attempting to adapt the Perceptual Vigilance task to my methods, but instead of having the red circle be the target stimulus, I would like to have one of 3 image stimulus combinations for each trial.  When there is not a target stimulus, I would like there to be a non-target stimulus at all times on the screen. (I accomplished this by adding / bgstim to blocks).

The issue I've been having is replacing the target circle with my images (in <trials>). I would ideally like to have 3 different stimuli combinations appear at the same intervals that the circle would.

So far, I have this, which works for <trial start>, but after a response to the first target, the other target just sits around and doesn't change when a response is required. There should also be an interval before it appears. 

Being new to this program, I'm not sure if this is enough information, but would appreciate any input the community may have to offer.

Thanks!
Eric


<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

Note:
Main trial: presents the fixationcross and the stimulus (either in a fixed position or randomly) and waits for mouse click
<trial TargFace>
/ stimulusframes = [2 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);
]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>






Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargFace]
</trial>

Sorry, I can't figure out what you want to do -- neither based on your description, nor based on the (non-working) code.

What I can tell you is that this

trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);

is wrong. You cannot insert multiple stimuli with a *single* call to the insertstimulustime() function. If you wanted to insert both picture.targetface and picture.nonbp at the same time in the trial, this ought to read

trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

Please provide a clearer description of what you want to achieve and importantly please reference the objects you are referring to exactly as they are *named* in the code.

Thanks.


Eric del Rio
Eric del Rio
Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)
Group: Forum Members
Posts: 10, Visits: 29
Dave - Monday, February 27, 2017
Eric del Rio - Sunday, February 26, 2017
Hi Millisecond Forum, I am new to Inquisit and am excited to run my first experiment on it. I am attempting to adapt the Perceptual Vigilance task to my methods, but instead of having the red circle be the target stimulus, I would like to have one of 3 image stimulus combinations for each trial. A trial will be every time the participant is required to respond and the time before the event.  When there is not a target stimulus, I would like there to be two non-target stimuli at all times on the screen. (I accomplished this by adding / bgstim to blocks).

The issue I've been having is replacing the target circle with my images (in <trials>). I would ideally like to have 3 different stimuli combinations appear at the same intervals that the circle would.

So far, I have this, which works for <trial start>, but after a response to the first target, the other target just sits around and doesn't change when a response is required. There should also be an interval before it appears. 

Being new to this program, I'm not sure if this is enough information, but would appreciate any input the community may have to offer.

Thanks!
Eric


<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

Note:
Main trial: presents the fixationcross and the stimulus (either in a fixed position or randomly) and waits for mouse click
<trial TargFace>
/ stimulusframes = [2 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);
]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>






Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargFace]
</trial>

Sorry, I can't figure out what you want to do -- neither based on your description, nor based on the (non-working) code.

What I can tell you is that this

trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);

is wrong. You cannot insert multiple stimuli with a *single* call to the insertstimulustime() function. If you wanted to insert both picture.targetface and picture.nonbp at the same time in the trial, this ought to read

trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

Please provide a clearer description of what you want to achieve and importantly please reference the objects you are referring to exactly as they are *named* in the code.

Thanks.


Hi Dave, Thanks so much for your help!

So to give a more detailed explanation of what I want to do:
I am trying to adapt this perceptual vigilance task so that instead of a red circle appearing in the middle of the screen at "stimulusinterval" I would like the program to select randomly between 3 combinations (trial.TargFace, trial.TargBoth, Trial.BP) of 4 stimuli (picture.NonFace, picture.TargetFace, picture.NonBP, picture.TargetBP) and present them for the participant to respond to at stimulusinterval. The combinations I would like are: TargFace = NonBP, TargetFace; TargBP = NonFace, Target.BP; TargBoth = TargetFace, TargetBP.  When there is not a target event, I would like NonFace, NonBP to be present which I believe I have achieved by using (/ bgstim) in the block area.

After following your advice, the test is working except that it is only selecting TargBoth as a trial instead of switching between the three combinations.  I tried to remedy this by making <list stimulusorder> but I think I have made a mistake here. I also think that there is something wrong with the way that I did the / branch code at the end of each of my trials.  Maybe it has to do with how the block code is written?

Do you have any recommendations for how I may accomplish my goal?

Note: I pasted below the parts I'm talking about below with question areas in bold. I also attached the full script if that is easier to navigate

Thanks, 

Eric

*******************************************************************************************************************
*******************************************************************************************************************
Intervals
*******************************************************************************************************************
*******************************************************************************************************************

<list stimulusinterval>
/ items = (1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000)
/ replace = true
/ selectionrate = trial
</list>


<list stimulusorder>
/ items = (trial.TargBoth, trial.TargBP, trial.TargFace)
/ replace = true
/ selectionrate = trial
</list>


*******************************************************************************************************************
*******************************************************************************************************************
STIMULI
*******************************************************************************************************************
*******************************************************************************************************************

<picture NonBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture NonFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

<picture TargetBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture TargetFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

Note: This presents the first dummy stimulus to start the responses
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Note: This is the FACE Target Trial
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargFace>
/ stimulusframes = [1 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>
^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BOTH targets appear
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBoth>
/ stimulusframes = [2 = TargetBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBoth.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.TargetBP, values.stiminterval);

]
/ontrialend = [trial.TargBoth.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBoth.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBoth.response == "lbuttondown" || trial.TargBoth.response == "rbuttondown") {
values.rt = trial.TargBoth.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BP Target Appears
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargBP.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBP.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBP.response == "lbuttondown" || trial.TargBP.response == "rbuttondown") {
values.rt = trial.TargBP.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargBP]
</trial>

*******************************************************************************************************************
*******************************************************************************************************************
BLOCKS
*******************************************************************************************************************
*******************************************************************************************************************

Note: this is the main block provided. It runs a specified amount of time with either a fixed or a
random position for the target.

Note: bgstim makes the background show non-target stimuli
<block Target>
/ bgstim = (NonBP, NonFace)
/ trials = [1 = start; 2 = list.stimulusorder]
/ onblockbegin = [block.Target.screencolor = parameters.screencolor]
/timeout = parameters.testduration
</block>










Attachments
Test 3.iqx (580 views, 20.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
Eric del Rio - Sunday, March 5, 2017
Dave - Monday, February 27, 2017
Eric del Rio - Sunday, February 26, 2017
Hi Millisecond Forum, I am new to Inquisit and am excited to run my first experiment on it. I am attempting to adapt the Perceptual Vigilance task to my methods, but instead of having the red circle be the target stimulus, I would like to have one of 3 image stimulus combinations for each trial. A trial will be every time the participant is required to respond and the time before the event.  When there is not a target stimulus, I would like there to be two non-target stimuli at all times on the screen. (I accomplished this by adding / bgstim to blocks).

The issue I've been having is replacing the target circle with my images (in <trials>). I would ideally like to have 3 different stimuli combinations appear at the same intervals that the circle would.

So far, I have this, which works for <trial start>, but after a response to the first target, the other target just sits around and doesn't change when a response is required. There should also be an interval before it appears. 

Being new to this program, I'm not sure if this is enough information, but would appreciate any input the community may have to offer.

Thanks!
Eric


<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

Note:
Main trial: presents the fixationcross and the stimulus (either in a fixed position or randomly) and waits for mouse click
<trial TargFace>
/ stimulusframes = [2 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);
]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>






Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargFace]
</trial>

Sorry, I can't figure out what you want to do -- neither based on your description, nor based on the (non-working) code.

What I can tell you is that this

trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);

is wrong. You cannot insert multiple stimuli with a *single* call to the insertstimulustime() function. If you wanted to insert both picture.targetface and picture.nonbp at the same time in the trial, this ought to read

trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

Please provide a clearer description of what you want to achieve and importantly please reference the objects you are referring to exactly as they are *named* in the code.

Thanks.


Hi Dave, Thanks so much for your help!

So to give a more detailed explanation of what I want to do:
I am trying to adapt this perceptual vigilance task so that instead of a red circle appearing in the middle of the screen at "stimulusinterval" I would like the program to select randomly between 3 combinations (trial.TargFace, trial.TargBoth, Trial.BP) of 4 stimuli (picture.NonFace, picture.TargetFace, picture.NonBP, picture.TargetBP) and present them for the participant to respond to at stimulusinterval. The combinations I would like are: TargFace = NonBP, TargetFace; TargBP = NonFace, Target.BP; TargBoth = TargetFace, TargetBP.  When there is not a target event, I would like NonFace, NonBP to be present which I believe I have achieved by using (/ bgstim) in the block area.

After following your advice, the test is working except that it is only selecting TargBoth as a trial instead of switching between the three combinations.  I tried to remedy this by making <list stimulusorder> but I think I have made a mistake here. I also think that there is something wrong with the way that I did the / branch code at the end of each of my trials.  Maybe it has to do with how the block code is written?

Do you have any recommendations for how I may accomplish my goal?

Note: I pasted below the parts I'm talking about below with question areas in bold. I also attached the full script if that is easier to navigate

Thanks, 

Eric

*******************************************************************************************************************
*******************************************************************************************************************
Intervals
*******************************************************************************************************************
*******************************************************************************************************************

<list stimulusinterval>
/ items = (1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000)
/ replace = true
/ selectionrate = trial
</list>


<list stimulusorder>
/ items = (trial.TargBoth, trial.TargBP, trial.TargFace)
/ replace = true
/ selectionrate = trial
</list>


*******************************************************************************************************************
*******************************************************************************************************************
STIMULI
*******************************************************************************************************************
*******************************************************************************************************************

<picture NonBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture NonFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

<picture TargetBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture TargetFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

Note: This presents the first dummy stimulus to start the responses
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Note: This is the FACE Target Trial
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargFace>
/ stimulusframes = [1 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>
^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BOTH targets appear
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBoth>
/ stimulusframes = [2 = TargetBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBoth.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.TargetBP, values.stiminterval);

]
/ontrialend = [trial.TargBoth.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBoth.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBoth.response == "lbuttondown" || trial.TargBoth.response == "rbuttondown") {
values.rt = trial.TargBoth.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BP Target Appears
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargBP.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBP.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBP.response == "lbuttondown" || trial.TargBP.response == "rbuttondown") {
values.rt = trial.TargBP.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargBP]
</trial>

*******************************************************************************************************************
*******************************************************************************************************************
BLOCKS
*******************************************************************************************************************
*******************************************************************************************************************

Note: this is the main block provided. It runs a specified amount of time with either a fixed or a
random position for the target.

Note: bgstim makes the background show non-target stimuli
<block Target>
/ bgstim = (NonBP, NonFace)
/ trials = [1 = start; 2 = list.stimulusorder]
/ onblockbegin = [block.Target.screencolor = parameters.screencolor]
/timeout = parameters.testduration
</block>










You say the combination you want for <trial TargBP> is "TargBP = NonFace, Target.BP"

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;

   
values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.NonBP, values.stiminterval);

Then the above is wrong, and ought to read

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;

   
values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.NonFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.TargetBP, values.stiminterval);

#2: to /branch to a <trial> element selected from a <list>, the proper syntax is

/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder.nextvalue]

Crucially, if you run the RT feedback trial -- which you do -- you need to adjust the /branch there as well. I.e.,

<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargBP]
</trial>

is wrong and ought to read

<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [list.stimulusorder.nextvalue]
</trial>




Eric del Rio
Eric del Rio
Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)
Group: Forum Members
Posts: 10, Visits: 29
Dave - Sunday, March 5, 2017
Eric del Rio - Sunday, March 5, 2017
Dave - Monday, February 27, 2017
Eric del Rio - Sunday, February 26, 2017
Hi Millisecond Forum, I am new to Inquisit and am excited to run my first experiment on it. I am attempting to adapt the Perceptual Vigilance task to my methods, but instead of having the red circle be the target stimulus, I would like to have one of 3 image stimulus combinations for each trial. A trial will be every time the participant is required to respond and the time before the event.  When there is not a target stimulus, I would like there to be two non-target stimuli at all times on the screen. (I accomplished this by adding / bgstim to blocks).

The issue I've been having is replacing the target circle with my images (in <trials>). I would ideally like to have 3 different stimuli combinations appear at the same intervals that the circle would.

So far, I have this, which works for <trial start>, but after a response to the first target, the other target just sits around and doesn't change when a response is required. There should also be an interval before it appears. 

Being new to this program, I'm not sure if this is enough information, but would appreciate any input the community may have to offer.

Thanks!
Eric


<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

Note:
Main trial: presents the fixationcross and the stimulus (either in a fixed position or randomly) and waits for mouse click
<trial TargFace>
/ stimulusframes = [2 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);
]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>






Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargFace]
</trial>

Sorry, I can't figure out what you want to do -- neither based on your description, nor based on the (non-working) code.

What I can tell you is that this

trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);

is wrong. You cannot insert multiple stimuli with a *single* call to the insertstimulustime() function. If you wanted to insert both picture.targetface and picture.nonbp at the same time in the trial, this ought to read

trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

Please provide a clearer description of what you want to achieve and importantly please reference the objects you are referring to exactly as they are *named* in the code.

Thanks.


Hi Dave, Thanks so much for your help!

So to give a more detailed explanation of what I want to do:
I am trying to adapt this perceptual vigilance task so that instead of a red circle appearing in the middle of the screen at "stimulusinterval" I would like the program to select randomly between 3 combinations (trial.TargFace, trial.TargBoth, Trial.BP) of 4 stimuli (picture.NonFace, picture.TargetFace, picture.NonBP, picture.TargetBP) and present them for the participant to respond to at stimulusinterval. The combinations I would like are: TargFace = NonBP, TargetFace; TargBP = NonFace, Target.BP; TargBoth = TargetFace, TargetBP.  When there is not a target event, I would like NonFace, NonBP to be present which I believe I have achieved by using (/ bgstim) in the block area.

After following your advice, the test is working except that it is only selecting TargBoth as a trial instead of switching between the three combinations.  I tried to remedy this by making <list stimulusorder> but I think I have made a mistake here. I also think that there is something wrong with the way that I did the / branch code at the end of each of my trials.  Maybe it has to do with how the block code is written?

Do you have any recommendations for how I may accomplish my goal?

Note: I pasted below the parts I'm talking about below with question areas in bold. I also attached the full script if that is easier to navigate

Thanks, 

Eric

*******************************************************************************************************************
*******************************************************************************************************************
Intervals
*******************************************************************************************************************
*******************************************************************************************************************

<list stimulusinterval>
/ items = (1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000)
/ replace = true
/ selectionrate = trial
</list>


<list stimulusorder>
/ items = (trial.TargBoth, trial.TargBP, trial.TargFace)
/ replace = true
/ selectionrate = trial
</list>


*******************************************************************************************************************
*******************************************************************************************************************
STIMULI
*******************************************************************************************************************
*******************************************************************************************************************

<picture NonBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture NonFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

<picture TargetBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture TargetFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

Note: This presents the first dummy stimulus to start the responses
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Note: This is the FACE Target Trial
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargFace>
/ stimulusframes = [1 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>
^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BOTH targets appear
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBoth>
/ stimulusframes = [2 = TargetBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBoth.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.TargetBP, values.stiminterval);

]
/ontrialend = [trial.TargBoth.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBoth.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBoth.response == "lbuttondown" || trial.TargBoth.response == "rbuttondown") {
values.rt = trial.TargBoth.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BP Target Appears
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargBP.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBP.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBP.response == "lbuttondown" || trial.TargBP.response == "rbuttondown") {
values.rt = trial.TargBP.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargBP]
</trial>

*******************************************************************************************************************
*******************************************************************************************************************
BLOCKS
*******************************************************************************************************************
*******************************************************************************************************************

Note: this is the main block provided. It runs a specified amount of time with either a fixed or a
random position for the target.

Note: bgstim makes the background show non-target stimuli
<block Target>
/ bgstim = (NonBP, NonFace)
/ trials = [1 = start; 2 = list.stimulusorder]
/ onblockbegin = [block.Target.screencolor = parameters.screencolor]
/timeout = parameters.testduration
</block>










You say the combination you want for <trial TargBP> is "TargBP = NonFace, Target.BP"

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;

   
values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.NonBP, values.stiminterval);

Then the above is wrong, and ought to read

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;

   
values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.NonFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.TargetBP, values.stiminterval);

#2: to /branch to a <trial> element selected from a <list>, the proper syntax is

/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder.nextvalue]

Crucially, if you run the RT feedback trial -- which you do -- you need to adjust the /branch there as well. I.e.,

<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargBP]
</trial>

is wrong and ought to read

<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [list.stimulusorder.nextvalue]
</trial>




Hi Dave,
Again, thanks so much for your help.

There still seems to be an issue with the selecting of stimulus. When I run the program, there are still target images before a target event has happened (instead of having just the /bgstim (picture.NonFace, picture.NonBP).

I also suspect that the program is not providing the two stimulus at the same time for each trial, but selecting separate stimulus intervals for them.

values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.NonFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.TargetBP, values.stiminterval);

maybe that is because of the lines above?

An example of what is happening is that NonBP and TargetFace appear immediately after a response to a previous combination, then, after a stimulusinterval, they allow for a response. What should happen is that after a response to a combination NonBP and NonFace should appear, and after a stimulus interval, one of the three target combinations should appear.


Would it make more sense to create some number of non-target trials that require no response and mix them into the order below?  Or is it possible to use /bgstim to have the non-target stimuli remain on the screen whenever they are not covered by a target pair?

<list stimulusorder>
/ items = [trial.TargFace; trial.TargBoth; trial.TargBP]
/ replace = true
/ selectionrate = trial
</list>


Thanks,

Eric


Attachments
Test 5.iqx (547 views, 21.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
Eric del Rio - Monday, March 6, 2017
Dave - Sunday, March 5, 2017
Eric del Rio - Sunday, March 5, 2017
Dave - Monday, February 27, 2017
Eric del Rio - Sunday, February 26, 2017
Hi Millisecond Forum, I am new to Inquisit and am excited to run my first experiment on it. I am attempting to adapt the Perceptual Vigilance task to my methods, but instead of having the red circle be the target stimulus, I would like to have one of 3 image stimulus combinations for each trial. A trial will be every time the participant is required to respond and the time before the event.  When there is not a target stimulus, I would like there to be two non-target stimuli at all times on the screen. (I accomplished this by adding / bgstim to blocks).

The issue I've been having is replacing the target circle with my images (in <trials>). I would ideally like to have 3 different stimuli combinations appear at the same intervals that the circle would.

So far, I have this, which works for <trial start>, but after a response to the first target, the other target just sits around and doesn't change when a response is required. There should also be an interval before it appears. 

Being new to this program, I'm not sure if this is enough information, but would appreciate any input the community may have to offer.

Thanks!
Eric


<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

Note:
Main trial: presents the fixationcross and the stimulus (either in a fixed position or randomly) and waits for mouse click
<trial TargFace>
/ stimulusframes = [2 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);
]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>






Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargFace]
</trial>

Sorry, I can't figure out what you want to do -- neither based on your description, nor based on the (non-working) code.

What I can tell you is that this

trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);

is wrong. You cannot insert multiple stimuli with a *single* call to the insertstimulustime() function. If you wanted to insert both picture.targetface and picture.nonbp at the same time in the trial, this ought to read

trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

Please provide a clearer description of what you want to achieve and importantly please reference the objects you are referring to exactly as they are *named* in the code.

Thanks.


Hi Dave, Thanks so much for your help!

So to give a more detailed explanation of what I want to do:
I am trying to adapt this perceptual vigilance task so that instead of a red circle appearing in the middle of the screen at "stimulusinterval" I would like the program to select randomly between 3 combinations (trial.TargFace, trial.TargBoth, Trial.BP) of 4 stimuli (picture.NonFace, picture.TargetFace, picture.NonBP, picture.TargetBP) and present them for the participant to respond to at stimulusinterval. The combinations I would like are: TargFace = NonBP, TargetFace; TargBP = NonFace, Target.BP; TargBoth = TargetFace, TargetBP.  When there is not a target event, I would like NonFace, NonBP to be present which I believe I have achieved by using (/ bgstim) in the block area.

After following your advice, the test is working except that it is only selecting TargBoth as a trial instead of switching between the three combinations.  I tried to remedy this by making <list stimulusorder> but I think I have made a mistake here. I also think that there is something wrong with the way that I did the / branch code at the end of each of my trials.  Maybe it has to do with how the block code is written?

Do you have any recommendations for how I may accomplish my goal?

Note: I pasted below the parts I'm talking about below with question areas in bold. I also attached the full script if that is easier to navigate

Thanks, 

Eric

*******************************************************************************************************************
*******************************************************************************************************************
Intervals
*******************************************************************************************************************
*******************************************************************************************************************

<list stimulusinterval>
/ items = (1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000)
/ replace = true
/ selectionrate = trial
</list>


<list stimulusorder>
/ items = (trial.TargBoth, trial.TargBP, trial.TargFace)
/ replace = true
/ selectionrate = trial
</list>


*******************************************************************************************************************
*******************************************************************************************************************
STIMULI
*******************************************************************************************************************
*******************************************************************************************************************

<picture NonBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture NonFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

<picture TargetBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture TargetFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

Note: This presents the first dummy stimulus to start the responses
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Note: This is the FACE Target Trial
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargFace>
/ stimulusframes = [1 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>
^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BOTH targets appear
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBoth>
/ stimulusframes = [2 = TargetBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBoth.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.TargetBP, values.stiminterval);

]
/ontrialend = [trial.TargBoth.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBoth.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBoth.response == "lbuttondown" || trial.TargBoth.response == "rbuttondown") {
values.rt = trial.TargBoth.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BP Target Appears
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargBP.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBP.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBP.response == "lbuttondown" || trial.TargBP.response == "rbuttondown") {
values.rt = trial.TargBP.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargBP]
</trial>

*******************************************************************************************************************
*******************************************************************************************************************
BLOCKS
*******************************************************************************************************************
*******************************************************************************************************************

Note: this is the main block provided. It runs a specified amount of time with either a fixed or a
random position for the target.

Note: bgstim makes the background show non-target stimuli
<block Target>
/ bgstim = (NonBP, NonFace)
/ trials = [1 = start; 2 = list.stimulusorder]
/ onblockbegin = [block.Target.screencolor = parameters.screencolor]
/timeout = parameters.testduration
</block>










You say the combination you want for <trial TargBP> is "TargBP = NonFace, Target.BP"

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;

   
values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.NonBP, values.stiminterval);

Then the above is wrong, and ought to read

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;

   
values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.NonFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.TargetBP, values.stiminterval);

#2: to /branch to a <trial> element selected from a <list>, the proper syntax is

/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder.nextvalue]

Crucially, if you run the RT feedback trial -- which you do -- you need to adjust the /branch there as well. I.e.,

<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargBP]
</trial>

is wrong and ought to read

<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [list.stimulusorder.nextvalue]
</trial>




Hi Dave,
Again, thanks so much for your help.

There still seems to be an issue with the selecting of stimulus. When I run the program, there are still target images before a target event has happened (instead of having just the /bgstim (picture.NonFace, picture.NonBP).

I also suspect that the program is not providing the two stimulus at the same time for each trial, but selecting separate stimulus intervals for them.

values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.NonFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.TargetBP, values.stiminterval);

maybe that is because of the lines above?

An example of what is happening is that NonBP and TargetFace appear immediately after a response to a previous combination, then, after a stimulusinterval, they allow for a response. What should happen is that after a response to a combination NonBP and NonFace should appear, and after a stimulus interval, one of the three target combinations should appear.


Would it make more sense to create some number of non-target trials that require no response and mix them into the order below?  Or is it possible to use /bgstim to have the non-target stimuli remain on the screen whenever they are not covered by a target pair?

<list stimulusorder>
/ items = [trial.TargFace; trial.TargBoth; trial.TargBP]
/ replace = true
/ selectionrate = trial
</list>


Thanks,

Eric


I think you misunderstand how /bgstim works and is supposed to work: Any stimulus drawn to the screen via /bgstim is drawn *exactly once* and once only at the very start of the <block>. Those stimuli will not be re-drawn and if they are overwritten by any other stimuli drawn to the screen by any of the trials in the block, the background stimuli are gone.

> When I run the program, there are still target images before a target event has happened

<trial TargFace>
/ stimulusframes = [1 = NonBP, TargetFace]
...
</trial>

That's because you have *instructed* your trials to draw them to the screen in its very first frame.

> instead of having just the /bgstim (picture.NonFace, picture.NonBP)

Then that's what you trials should actually draw to the screen at the very start

/ stimulusframes = [1 = NonBP, NonFace]

>
I also suspect that the program is not providing the two stimulus at the same time for each trial, but selecting separate stimulus intervals for them

No.


Eric del Rio
Eric del Rio
Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)
Group: Forum Members
Posts: 10, Visits: 29
Dave - Monday, March 6, 2017
Eric del Rio - Monday, March 6, 2017
Dave - Sunday, March 5, 2017
Eric del Rio - Sunday, March 5, 2017
Dave - Monday, February 27, 2017
Eric del Rio - Sunday, February 26, 2017
Hi Millisecond Forum, I am new to Inquisit and am excited to run my first experiment on it. I am attempting to adapt the Perceptual Vigilance task to my methods, but instead of having the red circle be the target stimulus, I would like to have one of 3 image stimulus combinations for each trial. A trial will be every time the participant is required to respond and the time before the event.  When there is not a target stimulus, I would like there to be two non-target stimuli at all times on the screen. (I accomplished this by adding / bgstim to blocks).

The issue I've been having is replacing the target circle with my images (in <trials>). I would ideally like to have 3 different stimuli combinations appear at the same intervals that the circle would.

So far, I have this, which works for <trial start>, but after a response to the first target, the other target just sits around and doesn't change when a response is required. There should also be an interval before it appears. 

Being new to this program, I'm not sure if this is enough information, but would appreciate any input the community may have to offer.

Thanks!
Eric


<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

Note:
Main trial: presents the fixationcross and the stimulus (either in a fixed position or randomly) and waits for mouse click
<trial TargFace>
/ stimulusframes = [2 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);
]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>






Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargFace]
</trial>

Sorry, I can't figure out what you want to do -- neither based on your description, nor based on the (non-working) code.

What I can tell you is that this

trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);

is wrong. You cannot insert multiple stimuli with a *single* call to the insertstimulustime() function. If you wanted to insert both picture.targetface and picture.nonbp at the same time in the trial, this ought to read

trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

Please provide a clearer description of what you want to achieve and importantly please reference the objects you are referring to exactly as they are *named* in the code.

Thanks.


Hi Dave, Thanks so much for your help!

So to give a more detailed explanation of what I want to do:
I am trying to adapt this perceptual vigilance task so that instead of a red circle appearing in the middle of the screen at "stimulusinterval" I would like the program to select randomly between 3 combinations (trial.TargFace, trial.TargBoth, Trial.BP) of 4 stimuli (picture.NonFace, picture.TargetFace, picture.NonBP, picture.TargetBP) and present them for the participant to respond to at stimulusinterval. The combinations I would like are: TargFace = NonBP, TargetFace; TargBP = NonFace, Target.BP; TargBoth = TargetFace, TargetBP.  When there is not a target event, I would like NonFace, NonBP to be present which I believe I have achieved by using (/ bgstim) in the block area.

After following your advice, the test is working except that it is only selecting TargBoth as a trial instead of switching between the three combinations.  I tried to remedy this by making <list stimulusorder> but I think I have made a mistake here. I also think that there is something wrong with the way that I did the / branch code at the end of each of my trials.  Maybe it has to do with how the block code is written?

Do you have any recommendations for how I may accomplish my goal?

Note: I pasted below the parts I'm talking about below with question areas in bold. I also attached the full script if that is easier to navigate

Thanks, 

Eric

*******************************************************************************************************************
*******************************************************************************************************************
Intervals
*******************************************************************************************************************
*******************************************************************************************************************

<list stimulusinterval>
/ items = (1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000)
/ replace = true
/ selectionrate = trial
</list>


<list stimulusorder>
/ items = (trial.TargBoth, trial.TargBP, trial.TargFace)
/ replace = true
/ selectionrate = trial
</list>


*******************************************************************************************************************
*******************************************************************************************************************
STIMULI
*******************************************************************************************************************
*******************************************************************************************************************

<picture NonBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture NonFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

<picture TargetBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture TargetFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

Note: This presents the first dummy stimulus to start the responses
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Note: This is the FACE Target Trial
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargFace>
/ stimulusframes = [1 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>
^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BOTH targets appear
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBoth>
/ stimulusframes = [2 = TargetBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBoth.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.TargetBP, values.stiminterval);

]
/ontrialend = [trial.TargBoth.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBoth.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBoth.response == "lbuttondown" || trial.TargBoth.response == "rbuttondown") {
values.rt = trial.TargBoth.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BP Target Appears
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargBP.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBP.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBP.response == "lbuttondown" || trial.TargBP.response == "rbuttondown") {
values.rt = trial.TargBP.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargBP]
</trial>

*******************************************************************************************************************
*******************************************************************************************************************
BLOCKS
*******************************************************************************************************************
*******************************************************************************************************************

Note: this is the main block provided. It runs a specified amount of time with either a fixed or a
random position for the target.

Note: bgstim makes the background show non-target stimuli
<block Target>
/ bgstim = (NonBP, NonFace)
/ trials = [1 = start; 2 = list.stimulusorder]
/ onblockbegin = [block.Target.screencolor = parameters.screencolor]
/timeout = parameters.testduration
</block>










You say the combination you want for <trial TargBP> is "TargBP = NonFace, Target.BP"

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;

   
values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.NonBP, values.stiminterval);

Then the above is wrong, and ought to read

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;

   
values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.NonFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.TargetBP, values.stiminterval);

#2: to /branch to a <trial> element selected from a <list>, the proper syntax is

/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder.nextvalue]

Crucially, if you run the RT feedback trial -- which you do -- you need to adjust the /branch there as well. I.e.,

<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargBP]
</trial>

is wrong and ought to read

<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [list.stimulusorder.nextvalue]
</trial>




Hi Dave,
Again, thanks so much for your help.

There still seems to be an issue with the selecting of stimulus. When I run the program, there are still target images before a target event has happened (instead of having just the /bgstim (picture.NonFace, picture.NonBP).

I also suspect that the program is not providing the two stimulus at the same time for each trial, but selecting separate stimulus intervals for them.

values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.NonFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.TargetBP, values.stiminterval);

maybe that is because of the lines above?

An example of what is happening is that NonBP and TargetFace appear immediately after a response to a previous combination, then, after a stimulusinterval, they allow for a response. What should happen is that after a response to a combination NonBP and NonFace should appear, and after a stimulus interval, one of the three target combinations should appear.


Would it make more sense to create some number of non-target trials that require no response and mix them into the order below?  Or is it possible to use /bgstim to have the non-target stimuli remain on the screen whenever they are not covered by a target pair?

<list stimulusorder>
/ items = [trial.TargFace; trial.TargBoth; trial.TargBP]
/ replace = true
/ selectionrate = trial
</list>


Thanks,

Eric


I think you misunderstand how /bgstim works and is supposed to work: Any stimulus drawn to the screen via /bgstim is drawn *exactly once* and once only at the very start of the <block>. Those stimuli will not be re-drawn and if they are overwritten by any other stimuli drawn to the screen by any of the trials in the block, the background stimuli are gone.

> When I run the program, there are still target images before a target event has happened

<trial TargFace>
/ stimulusframes = [1 = NonBP, TargetFace]
...
</trial>

That's because you have *instructed* your trials to draw them to the screen in its very first frame.

> instead of having just the /bgstim (picture.NonFace, picture.NonBP)

Then that's what you trials should actually draw to the screen at the very start

/ stimulusframes = [1 = NonBP, NonFace]

>
I also suspect that the program is not providing the two stimulus at the same time for each trial, but selecting separate stimulus intervals for them

No.


Alright, I see what I was doing wrong there. The program seems to be working great now. Many Thanks.

I have one more thing I could use some help with:

I would like the program to collect not only correct response and latency. (values.rt, and response below in <data>), but also collect when participants respond incorrectly, for example tral.Targboth.latency < values.stiminterval. What column should I add to collect this?

*************************'
(raw data)
<data>
/ columns = (build, computer.platform, time, subject, blockcode, trialcode, trialnum, parameters.testduration,
parameters.fixed,
values.stiminterval, response, values.rt, correct)


Also, I think I need to put something at the trial level to tell it to collect this data during the trial, but I cannot find the correct expression. Is it noreplacenorepeat? 

<trial TargBoth>
/ stimulusframes = [1 = NonBP, NonFace]
/ ontrialbegin = [
values.rt = 0;

values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBoth.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBoth.insertstimulustime(picture.TargetBP, values.stiminterval);

]
/ontrialend = [trial.TargBoth.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBoth.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBoth.response == "lbuttondown" || trial.TargBoth.response == "rbuttondown") {
values.rt = trial.TargBoth.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder.nextvalue]
</trial>

Thanks again for your help, you truly are a supreme being.
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
Eric del Rio - Wednesday, March 8, 2017
Dave - Monday, March 6, 2017
Eric del Rio - Monday, March 6, 2017
Dave - Sunday, March 5, 2017
Eric del Rio - Sunday, March 5, 2017
Dave - Monday, February 27, 2017
Eric del Rio - Sunday, February 26, 2017
Hi Millisecond Forum, I am new to Inquisit and am excited to run my first experiment on it. I am attempting to adapt the Perceptual Vigilance task to my methods, but instead of having the red circle be the target stimulus, I would like to have one of 3 image stimulus combinations for each trial. A trial will be every time the participant is required to respond and the time before the event.  When there is not a target stimulus, I would like there to be two non-target stimuli at all times on the screen. (I accomplished this by adding / bgstim to blocks).

The issue I've been having is replacing the target circle with my images (in <trials>). I would ideally like to have 3 different stimuli combinations appear at the same intervals that the circle would.

So far, I have this, which works for <trial start>, but after a response to the first target, the other target just sits around and doesn't change when a response is required. There should also be an interval before it appears. 

Being new to this program, I'm not sure if this is enough information, but would appreciate any input the community may have to offer.

Thanks!
Eric


<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

Note:
Main trial: presents the fixationcross and the stimulus (either in a fixed position or randomly) and waits for mouse click
<trial TargFace>
/ stimulusframes = [2 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);
]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>






Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargFace]
</trial>

Sorry, I can't figure out what you want to do -- neither based on your description, nor based on the (non-working) code.

What I can tell you is that this

trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);

is wrong. You cannot insert multiple stimuli with a *single* call to the insertstimulustime() function. If you wanted to insert both picture.targetface and picture.nonbp at the same time in the trial, this ought to read

trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

Please provide a clearer description of what you want to achieve and importantly please reference the objects you are referring to exactly as they are *named* in the code.

Thanks.


Hi Dave, Thanks so much for your help!

So to give a more detailed explanation of what I want to do:
I am trying to adapt this perceptual vigilance task so that instead of a red circle appearing in the middle of the screen at "stimulusinterval" I would like the program to select randomly between 3 combinations (trial.TargFace, trial.TargBoth, Trial.BP) of 4 stimuli (picture.NonFace, picture.TargetFace, picture.NonBP, picture.TargetBP) and present them for the participant to respond to at stimulusinterval. The combinations I would like are: TargFace = NonBP, TargetFace; TargBP = NonFace, Target.BP; TargBoth = TargetFace, TargetBP.  When there is not a target event, I would like NonFace, NonBP to be present which I believe I have achieved by using (/ bgstim) in the block area.

After following your advice, the test is working except that it is only selecting TargBoth as a trial instead of switching between the three combinations.  I tried to remedy this by making <list stimulusorder> but I think I have made a mistake here. I also think that there is something wrong with the way that I did the / branch code at the end of each of my trials.  Maybe it has to do with how the block code is written?

Do you have any recommendations for how I may accomplish my goal?

Note: I pasted below the parts I'm talking about below with question areas in bold. I also attached the full script if that is easier to navigate

Thanks, 

Eric

*******************************************************************************************************************
*******************************************************************************************************************
Intervals
*******************************************************************************************************************
*******************************************************************************************************************

<list stimulusinterval>
/ items = (1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000)
/ replace = true
/ selectionrate = trial
</list>


<list stimulusorder>
/ items = (trial.TargBoth, trial.TargBP, trial.TargFace)
/ replace = true
/ selectionrate = trial
</list>


*******************************************************************************************************************
*******************************************************************************************************************
STIMULI
*******************************************************************************************************************
*******************************************************************************************************************

<picture NonBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture NonFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

<picture TargetBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture TargetFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

Note: This presents the first dummy stimulus to start the responses
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Note: This is the FACE Target Trial
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargFace>
/ stimulusframes = [1 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>
^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BOTH targets appear
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBoth>
/ stimulusframes = [2 = TargetBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBoth.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.TargetBP, values.stiminterval);

]
/ontrialend = [trial.TargBoth.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBoth.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBoth.response == "lbuttondown" || trial.TargBoth.response == "rbuttondown") {
values.rt = trial.TargBoth.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BP Target Appears
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargBP.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBP.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBP.response == "lbuttondown" || trial.TargBP.response == "rbuttondown") {
values.rt = trial.TargBP.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargBP]
</trial>

*******************************************************************************************************************
*******************************************************************************************************************
BLOCKS
*******************************************************************************************************************
*******************************************************************************************************************

Note: this is the main block provided. It runs a specified amount of time with either a fixed or a
random position for the target.

Note: bgstim makes the background show non-target stimuli
<block Target>
/ bgstim = (NonBP, NonFace)
/ trials = [1 = start; 2 = list.stimulusorder]
/ onblockbegin = [block.Target.screencolor = parameters.screencolor]
/timeout = parameters.testduration
</block>










You say the combination you want for <trial TargBP> is "TargBP = NonFace, Target.BP"

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;

   
values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.NonBP, values.stiminterval);

Then the above is wrong, and ought to read

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;

   
values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.NonFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.TargetBP, values.stiminterval);

#2: to /branch to a <trial> element selected from a <list>, the proper syntax is

/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder.nextvalue]

Crucially, if you run the RT feedback trial -- which you do -- you need to adjust the /branch there as well. I.e.,

<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargBP]
</trial>

is wrong and ought to read

<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [list.stimulusorder.nextvalue]
</trial>




Hi Dave,
Again, thanks so much for your help.

There still seems to be an issue with the selecting of stimulus. When I run the program, there are still target images before a target event has happened (instead of having just the /bgstim (picture.NonFace, picture.NonBP).

I also suspect that the program is not providing the two stimulus at the same time for each trial, but selecting separate stimulus intervals for them.

values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.NonFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.TargetBP, values.stiminterval);

maybe that is because of the lines above?

An example of what is happening is that NonBP and TargetFace appear immediately after a response to a previous combination, then, after a stimulusinterval, they allow for a response. What should happen is that after a response to a combination NonBP and NonFace should appear, and after a stimulus interval, one of the three target combinations should appear.


Would it make more sense to create some number of non-target trials that require no response and mix them into the order below?  Or is it possible to use /bgstim to have the non-target stimuli remain on the screen whenever they are not covered by a target pair?

<list stimulusorder>
/ items = [trial.TargFace; trial.TargBoth; trial.TargBP]
/ replace = true
/ selectionrate = trial
</list>


Thanks,

Eric


I think you misunderstand how /bgstim works and is supposed to work: Any stimulus drawn to the screen via /bgstim is drawn *exactly once* and once only at the very start of the <block>. Those stimuli will not be re-drawn and if they are overwritten by any other stimuli drawn to the screen by any of the trials in the block, the background stimuli are gone.

> When I run the program, there are still target images before a target event has happened

<trial TargFace>
/ stimulusframes = [1 = NonBP, TargetFace]
...
</trial>

That's because you have *instructed* your trials to draw them to the screen in its very first frame.

> instead of having just the /bgstim (picture.NonFace, picture.NonBP)

Then that's what you trials should actually draw to the screen at the very start

/ stimulusframes = [1 = NonBP, NonFace]

>
I also suspect that the program is not providing the two stimulus at the same time for each trial, but selecting separate stimulus intervals for them

No.


Alright, I see what I was doing wrong there. The program seems to be working great now. Many Thanks.

I have one more thing I could use some help with:

I would like the program to collect not only correct response and latency. (values.rt, and response below in <data>), but also collect when participants respond incorrectly, for example tral.Targboth.latency < values.stiminterval. What column should I add to collect this?

*************************'
(raw data)
<data>
/ columns = (build, computer.platform, time, subject, blockcode, trialcode, trialnum, parameters.testduration,
parameters.fixed,
values.stiminterval, response, values.rt, correct)


Also, I think I need to put something at the trial level to tell it to collect this data during the trial, but I cannot find the correct expression. Is it noreplacenorepeat? 

<trial TargBoth>
/ stimulusframes = [1 = NonBP, NonFace]
/ ontrialbegin = [
values.rt = 0;

values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBoth.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBoth.insertstimulustime(picture.TargetBP, values.stiminterval);

]
/ontrialend = [trial.TargBoth.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBoth.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBoth.response == "lbuttondown" || trial.TargBoth.response == "rbuttondown") {
values.rt = trial.TargBoth.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder.nextvalue]
</trial>

Thanks again for your help, you truly are a supreme being.

> but also collect when participants respond incorrectly, for example trial.Targboth.latency < values.stiminterval.

And incorrect response is distinct from the latency aspect. To clarify: You do realize that collecting a latency where "trial.Targboth.latency < values.stiminterval" would reflect a response that occurred *before* any target was shown, don't you? Why would you want to do that?

Eric del Rio
Eric del Rio
Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)
Group: Forum Members
Posts: 10, Visits: 29
Dave - Wednesday, March 8, 2017
Eric del Rio - Wednesday, March 8, 2017
Dave - Monday, March 6, 2017
Eric del Rio - Monday, March 6, 2017
Dave - Sunday, March 5, 2017
Eric del Rio - Sunday, March 5, 2017
Dave - Monday, February 27, 2017
Eric del Rio - Sunday, February 26, 2017
Hi Millisecond Forum, I am new to Inquisit and am excited to run my first experiment on it. I am attempting to adapt the Perceptual Vigilance task to my methods, but instead of having the red circle be the target stimulus, I would like to have one of 3 image stimulus combinations for each trial. A trial will be every time the participant is required to respond and the time before the event.  When there is not a target stimulus, I would like there to be two non-target stimuli at all times on the screen. (I accomplished this by adding / bgstim to blocks).

The issue I've been having is replacing the target circle with my images (in <trials>). I would ideally like to have 3 different stimuli combinations appear at the same intervals that the circle would.

So far, I have this, which works for <trial start>, but after a response to the first target, the other target just sits around and doesn't change when a response is required. There should also be an interval before it appears. 

Being new to this program, I'm not sure if this is enough information, but would appreciate any input the community may have to offer.

Thanks!
Eric


<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

Note:
Main trial: presents the fixationcross and the stimulus (either in a fixed position or randomly) and waits for mouse click
<trial TargFace>
/ stimulusframes = [2 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);
]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>






Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargFace]
</trial>

Sorry, I can't figure out what you want to do -- neither based on your description, nor based on the (non-working) code.

What I can tell you is that this

trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);

is wrong. You cannot insert multiple stimuli with a *single* call to the insertstimulustime() function. If you wanted to insert both picture.targetface and picture.nonbp at the same time in the trial, this ought to read

trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

Please provide a clearer description of what you want to achieve and importantly please reference the objects you are referring to exactly as they are *named* in the code.

Thanks.


Hi Dave, Thanks so much for your help!

So to give a more detailed explanation of what I want to do:
I am trying to adapt this perceptual vigilance task so that instead of a red circle appearing in the middle of the screen at "stimulusinterval" I would like the program to select randomly between 3 combinations (trial.TargFace, trial.TargBoth, Trial.BP) of 4 stimuli (picture.NonFace, picture.TargetFace, picture.NonBP, picture.TargetBP) and present them for the participant to respond to at stimulusinterval. The combinations I would like are: TargFace = NonBP, TargetFace; TargBP = NonFace, Target.BP; TargBoth = TargetFace, TargetBP.  When there is not a target event, I would like NonFace, NonBP to be present which I believe I have achieved by using (/ bgstim) in the block area.

After following your advice, the test is working except that it is only selecting TargBoth as a trial instead of switching between the three combinations.  I tried to remedy this by making <list stimulusorder> but I think I have made a mistake here. I also think that there is something wrong with the way that I did the / branch code at the end of each of my trials.  Maybe it has to do with how the block code is written?

Do you have any recommendations for how I may accomplish my goal?

Note: I pasted below the parts I'm talking about below with question areas in bold. I also attached the full script if that is easier to navigate

Thanks, 

Eric

*******************************************************************************************************************
*******************************************************************************************************************
Intervals
*******************************************************************************************************************
*******************************************************************************************************************

<list stimulusinterval>
/ items = (1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000)
/ replace = true
/ selectionrate = trial
</list>


<list stimulusorder>
/ items = (trial.TargBoth, trial.TargBP, trial.TargFace)
/ replace = true
/ selectionrate = trial
</list>


*******************************************************************************************************************
*******************************************************************************************************************
STIMULI
*******************************************************************************************************************
*******************************************************************************************************************

<picture NonBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture NonFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

<picture TargetBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture TargetFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

Note: This presents the first dummy stimulus to start the responses
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Note: This is the FACE Target Trial
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargFace>
/ stimulusframes = [1 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>
^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BOTH targets appear
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBoth>
/ stimulusframes = [2 = TargetBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBoth.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.TargetBP, values.stiminterval);

]
/ontrialend = [trial.TargBoth.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBoth.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBoth.response == "lbuttondown" || trial.TargBoth.response == "rbuttondown") {
values.rt = trial.TargBoth.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BP Target Appears
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargBP.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBP.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBP.response == "lbuttondown" || trial.TargBP.response == "rbuttondown") {
values.rt = trial.TargBP.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargBP]
</trial>

*******************************************************************************************************************
*******************************************************************************************************************
BLOCKS
*******************************************************************************************************************
*******************************************************************************************************************

Note: this is the main block provided. It runs a specified amount of time with either a fixed or a
random position for the target.

Note: bgstim makes the background show non-target stimuli
<block Target>
/ bgstim = (NonBP, NonFace)
/ trials = [1 = start; 2 = list.stimulusorder]
/ onblockbegin = [block.Target.screencolor = parameters.screencolor]
/timeout = parameters.testduration
</block>










You say the combination you want for <trial TargBP> is "TargBP = NonFace, Target.BP"

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;

   
values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.NonBP, values.stiminterval);

Then the above is wrong, and ought to read

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;

   
values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.NonFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.TargetBP, values.stiminterval);

#2: to /branch to a <trial> element selected from a <list>, the proper syntax is

/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder.nextvalue]

Crucially, if you run the RT feedback trial -- which you do -- you need to adjust the /branch there as well. I.e.,

<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargBP]
</trial>

is wrong and ought to read

<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [list.stimulusorder.nextvalue]
</trial>




Hi Dave,
Again, thanks so much for your help.

There still seems to be an issue with the selecting of stimulus. When I run the program, there are still target images before a target event has happened (instead of having just the /bgstim (picture.NonFace, picture.NonBP).

I also suspect that the program is not providing the two stimulus at the same time for each trial, but selecting separate stimulus intervals for them.

values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.NonFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.TargetBP, values.stiminterval);

maybe that is because of the lines above?

An example of what is happening is that NonBP and TargetFace appear immediately after a response to a previous combination, then, after a stimulusinterval, they allow for a response. What should happen is that after a response to a combination NonBP and NonFace should appear, and after a stimulus interval, one of the three target combinations should appear.


Would it make more sense to create some number of non-target trials that require no response and mix them into the order below?  Or is it possible to use /bgstim to have the non-target stimuli remain on the screen whenever they are not covered by a target pair?

<list stimulusorder>
/ items = [trial.TargFace; trial.TargBoth; trial.TargBP]
/ replace = true
/ selectionrate = trial
</list>


Thanks,

Eric


I think you misunderstand how /bgstim works and is supposed to work: Any stimulus drawn to the screen via /bgstim is drawn *exactly once* and once only at the very start of the <block>. Those stimuli will not be re-drawn and if they are overwritten by any other stimuli drawn to the screen by any of the trials in the block, the background stimuli are gone.

> When I run the program, there are still target images before a target event has happened

<trial TargFace>
/ stimulusframes = [1 = NonBP, TargetFace]
...
</trial>

That's because you have *instructed* your trials to draw them to the screen in its very first frame.

> instead of having just the /bgstim (picture.NonFace, picture.NonBP)

Then that's what you trials should actually draw to the screen at the very start

/ stimulusframes = [1 = NonBP, NonFace]

>
I also suspect that the program is not providing the two stimulus at the same time for each trial, but selecting separate stimulus intervals for them

No.


Alright, I see what I was doing wrong there. The program seems to be working great now. Many Thanks.

I have one more thing I could use some help with:

I would like the program to collect not only correct response and latency. (values.rt, and response below in <data>), but also collect when participants respond incorrectly, for example tral.Targboth.latency < values.stiminterval. What column should I add to collect this?

*************************'
(raw data)
<data>
/ columns = (build, computer.platform, time, subject, blockcode, trialcode, trialnum, parameters.testduration,
parameters.fixed,
values.stiminterval, response, values.rt, correct)


Also, I think I need to put something at the trial level to tell it to collect this data during the trial, but I cannot find the correct expression. Is it noreplacenorepeat? 

<trial TargBoth>
/ stimulusframes = [1 = NonBP, NonFace]
/ ontrialbegin = [
values.rt = 0;

values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBoth.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBoth.insertstimulustime(picture.TargetBP, values.stiminterval);

]
/ontrialend = [trial.TargBoth.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBoth.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBoth.response == "lbuttondown" || trial.TargBoth.response == "rbuttondown") {
values.rt = trial.TargBoth.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder.nextvalue]
</trial>

Thanks again for your help, you truly are a supreme being.

> but also collect when participants respond incorrectly, for example trial.Targboth.latency < values.stiminterval.

And incorrect response is distinct from the latency aspect. To clarify: You do realize that collecting a latency where "trial.Targboth.latency < values.stiminterval" would reflect a response that occurred *before* any target was shown, don't you? Why would you want to do that?
I guess I meant "false alarm" rather than incorrect response because there is only one input device. 

In this experiment, participants will be attending to changing stimuli on two different monitors at the same time, at varying distances. the changes between the non-target and target stimuli will be relatively discreet, so it is possible that participants will respond incorrectly before one or the other target events have actually occurred (false alarm). If I could collect these instances it could be useful to understand how accurately participants are responding or if any participants are just clicking the mouse repeatedly.

For example, if somebody clicks the mouse before the TargBoth target happens, it would be nice to know to better understand where the response bias falls.

Thanks,

Eric
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
Eric del Rio - Wednesday, March 8, 2017
Dave - Wednesday, March 8, 2017
Eric del Rio - Wednesday, March 8, 2017
Dave - Monday, March 6, 2017
Eric del Rio - Monday, March 6, 2017
Dave - Sunday, March 5, 2017
Eric del Rio - Sunday, March 5, 2017
Dave - Monday, February 27, 2017
Eric del Rio - Sunday, February 26, 2017
Hi Millisecond Forum, I am new to Inquisit and am excited to run my first experiment on it. I am attempting to adapt the Perceptual Vigilance task to my methods, but instead of having the red circle be the target stimulus, I would like to have one of 3 image stimulus combinations for each trial. A trial will be every time the participant is required to respond and the time before the event.  When there is not a target stimulus, I would like there to be two non-target stimuli at all times on the screen. (I accomplished this by adding / bgstim to blocks).

The issue I've been having is replacing the target circle with my images (in <trials>). I would ideally like to have 3 different stimuli combinations appear at the same intervals that the circle would.

So far, I have this, which works for <trial start>, but after a response to the first target, the other target just sits around and doesn't change when a response is required. There should also be an interval before it appears. 

Being new to this program, I'm not sure if this is enough information, but would appreciate any input the community may have to offer.

Thanks!
Eric


<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

Note:
Main trial: presents the fixationcross and the stimulus (either in a fixed position or randomly) and waits for mouse click
<trial TargFace>
/ stimulusframes = [2 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);
]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>






Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargFace]
</trial>

Sorry, I can't figure out what you want to do -- neither based on your description, nor based on the (non-working) code.

What I can tell you is that this

trial.TargFace.insertstimulustime(picture.TargetFace, picture.NonBP, values.stiminterval);

is wrong. You cannot insert multiple stimuli with a *single* call to the insertstimulustime() function. If you wanted to insert both picture.targetface and picture.nonbp at the same time in the trial, this ought to read

trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

Please provide a clearer description of what you want to achieve and importantly please reference the objects you are referring to exactly as they are *named* in the code.

Thanks.


Hi Dave, Thanks so much for your help!

So to give a more detailed explanation of what I want to do:
I am trying to adapt this perceptual vigilance task so that instead of a red circle appearing in the middle of the screen at "stimulusinterval" I would like the program to select randomly between 3 combinations (trial.TargFace, trial.TargBoth, Trial.BP) of 4 stimuli (picture.NonFace, picture.TargetFace, picture.NonBP, picture.TargetBP) and present them for the participant to respond to at stimulusinterval. The combinations I would like are: TargFace = NonBP, TargetFace; TargBP = NonFace, Target.BP; TargBoth = TargetFace, TargetBP.  When there is not a target event, I would like NonFace, NonBP to be present which I believe I have achieved by using (/ bgstim) in the block area.

After following your advice, the test is working except that it is only selecting TargBoth as a trial instead of switching between the three combinations.  I tried to remedy this by making <list stimulusorder> but I think I have made a mistake here. I also think that there is something wrong with the way that I did the / branch code at the end of each of my trials.  Maybe it has to do with how the block code is written?

Do you have any recommendations for how I may accomplish my goal?

Note: I pasted below the parts I'm talking about below with question areas in bold. I also attached the full script if that is easier to navigate

Thanks, 

Eric

*******************************************************************************************************************
*******************************************************************************************************************
Intervals
*******************************************************************************************************************
*******************************************************************************************************************

<list stimulusinterval>
/ items = (1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000)
/ replace = true
/ selectionrate = trial
</list>


<list stimulusorder>
/ items = (trial.TargBoth, trial.TargBP, trial.TargFace)
/ replace = true
/ selectionrate = trial
</list>


*******************************************************************************************************************
*******************************************************************************************************************
STIMULI
*******************************************************************************************************************
*******************************************************************************************************************

<picture NonBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture NonFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_nontarget_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

<picture TargetBP>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_BP.jpg")
/ position = (20,50)
/ size = (50%, 50%)
</picture>

<picture TargetFace>
/ items = ("C:\Users\Richard\Desktop\Inquisit Scripts\Picture_target_face.jpg")
/ position = (80,50)
/ size = (50%, 50%)
</picture>

Note: This presents the first dummy stimulus to start the responses
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial start>
/stimulusframes = [1 = TargetBP, NonFace]
/validresponse = (lbuttondown, rbuttondown)
</trial>

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Note: This is the FACE Target Trial
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargFace>
/ stimulusframes = [1 = NonBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargFace.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargFace.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargFace.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargFace.response == "lbuttondown" || trial.TargFace.response == "rbuttondown") {
values.rt = trial.TargFace.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else trial.TargFace]
</trial>
^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BOTH targets appear
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBoth>
/ stimulusframes = [2 = TargetBP, TargetFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBoth.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargFace.insertstimulustime(picture.TargetBP, values.stiminterval);

]
/ontrialend = [trial.TargBoth.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBoth.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBoth.response == "lbuttondown" || trial.TargBoth.response == "rbuttondown") {
values.rt = trial.TargBoth.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

^^^^^^^^^^^^^^^^^Changed else to "list.stimulusorder" from trial name. probably wrong

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is when BP Target Appears
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;


values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.NonBP, values.stiminterval);

]
/ontrialend = [trial.TargBP.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBP.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBP.response == "lbuttondown" || trial.TargBP.response == "rbuttondown") {
values.rt = trial.TargBP.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder]
</trial>

Note: presents latency feedback for parameters.rtfeedback_duration (editable value)
<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargBP]
</trial>

*******************************************************************************************************************
*******************************************************************************************************************
BLOCKS
*******************************************************************************************************************
*******************************************************************************************************************

Note: this is the main block provided. It runs a specified amount of time with either a fixed or a
random position for the target.

Note: bgstim makes the background show non-target stimuli
<block Target>
/ bgstim = (NonBP, NonFace)
/ trials = [1 = start; 2 = list.stimulusorder]
/ onblockbegin = [block.Target.screencolor = parameters.screencolor]
/timeout = parameters.testduration
</block>










You say the combination you want for <trial TargBP> is "TargBP = NonFace, Target.BP"

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;

   
values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.NonBP, values.stiminterval);

Then the above is wrong, and ought to read

<trial TargBP>
/ stimulusframes = [2 = TargetBP, NonFace]
/ontrialbegin = [
values.rt = 0;

   
values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.NonFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.TargetBP, values.stiminterval);

#2: to /branch to a <trial> element selected from a <list>, the proper syntax is

/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder.nextvalue]

Crucially, if you run the RT feedback trial -- which you do -- you need to adjust the /branch there as well. I.e.,

<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [trial.TargBP]
</trial>

is wrong and ought to read

<trial RT_feedback>
/stimulusframes = [1 = RT_feedback]
/trialduration = parameters.rtfeedback_duration
/recorddata = false
/branch = [list.stimulusorder.nextvalue]
</trial>




Hi Dave,
Again, thanks so much for your help.

There still seems to be an issue with the selecting of stimulus. When I run the program, there are still target images before a target event has happened (instead of having just the /bgstim (picture.NonFace, picture.NonBP).

I also suspect that the program is not providing the two stimulus at the same time for each trial, but selecting separate stimulus intervals for them.

values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBP.insertstimulustime(picture.NonFace, values.stiminterval);
trial.TargBP.insertstimulustime(picture.TargetBP, values.stiminterval);

maybe that is because of the lines above?

An example of what is happening is that NonBP and TargetFace appear immediately after a response to a previous combination, then, after a stimulusinterval, they allow for a response. What should happen is that after a response to a combination NonBP and NonFace should appear, and after a stimulus interval, one of the three target combinations should appear.


Would it make more sense to create some number of non-target trials that require no response and mix them into the order below?  Or is it possible to use /bgstim to have the non-target stimuli remain on the screen whenever they are not covered by a target pair?

<list stimulusorder>
/ items = [trial.TargFace; trial.TargBoth; trial.TargBP]
/ replace = true
/ selectionrate = trial
</list>


Thanks,

Eric


I think you misunderstand how /bgstim works and is supposed to work: Any stimulus drawn to the screen via /bgstim is drawn *exactly once* and once only at the very start of the <block>. Those stimuli will not be re-drawn and if they are overwritten by any other stimuli drawn to the screen by any of the trials in the block, the background stimuli are gone.

> When I run the program, there are still target images before a target event has happened

<trial TargFace>
/ stimulusframes = [1 = NonBP, TargetFace]
...
</trial>

That's because you have *instructed* your trials to draw them to the screen in its very first frame.

> instead of having just the /bgstim (picture.NonFace, picture.NonBP)

Then that's what you trials should actually draw to the screen at the very start

/ stimulusframes = [1 = NonBP, NonFace]

>
I also suspect that the program is not providing the two stimulus at the same time for each trial, but selecting separate stimulus intervals for them

No.


Alright, I see what I was doing wrong there. The program seems to be working great now. Many Thanks.

I have one more thing I could use some help with:

I would like the program to collect not only correct response and latency. (values.rt, and response below in <data>), but also collect when participants respond incorrectly, for example tral.Targboth.latency < values.stiminterval. What column should I add to collect this?

*************************'
(raw data)
<data>
/ columns = (build, computer.platform, time, subject, blockcode, trialcode, trialnum, parameters.testduration,
parameters.fixed,
values.stiminterval, response, values.rt, correct)


Also, I think I need to put something at the trial level to tell it to collect this data during the trial, but I cannot find the correct expression. Is it noreplacenorepeat? 

<trial TargBoth>
/ stimulusframes = [1 = NonBP, NonFace]
/ ontrialbegin = [
values.rt = 0;

values.stiminterval = list.stimulusinterval.nextvalue;
trial.TargBoth.insertstimulustime(picture.TargetFace, values.stiminterval);
trial.TargBoth.insertstimulustime(picture.TargetBP, values.stiminterval);

]
/ontrialend = [trial.TargBoth.resetstimulusframes()]
/responseinterrupt = immediate
/beginresponsetime = 0
/validresponse = (lbuttondown, rbuttondown)
/ isvalidresponse = [
trial.TargBoth.latency > values.stiminterval
]
/ontrialend = [
if (trial.TargBoth.response == "lbuttondown" || trial.TargBoth.response == "rbuttondown") {
values.rt = trial.TargBoth.latency - values.stiminterval;
list.latencies.insertitem(values.rt, 1);
}
]
/ branch = [if (parameters.presenttrialfeedback == true) trial.rt_feedback else list.stimulusorder.nextvalue]
</trial>

Thanks again for your help, you truly are a supreme being.

> but also collect when participants respond incorrectly, for example trial.Targboth.latency < values.stiminterval.

And incorrect response is distinct from the latency aspect. To clarify: You do realize that collecting a latency where "trial.Targboth.latency < values.stiminterval" would reflect a response that occurred *before* any target was shown, don't you? Why would you want to do that?
I guess I meant "false alarm" rather than incorrect response because there is only one input device. 

In this experiment, participants will be attending to changing stimuli on two different monitors at the same time, at varying distances. the changes between the non-target and target stimuli will be relatively discreet, so it is possible that participants will respond incorrectly before one or the other target events have actually occurred (false alarm). If I could collect these instances it could be useful to understand how accurately participants are responding or if any participants are just clicking the mouse repeatedly.

For example, if somebody clicks the mouse before the TargBoth target happens, it would be nice to know to better understand where the response bias falls.

Thanks,

Eric

Okay, thanks for the clarification. And how would you want the trial to behave in case of a premature response (i.e., false alarm)? Terminate immediately? Continue to display the target stimulus? etc. All these things matter.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search