Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about the protocole time course #3

Open
abidi-wq opened this issue Feb 7, 2022 · 4 comments
Open

Questions about the protocole time course #3

abidi-wq opened this issue Feb 7, 2022 · 4 comments

Comments

@abidi-wq
Copy link

abidi-wq commented Feb 7, 2022

Hello,

I want to synchronize the protocol with neurophysiological measurements so I need the time course of the protocol, in particular the onsets and offsets of all the stimuli.
what should i do to get all of these informations please?

thanks

@a-hurst
Copy link
Member

a-hurst commented Feb 9, 2022

Hey @abidi-wq, the time course should be laid out in the original paper, but if you're talking about adding markers for synchronization with neuroimaging that depends a lot on your setup. What system are you recording the neuroimaging data with, and what interface does your lab usually use for sending it markers? Once I know that, I can help advise on how to get the paradigm to sync with your neuro recordings.

In the past, our lab has used a LabJack U3 to send EEG triggers to synchronize with tasks like this.

@abidi-wq
Copy link
Author

hello,

TriggerCommunication_ePrime.pdf
we will use EEG/NIRS to record neuroimaging data. The supplier sent us this document (enclosed) to synchronize the data. Can you please tell me if it is necessary to add codes in the configuration of the protocol to send the data of the stimuli (onsets/durations).
Many thanks

@abidi-wq
Copy link
Author

Hello,
I was wondering if you saw my post and if you have any solution that could help me to sync the data. Otherwise, I will try to reproduce the protocol on e-prime and I wanted to know if you can send me the images and audio files of the protocol.
Many thanks

@a-hurst
Copy link
Member

a-hurst commented Feb 28, 2022

Hi @abidi-wq, sorry I didn't see your earlier message! Based on the specs you sent, it looks like you should be able to send triggers to that device using the PySerial library. That documentation isn't terribly clear, but based on that last slide my understanding is that there are two binary trigger channels you can write 0 or 1 to by writing the numbers 1, 2, 3, or 4 to the serial port. To do that in Python, you'd do something like:

import time
import serial

trigger = serial.Serial('COM9')  # Open serial port (change COM9 to the correct value as per slide 2)
print(trigger.name)              # Check which port was really used

# Set both AUX1 and AUX2 to zero
trigger.write(2)  # Set AUX1 = 0
trigger.write(4)  # Set AUX2 = 0

# Do some stuff

trigger.write(1)  # Set AUX1 = 1
time.sleep(0.1)   # Wait 100 ms 
trigger.write(2)  # Set AUX1 = 0

# Finish task

trigger.close()  # Close serial port connection

You should be able to play around with different values in an interactive Python terminal to see what works and what doesn't in terms of sending triggers to the software.

As for the experiment resources and stimuli, all of it's generated dynamically by the Python program itself so there's nothing to share! All the colours, sounds, and shapes are all created on experiment startup based on the screen size and resolution of the target computer. I can't imagine recreating it in ePrime would be easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants