Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+x+x+x+x+x+x+x+xHi 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. If all you want is allow a response to be registered at any point during the trial, you can remove the /isvalidresponse attribute. / isvalidresponse = [ trial.TargBoth.latency > values.stiminterval ] means "only consider a response valid / accept it if its latency is greater than values.stiminterval," i.e. if it has occurs *after* the display of the target stimulus on-screen. Unless instructed otherwise per a different /responseinterrupt setting, the trial will then immediately terminate upon response. If you want the trial to be able to capture *multiple* responses, i.e. say a false alarm *as well as* the "actual" response after the display of the target stimulus, that opens a bit of a can of worms. See e.g. https://www.millisecond.com/forums/FindPost15812.aspx
|
|
|
Eric del Rio
|
|
Group: Forum Members
Posts: 10,
Visits: 29
|
+x+x+x+x+x+x+x+x+x+xHi 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. I was thinking, for convenience sake to have the trial continue until there is a target and wait for a correct response - recording the false alarm. But if it is not too complicated to have a false alarm terminate the trial immediately and display a message "There was no change to the..." , then that would be ideal. I know how to make the feedback stimulus i.e., but wouldn't know how to make the incorrect response terminate and display it. Or how to make it record the data. <text FalseAlrm> /items = ("There was no change") / fontstyle = ("Arial", parameters.feedbackheight, false, false, false, false, 5, 1) / txcolor = red /txbgcolor = white / position = (50%, 50%) </text> Thanks, Eric
|
|
|
Eric del Rio
|
|
Group: Forum Members
Posts: 10,
Visits: 29
|
+x+x+x+x+x+x+x+x+x+x+xHi 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. If all you want is allow a response to be registered at any point during the trial, you can remove the /isvalidresponse attribute. / isvalidresponse = [ trial.TargBoth.latency > values.stiminterval ] means "only consider a response valid / accept it if its latency is greater than values.stiminterval," i.e. if it has occurs *after* the display of the target stimulus on-screen. Unless instructed otherwise per a different /responseinterrupt setting, the trial will then immediately terminate upon response. If you want the trial to be able to capture *multiple* responses, i.e. say a false alarm *as well as* the "actual" response after the display of the target stimulus, that opens a bit of a can of worms. See e.g. https://www.millisecond.com/forums/FindPost15812.aspx Oh ok, I'll check it out. Thanks
|
|
|
Eric del Rio
|
|
Group: Forum Members
Posts: 10,
Visits: 29
|
+x+x+x+x+x+x+x+x+x+x+x+xHi 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. If all you want is allow a response to be registered at any point during the trial, you can remove the /isvalidresponse attribute. / isvalidresponse = [ trial.TargBoth.latency > values.stiminterval ] means "only consider a response valid / accept it if its latency is greater than values.stiminterval," i.e. if it has occurs *after* the display of the target stimulus on-screen. Unless instructed otherwise per a different /responseinterrupt setting, the trial will then immediately terminate upon response. If you want the trial to be able to capture *multiple* responses, i.e. say a false alarm *as well as* the "actual" response after the display of the target stimulus, that opens a bit of a can of worms. See e.g. https://www.millisecond.com/forums/FindPost15812.aspx Oh ok, I'll check it out. Thanks So it seems like the /ifvalidresponse below should record premature responses in "values.rt_premature" column and correct responses in "values.rt" column. For some reason it won't take this line of code though. Did I include too much information? <trial TargFace> / stimulusframes = [1 = NonBP, NonFace] /ontrialbegin = [ values.rt = 0; values.rt_premature = 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 = [if(trial.TargFace.latency > values.stiminterval&&trial.TargFace.response = lbuttondown,rbuttondown){values.rt = trial.TargFace.latency; true;} else if (trial.TargFace.latency < values.stiminterval&&trial.TargFace.response = lbuttondown,rbuttondown){values.rt_premature
true} ]
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+x+x+x+x+x+x+x+x+x+x+xHi 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. If all you want is allow a response to be registered at any point during the trial, you can remove the /isvalidresponse attribute. / isvalidresponse = [ trial.TargBoth.latency > values.stiminterval ] means "only consider a response valid / accept it if its latency is greater than values.stiminterval," i.e. if it has occurs *after* the display of the target stimulus on-screen. Unless instructed otherwise per a different /responseinterrupt setting, the trial will then immediately terminate upon response. If you want the trial to be able to capture *multiple* responses, i.e. say a false alarm *as well as* the "actual" response after the display of the target stimulus, that opens a bit of a can of worms. See e.g. https://www.millisecond.com/forums/FindPost15812.aspx Oh ok, I'll check it out. Thanks So it seems like the /ifvalidresponse below should record premature responses in "values.rt_premature" column and correct responses in "values.rt" column. For some reason it won't take this line of code though. Did I include too much information? <trial TargFace> / stimulusframes = [1 = NonBP, NonFace] /ontrialbegin = [ values.rt = 0; values.rt_premature = 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 = [if(trial.TargFace.latency > values.stiminterval&&trial.TargFace.response = lbuttondown,rbuttondown){values.rt = trial.TargFace.latency; true;} else if (trial.TargFace.latency < values.stiminterval&&trial.TargFace.response = lbuttondown,rbuttondown){values.rt_premature
true} ] There are various syntax errors in that statement. = is the *assignment* operator, but you would need the logical comparison operator == in the if-condition. And lbuttondown,rbuttondown is not valid syntax at all -- the response property can never be equal to "lbuttondown comma rbuttondown." Moreover, this shouldn't be needed at all. / isvalidresponse = [if(trial.TargFace.latency > values.stiminterval){values.rt = trial.TargFace.latency; true;} else if (trial.TargFace.latency <= values.stiminterval){values.rt_premature=trial.TargFace.latency; true}] should be sufficient.
|
|
|