Logging fMRI TR signals
Our group is trying to implement an auditory experiment that uses interrupted acquisitions on fMRI. In order to check that all stimuli are synchronized with the duration of the TRs, we would like to register in the log all TR onsets.
In our particular scanner, at each TR the machine sends a signal that is connected to the computer via USB, and is registered as a 't' keypress. We would like to log all occurrences of said keypress (or any other way of registering the signal), and the time when it happens, without blocking the code.
I checked the io.TriggerInput() setting but don't really understand how to set it up to do this. Is there a way to log all occurrences of 't' keypresses? If not, how to set up the TriggerInput object in order to do this?
Thank you very much!
Juan Jesus Torre