Back
Login
Register
Login
Register
Millisecond Forums
Home
»
Millisecond Forums
»
Inquisit 4
»
Varying stimulustime within a trial?
Varying stimulustime within a trial?
Post Reply
Like
24
Varying stimulustime within a trial?
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Kolfers
Kolfers
posted 11 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 24,
Visits: 137
Hi all,
I have a question I hope you can help me with:
Currently I am trying to implement a version of the Dual Nback (loosely based on the existing example in the library).
In this task a presented stimulus needs to be erased (within the trial), which is currently done by presenting a shape with the background color at the same position.
Eg:
/stimulustimes = [0 = stim_square; 1000 = stim_eraser]
However I would like to make the duration of the presented stimulus (i.e. the time before it is erased) adaptive between trials. In essence I would need something like:
/stimulustimes = [0 = stim_square; values.stimduration = stim_eraser]
However the above does not work. I realise I could put two trials in sequence with the erasing and response collection done in the second trial. However, I'm afraid this will introduce an additional unpredictability in timing as the second trial would take some time to prepare
(not to mention complicate the script even further)
: the erasing would not take place exactly at the required time and therefore the response latency would also be off with regards to the actual stimulus presentation.
Is there any straightforward workaround for this, besides fiddling with a second trial and pretrial pause?
Thank you!
Reply
Like
24
Dave
Dave
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: Administrators
Posts: 13K,
Visits: 108K
You cannot use variables in /stimulustimes or -frames as in
/stimulustimes = [0 = stim_square;
values.stimduration
= stim_eraser]
Instead you need to make use of the <trial> element's setstimulustime() and resetstimuluframes() functions (see the language reference for the <trial> element for further details). In a nutshell:
<trial mytrial>
/ ontrialbegin = [trial.mytrial.setstimulustime(shape.stim_eraser,values.stimduration);]
/ ontrialend = [trial.mytrial.resetstimulusframes();]
/ stimulustimes = [0 = stim_square]
...
</trial>
Reply
Like
18
Kolfers
Kolfers
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 24,
Visits: 137
Great, thank that was what I was looking for!
Reply
Like
15
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
24
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Facebook
Explore
Messages
Mentions
Search