|
|
|
Junior Member
      
Group: Forum Members
Last Login: 12/8/2011 1:01:58 PM
Posts: 19,
Visits: 200
|
|
| Hi, I am creating a TMS experiment where a trigger is sent to TMS at some point during a sequence of stimuli. I have inline code to trigger TMS but I do not know how to time the onset of the trigger and the number of times the trigger was used. I imagine there's some code I could use but I'm not sure where to find it. Thank you! Evelina
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 12/8/2011 1:01:58 PM
Posts: 19,
Visits: 200
|
|
I've been working on this for a while and have made some progress but I still need help so any input is appreciated  Experimental design: (1) InLine script to randomize the onset of the trigger; (2) Instructions; (3) List with stimulus parameters (vary on trial-by-trial basis); (4) Trial sequence - Fixation, target, blank slide I want to be able to log in the .edat file the onset and offset of the trigger together with other variables (target onset etc.). For that purpose I have declared 2 global variables "PulseOn" and "PulseOff" under the User tab in the Script window. In my InLine code right after trigger is executed (and I know that the trigger works just as it should) I have added
PulseOn = Clock.Read c.SetAttrib "PulseOnset", PulseOn
and similar code is placed after the port is turned off for trigger offset time stamp. However, when I run this code, the variables PulseOnset/Offset are not saved in the data file. I have also tried to use c.Log in this InLine but then only one line of data (one trial) is saved and although trigger onset/offset are marked, there is no more any data about the objects presented during the trial.
In the documentation I have found that "a variable must be set as an attribute of the context object in order to be logged in the data file" so I assume that the issue here is that PulseOn/Off aren't really "attached" to any object in the experiment... Is there a way around that? THANK YOU! Evelina
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 12/8/2011 1:01:58 PM
Posts: 19,
Visits: 200
|
|
|
|
|