Stimulus Presentation Task

Forum for discussion on different user applications
Locked
Sri_usw
Posts: 11
Joined: 10 Feb 2014, 15:17

Stimulus Presentation Task

Post by Sri_usw » 29 Apr 2014, 09:01

Hello,
I got a quick question. Say I have got two cues, I want to display 1st cue for 5 secs and 2nd cue for 20 seconds. Can I do it in BCI2000.
Many thanks in advance.
Regards.

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Stimulus Presentation Task

Post by boulay » 29 Apr 2014, 14:58

One thing you could do is set your ISIMinDuration and ISIMaxDuration both to 5 s. Then you'll set your SequenceType to deterministic, and set your Sequence to something like "1 2 3 4 5", where 1 is your first cue, and "2" is the first 5 seconds of your second cue, "3" is the next 5 seconds, etc etc.

Sri_usw
Posts: 11
Joined: 10 Feb 2014, 15:17

Re: Stimulus Presentation Task

Post by Sri_usw » 29 Apr 2014, 16:11

Hello Boulay,
Thanks for the reply. I have done it like this. Min and Max Inter stimulus Interval is set to zero. stimulus duration set to 5 secs. Sequence is
1 2 2 2 2 and sequence type is deterministic mode. . I want to get it the same in random mode. what I mean is it has to treat 2 2 2 2 as one cue and 1 as one cue and produce them randomly. Sorry if I confused you. Can it be possible.
Many Thanks in advance.
Regards.

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Stimulus Presentation Task

Post by boulay » 29 Apr 2014, 17:42

I have a script that randomizes my stimulus cues and saves them to a .prm file that is automatically loaded by the batch file.
Below is some Python code. In this example, you end up with something like "5 1 5 2 5 4 5 5 5 3 5 2 5 1 5 4"
(I used 1,2,3,4 as up,down,left,right, 5 is center. So it's center-up-center-down-center-center-center-left- etc)

Code: Select all

fname = "CentreOut.prm"
nTrialsPerTarget = 4
targetList = (1,2,3,4,5)
interStimTarget = 5
textOut = "Application:Sequencing:StimulusPresentationTask intlist Sequence= "
textTail = " // S"

from random import shuffle
from itertools import chain
import os
fname = os.path.join(os.path.dirname(os.path.realpath(__file__)),fname)
temp = []
for cc in range(nTrialsPerTarget):
	shuflist = [[x] for x in targetList]
	shuffle(shuflist)
	temp.append(shuflist)

temp = [x2 for x3 in [item for sublist in temp for item in sublist] for x2 in x3]#Flatten temp
temp = [[interStimTarget,x] for x in temp]#Interleave with interStimTarget
temp = list(chain(*temp)) #Flatten
#Write the string to the parameter file.
textOut += str(len(temp)) + " "
textOut += (" ").join([str(x) for x in temp])
textOut += textTail
fid = open(fname, "w")
fid.write(textOut)
fid.close()

Locked

Who is online

Users browsing this forum: No registered users and 1 guest