Using stimulus presentation packages with your eego™ system

AIM

While EEG has the potential to shed light on both brain structure and function with great temporal resolution, continuous EEG is not sufficient to gather information on the cognitive process behind specific neural activity. Most researchers are interested in understanding how the brain responds to specific stimuli such as a series of text, sound or images presented to the subject in a pseudo-randomized pattern. Stimulus presentation therefore becomes an integral part of studies that want to investigate attentional focus, Event Related Potentials (ERPs), imagination and perception, EEG based emotion analysis, language comprehension and production etc [1,2,3]. In addition to this, stimulus presentation platforms could also be used to send event markers and annotations to the EEG data to allow for easier post-hoc synchronization in multi-device setups. For these reasons, the last years have seen a rise in the number of open-source and licensed software platforms that can be used for stimulus presentation.

In this document, we will provide an overview of the stimulus presentation packages that are compatible and ready for use with the eego™ system. We will also highlight successful use-cases from the field and some limitations to make note of when running such studies.

BACKGROUND

To extract meaningful outcomes from continuous EEG data, most experiment protocols involve the presentation of a stimuli to the subject tied to a triggering protocol between the EEG recording equipment and the stimulus presentation platform to generate event markers in the EEG data. In most cases the subject will also be asked to respond to the stimuli in some way – a key press or button press is used routinely for this purpose. The presence of markers in the data makes it easier to understand interesting aspects of the EEG data itself and lends insight on neurophysiological factors underpinning subject behavior. Based on these event markers, EEG data that is time-locked to the cognitive processing of stimuli can be averaged to derive ERPs and other relevant measures [4].  

For the reader’s convenience, we will shortly elaborate how a continuous EEG dataset can be used to arrive at ERPs. ERPs are characterized by some features such as polarity (positive (P) or negative (N)), latency and topographical distribution of the amplitude of the ERP over the scalp [5]. Figure 1: Commonly studied ERP components in language research are depicted here, solid lines represent peaks in response to visual stimuli and the dashed lines are for additional components that can belong to certain experiment designs [1].

All experiments involving stimulus presentation include some main elements as depicted in Figure 2. While the figure represents a routine ERP study, most EEG based studies that involve subject responses to a specific task or stimuli include similar hardware components as depicted in this figure.

Figure 2: Illustration depicting a typical ERP setup. The hardware shown in this figure is common in cognitive research and several components are included in the setup. A) represents an EEG headset and amplifier connected to a subject whose EEG activity can be recorded B) A stimulus presentation PC on which the imagery, sound or text is presented to the subject and C) is the acquisition PC which runs the recording software. There is a wired connection between the stimulus and acquisition PCs through which a hardware trigger can be delivered to the EEG amplifier. 

The eego™ hub system serves as an excellent alternative to the setup depicted in Figure 2, as it removes the need for a PC with parallel port and other hardware to enable triggering. The hub is designed as a 1 PC and 2 screen setup to make stimuli presentation and task control easier during your EEG recording. Figure 3 gives the reader a preview of a Visual Evoked Potential (VEP) setup when the eego™ hub is employed. The acquisition software plays on one screen, whereas the ERP task plays on screen 2.


Figure 3: A typical ERP setup using the eego™ hub

Synchronizing event markers with your EEG data 

Every multimodal, multi-device or ERP study involves the need for synchronizing event markers with your EEG data. Ease of use of the acquisition and stimuli presentation platforms, intuitiveness of the Graphical User Interface (GUI), ease of triggering and communicating between multiple devices are some important factors to consider when looking at experiments that involve more than one dimension. 

Hardware (TTL) triggers and Software (Network or LSL) events

The eego™ system can receive both hardware (TTL) triggers and software/network events (Lab Streaming Layer – LSL) markers). A hardware trigger can be sent directly to the trigger port on the eego™​ amplifier and the eego™ acquisition software is LSL compatible, therefore equipped to receive network events from any other system that is connected to the same internet network. In both cases, the markers can be seen in the same view as the EEG data and denoted by a flag as seen in Figure 4, either globally across channels or on specific channels. The eego™ software also includes an EEG events tab where users can cross-check that the count of events is the same as being sent by them from third party stimulus presentation platforms (Figure 5).


Figure 4: Visualization of event markers on the eego™ software, the relevant section is highlighted with a box and displays the yellow flag with the event code. 

Figure 5: The ‘Review EEG Events’ option (in the Review workflow) and ‘EEG Events’ option (during a live acquisition) provide details on the event count and timing (relative to the PC clock). In this figure, LSL markers are being sent to the EEG data in the event of a key press. The relevant blocks are overlayed with a box for easy reading, figure 4 shows the visualization of the event marker on the EEG data.

Please note that hardware triggers are known to be more time-precise and accurate than LSL markers. LSL markers can be sent more easily over the network but is prone to sub-millisecond or millisecond level delays and jitter. This said, LSL markers keep the end-user independent of cabling and hardware requirements whereas to send hardware triggers, the end-user will have to work with some hardware pre-requisites such as a trigger station, stimulus PC with a parallel port or a simple response button box that the user can press in response to stimuli. Finally, in both cases timing tests are recommended first with the hardware and within the network infrastructure to take fixed delays into account at either the recording or analysis phase.Such timing tests can also be performed using a photodiode purchased from your nearest ANT Neuro sales point of contact. 

Using stimulus presentation packages with your eego™ system

The eego™ system is compatible with multiple software presentation packages to make experiment control and event synchronization easier for the community. In this section, we will list out three such software platforms and provide the reader with a list of trigger station recommendations that have been routinely employed by our end-users.

E-Prime® from Psychology Software Tools (PST)

e-prime® is leading licensed, stimulus presentation software that allows users to create and control their own experiments [6]. e-prime is a convenient platform for all ANT Neuro users as its intuitive GUI allows complete experiment control with and without coding. Blocks of interest can be dragged and dropped from the ‘E-objects’ pane to include in your Experiment Explorer.

Figure 6: Setup required to work with both e-prime® and eego™ systems. 

Setup Preview: 

The ANT Chronos adapter removes the need of a parallel port on the stimulus PC and it can be interfaced with our trigger adapters to deliver TTL triggers directly to the eego™ amplifier. This ANT Chronos adapter is connected to the back of the Chronos box which can also record subject responses such as a button press [9,10,11]. All triggers sent to the amplifier as well as subject responses will be visualized on the same view as the EEG data, as seen in Figure 6. 

PRESENTATION® from Neurobehavioural Systems:

Presentation® is a Windows OS based stimulus delivery and experiment control platform that is suited for most physiological, behavioral, and psychological experiments done with neuroimaging methods such as EEG. It is a licensed software, and they even have a mobile application which allows experiment control on Android and iOS devices. All experiment parameters can be modified using its customizable GUI [7].


Figure 7: Preview of a data recording while an experiment is running on Presentation. The event markers can be seen as yellow flags in the EEG data.

Setup Preview:

The stimulus presentation PC needs to have a parallel port, a DB25 cable is interfaced with our trigger adapters to pull in the TTL trigger to the eego™ amplifier. All triggers sent to the amplifier as well as subject responses will be visualized on the same view as the EEG data, as seen in Figure 3. An example setup with Presentation is depicted in Figure 7.

PsychoPy®:

PsychoPy® is a free, openly available software for textual, auditory, and visual stimulus presentation, developed and maintained by the University of Nottingham [8]. It is available both as a standalone desktop application and as a Python module, allowing the community a choice. PsychoPy has both Builder and Coder windows as well as a ‘Compile to Python Script’ option through which a .py script can be created in the Coder window based on the stimuli and response blocks chosen in the Builder view. Users can drag and drop stimuli blocks such as sound, images, movie clips, keyboard responses etc to include in their experiment trials.

Setup Preview:

Software events can be sent from PsychoPy® to the eego™ software for the co-registration of events. To be able to do this, users will first have to download the Lab Streaming Layer (LSL) library for Python from the official Github platform for LSL. The PsychoPy experiment must also be run from the Coder window where the script has to be slightly adjusted to include a snippet to send events via LSL. The required options need to be checked on under Application Options ---> ‘Network Events’ in the eego™ software and all LSL markers will be visualized in the same view as the EEG data as seen here. PsychoPy® also allows the option to send a TTL trigger to a port address or trigger station, however, the LSL option is most recommended for use with the eego™ system as it has been tried and tested well within the community [3,12].  

In this section, we also include a code snippet that can be added to your personalized PsychoPy® scripts to send LSL markers to the eego™ software. 

from pylsl import StreamInfo, StreamOutlet # import required classes
info = StreamInfo(name='TriggerStream', type='Markers', channel_count=1, channel_format='int32', source_id='Example') # sets variables for object info
outlet = StreamOutlet(info)
print('Start of stimulus presentation') #Cross-check that PsychoPy has sent the event to eego

Figure 8: Sending LSL markers from PsychoPy and visualizing event markers on the eego™ software

In case of further questions regarding compatibility and setups detailed in this section, please reach out to our Customer Success Team via support@ant-neuro.com.

TRIGGER STATIONS:

While the sections above covered software packages that supported delivery of stimuli parallel to a biosignal recording, trigger stations can make experiments a lot easier by having in-built ports for all kinds of connectors such as parallel, serial or USB. With the below list we would like to inform the user about some tried and tested trigger boxes that can be explored in combination with our eego™ systems:

1.     Cedrus C-pod: https://cedrus.com/c-pod/ant-neuro.htm
2.     BrainTrends: https://www.braintrends.it/trigger-to-eeg-amplifier-send-without-parallel-port-how-to-mark-your-eeg-tms-recordings-using-eprime-psychopy-opensesame-633709.html
3.     LabHackers: http://www.labhackers.com/usb2ttl8.html

All the above trigger stations and converters have also been recommended by our end-user community. 

LIMITATIONS

  • All kinds of triggering solutions require a timing test and calibration of all devices, a pilot is highly recommended before the planned subject recordings.
  • The eego™ amplifiers can receive TTL triggers in the range of 3.3V-5V, it is always recommended to check the voltage with a multimeter when troubleshooting. The high and low states of the trigger pulse need to be held for at least 2 to 3 times the sampling frequency reciprocal; we do not recommend a continuous trigger.
  • Firewalls need to be disabled on both sender and receiver PCs when a software/LSL event is being sent to the acquisition PC.
  • Applications such as LabRecorder can be installed to conduct a sanity check in the case issues in the visualization of LSL markers.
  • The observed latencies will differ for every hardware and network infrastructure, fixed offsets need to be considered in the analysis phase.

REFERENCES

  1. Parr, Johnny VV, et al. "Cortical, muscular, and kinetic activity underpinning attentional focus strategies during visuomotor control." Psychophysiology 60.6 (2023): e14249.
  2. Beres, Anna M. "Time is of the essence: A review of electroencephalography (EEG) and event-related brain potentials (ERPs) in language research." Applied psychophysiology and biofeedback 42 (2017): 247-255.
  3. Wilson, Holly, et al. "EEG-based BCI Dataset of Semantic Concepts for Imagination and Perception tasks." Scientific Data 10.1 (2023): 1-11.
  4. Campanella, Salvatore. "Use of cognitive event-related potentials in the management of psychiatric disorders: Towards an individual follow-up and multi-component clinical approach." World journal of psychiatry 11.5 (2021): 153.
  5. Woodman, Geoffrey F. "A brief introduction to the use of event-related potentials in studies of perception and attention." Attention, Perception, & Psychophysics 72 (2010): 2031-2046.
  6. https://pstnet.com/products/categories/ant-neuro-package/
  7.  https://www.neurobs.com/menu_presentation/menu_features/experiment_parameters
  8. https://psychopy.org/
  9. Ma, Haiying, et al. "The temptation of zero price: event-related potentials evidence of how price framing influences the purchase of bundles." Frontiers in neuroscience 12 (2018): 251.
  10. Rossion, Bruno, and Stéphanie Caharel. "ERP evidence for the speed of face categorization in the human brain: Disentangling the contribution of low-level visual cues from face perception." Vision research 51.12 (2011): 1297-1311.
  11. Messerotti Benvenuti, Simone, et al. "Appetitive and aversive motivation in depression: The temporal dynamics of task-elicited asymmetries in alpha oscillations." Scientific Reports 9.1 (2019): 17129.
  12. Noble, Sandra-Carina, et al. "Adaptive P300-Based Brain-Computer Interface for Attention Training: Protocol for a Randomized Controlled Trial." JMIR Research Protocols 12.1 (2023): e46135.

EXTERNAL LINKS
  1. https://www.ant-neuro.com/products/eego_sports/eego-software
  2. https://www.ant-neuro.com/products/eego-mylab
  3. https://www.ant-neuro.com/products/eego_hub
  4. https://www.ant-neuro.com/products/waveguard_caps
  5. https://cedrus.com/index.htm
  6. https://www.braintrends.it/
  7. http://www.labhackers.com/index.html#
Hyperscanning setups with your eego™ system