Sending several trigger in Inquisit 4


Author
Message
AnjaK
AnjaK
Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)
Group: Forum Members
Posts: 12, Visits: 27
I have an experiment in which I want to send triggers to an external device in case the participant gives a correct response. Those triggers should be send randomly in 10% of the correct trials. I programmed it in a way that every time a correct response i given, a responsetrial is executed. In this response trial, I first present an empty screen (feedback_leer) and then after 1500 ms this empty screen is either repeated (thus nothing happens) or in 10% of the trials the TRIGGER is send.

<port Trigger>
/ port = lpt3
/ subport = data
/ items = (255)
</port>

<trial potential_trigger>
/ posttrialpause = replace(3500, 4000, 4500, 5000, 5500, 6000, 6500)
/ stimulustimes = [0=feedback_leer, Marker_Response_Control_L; 1500=replace(feedback_leer, feedback_leer, feedback_leer, feedback_leer, feedback_leer, feedback_leer, feedback_leer, feedback_leer, feedback_leer, TRIGGER)]
/ timeout = 1000
</trial>

This works fine. The only problem is that I just realized that what I need in those 10% is not one trigger but three triggers send in intervals of 50 milliseconds. Is there an easy way to do this? Or does it involve branching to another trial everytime the trigger is chosen? And if so, how would such a /branch look like: how can I say that I need the branch trail every time the TRIGGER is chosen as stimulus?

AnjaK
AnjaK
Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)
Group: Forum Members
Posts: 12, Visits: 27
I just realized that when defining the trigger I wrote "Trigger" and in the stimulus sequence I wrote "TRIGGER". My mistake when posting this, I have it correctly in my script and the script also works fine

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
> [...] what I need in those 10% is not one trigger but three triggers send in intervals of 50 milliseconds. Is there an easy way to do this?

Yes, but you need to abandon the selectionmode in your /stimulustimes attribute. If I were you, I'd set up *two* response trials -- one displaying the triggers at the desired intervals via /stimulustimes and another one displaying no triggers.

Put these in a <list>:

<list responsetrials>
/ items = (trial.notriggertrial, trial.triggertrial)
/ poolsize = 10
/ itemprobabilities = (.9, .1)
</list>

Then, from your "main" trial(s), /branch to a trial sampled from the list in case of a correct response

<trial maintrial>
....
/ branch = [if (trial.maintrial.correct) list.responsetrials.nextvalue; ]
</trial>

AnjaK
AnjaK
Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)
Group: Forum Members
Posts: 12, Visits: 27
Thank you very much! Unfortunately, now I have the following problem:

I defined the list:

<list responsetrials>
/ items = (trial.notriggertrial, trial.triggertrial)
/ poolsize = 10
/ itemprobabilities = (.9, .1)
</list>

and the two trial types:

<trial notriggertrial>
/ posttrialpause = replace(3500, 4000, 4500, 5000, 5500, 6000, 6500)
/ stimulustimes = [0=feedback_leer, Marker_Response_Control_L]
/ timeout = 2500
</trial>

<trial triggertrial>
/ posttrialpause = replace(3500, 4000, 4500, 5000, 5500, 6000, 6500)
/ stimulustimes = [0=feedback_leer, Marker_Response_Control_L; 1500=Pain; 1550=Pain; 1600=Pain)]
/ timeout = 1000
</trial>

(Pain is the name of the trigger, see below) only now I get the message:
Could not locate element ''. (in Element: trial.triggertrial; Attribute: stimulustimes).

I checked whether I have defined all stimulus items, which I did:

<text feedback_leer>
/ items = feedback_leer
/ position = (50, 50)
/ txcolor = (0,0,0)
/ txbgcolor = (0,0,0)
</text>

<item feedback_leer>
/ 1 = ""
</item>

<port Marker_Response_Control_L>
/ port = lpt2
/ subport = data
/ items = (211)
</port>

<port Pain>
/ port = lpt3
/ subport = data
/ items = (255)
</port>

Do you have an idea what could be the problem?

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
Note the trailing ) in

/ stimulustimes = [0=feedback_leer, Marker_Response_Control_L; 1500=Pain; 1550=Pain; 1600=Pain)]


which needs to be removed.

AnjaK
AnjaK
Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)
Group: Forum Members
Posts: 12, Visits: 27
indeed! thank you very much for your help, now it works perfectly!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search