Difference between revisions of "Event Related Potentials (ERPs)"

From Neuroelectric's Wiki
Jump to: navigation, search
(Stimulus Software)
(ePrime)
 
(31 intermediate revisions by 4 users not shown)
Line 2: Line 2:
 
An '''event-related potential''' ('''ERP''') is the measured brain response that is the direct result of a specific sense|sensory, cognition|cognitive, or motor system|motor event.<ref name="Luck">Luck, Steven J. (2005). An Introduction to the Event-Related Potential Technique. The MIT Press. ISBN 0-262-12277-4.</ref>.
 
An '''event-related potential''' ('''ERP''') is the measured brain response that is the direct result of a specific sense|sensory, cognition|cognitive, or motor system|motor event.<ref name="Luck">Luck, Steven J. (2005). An Introduction to the Event-Related Potential Technique. The MIT Press. ISBN 0-262-12277-4.</ref>.
  
Those brain response can be measured with electroencephalography (EEG) using devices such as [http://www.neuroelectrics.com/products/enobio/ Enobio]. EEG reflects thousands of simultaneously ongoing brain processes. This means that the brain response to a single stimulus or event of interest is not usually visible in the EEG recording of a single trial. To see the brain's response to a stimulus, the experimenter must conduct many trials (usually in the order of 100 or more) and average the results together, causing random brain activity to be averaged out and the relevant waveform to remain, called the ERP.<ref name "Coles">Coles, Michael G.H.; Michael D. Rugg (1996). "Event-related brain potentials: an introduction". Electrophysiology of Mind. Oxford Scholarship Online Monographs. pp. 1–27</ref>
+
Those brain response can be measured with electroencephalography (EEG) using devices such as [http://www.neuroelectrics.com/enobio Enobio]. EEG reflects thousands of simultaneously ongoing brain processes. This means that the brain response to a single stimulus or event of interest is not usually visible in the EEG recording of a single trial. To see the brain's response to a stimulus, the experimenter must conduct many trials (usually in the order of 100 or more) and average the results together, causing random brain activity to be averaged out and the relevant waveform to remain, called the ERP.<ref name "Coles">Coles, Michael G.H.; Michael D. Rugg (1996). "Event-related brain potentials: an introduction". Electrophysiology of Mind. Oxford Scholarship Online Monographs. pp. 1–27</ref>
  
 
These stimuli can be visual, auditory, tactile and even olfactory and gustatory. In order to record those event-related potential the recording set-up needs to '''synchronise''' very accurately both the stimuli presentation and the EEG recording device. Commonly the software in charge of presenting the stimuli send a marker to the EEG recording system each time a stimuli is presented. If the triggers are properly recorded along with the EEG signal, an automatic pre-processing step can automatically cut the signal in epochs for further averaging.
 
These stimuli can be visual, auditory, tactile and even olfactory and gustatory. In order to record those event-related potential the recording set-up needs to '''synchronise''' very accurately both the stimuli presentation and the EEG recording device. Commonly the software in charge of presenting the stimuli send a marker to the EEG recording system each time a stimuli is presented. If the triggers are properly recorded along with the EEG signal, an automatic pre-processing step can automatically cut the signal in epochs for further averaging.
Line 10: Line 10:
  
 
= Stimulus Software =
 
= Stimulus Software =
There are several software that can set-up an experiment which presents some stimulus (audio, images, video, etc.) to a subject in order to elicit ERPs in the EEG signal. It is very important that the recorded EEG data is synchronised with those stimulus in order to detect the ERPs when analyzing the data. The [http://www.neuroelectrics.com/products/software/nic/ NIC] software provides the basic infrastructure to receive those markers from this kind of software every time a stimuli is presented. Please refer to the [[Interacting_with_NIC]] section for the details on how NIC handles the reception of the markers.
+
There are several software that can set-up an experiment which presents some stimulus (audio, images, video, etc.) to a subject in order to elicit ERPs in the EEG signal. It is very important that the recorded EEG data is synchronised with those stimulus in order to detect the ERPs when analyzing the data. The [http://www.neuroelectrics.com/enobio/software NIC] software provides the basic infrastructure to receive those markers from this kind of software every time a stimuli is presented. Please refer to the [[Interacting_with_NIC]] section for the details on how NIC handles the reception of the markers.
  
 
In the following section we detail how some of the most relevant presentation software can be configured to send markers to NIC.
 
In the following section we detail how some of the most relevant presentation software can be configured to send markers to NIC.
 
== Presentation ==
 
== Presentation ==
 
=== TCP triggers ===
 
 
The [http://www.neurobs.com/ Presentation] software allows to connect to a remote application by using sockets in the [http://www.neurobs.com/pres_docs/html/03_presentation/01_getting_started/04_scenarios/02_pcl_programs.htm PCL program section] of an experiment scenario. This socket can be used to send markers to NIC every time a stimuli is presented. The following [[Media:DemoPresentationTriggerNIC.sce.txt | ''example'']] shows how to proceed in order to send markers to NIC.
 
The [http://www.neurobs.com/ Presentation] software allows to connect to a remote application by using sockets in the [http://www.neurobs.com/pres_docs/html/03_presentation/01_getting_started/04_scenarios/02_pcl_programs.htm PCL program section] of an experiment scenario. This socket can be used to send markers to NIC every time a stimuli is presented. The following [[Media:DemoPresentationTriggerNIC.sce.txt | ''example'']] shows how to proceed in order to send markers to NIC.
  
Line 76: Line 74:
 
  end
 
  end
 
[[File:Presentation tcpip settings.png|200px|thumb|left| TCP/IP configuration settings in the Presentation software]]
 
[[File:Presentation tcpip settings.png|200px|thumb|left| TCP/IP configuration settings in the Presentation software]]
[[File:Presentation extension manager.png|200px|thumb|left| Adding Presentation extension manager]]
+
[[File:Presentation extension manager.png|200px|thumb|left| Presentation extension manager]]
 
[[File:Lsl data port properties.png|200px|thumb|right| LSL data port properties]]
 
[[File:Lsl data port properties.png|200px|thumb|right| LSL data port properties]]
 
The line
 
The line
Line 83: Line 81:
 
  ''isConnected = s.open();
 
  ''isConnected = s.open();
  
===LSL triggers===
 
 
An alternative way of synchronising the presented stimulus by the Presentation software and NIC is by means of the [https://code.google.com/p/labstreaminglayer/ Lab Streaming Layer (LSL)] protocol. To get use of this functionality you need to install the [http://www.neurobs.com/menu_presentation/menu_download/tools LSL Presentation Extension] in you Presentation software through the Presentation extension manager.
 
An alternative way of synchronising the presented stimulus by the Presentation software and NIC is by means of the [https://code.google.com/p/labstreaminglayer/ Lab Streaming Layer (LSL)] protocol. To get use of this functionality you need to install the [http://www.neurobs.com/menu_presentation/menu_download/tools LSL Presentation Extension] in you Presentation software through the Presentation extension manager.
  
 
Once the extension is registered, it can be selected as a data port in Presentation's port settings. Information about the stream outlet name, ID, and connection status can be found in the data port properties window reachable through the "Properties" button that appears when the data port is selected within Presentation's port settings. The Connection Settings property allows users to choose whether the LSL stream outlet should be automatically opened whenever when Presentation starts, or whether it must be manually opened after Presentation is launched.
 
Once the extension is registered, it can be selected as a data port in Presentation's port settings. Information about the stream outlet name, ID, and connection status can be found in the data port properties window reachable through the "Properties" button that appears when the data port is selected within Presentation's port settings. The Connection Settings property allows users to choose whether the LSL stream outlet should be automatically opened whenever when Presentation starts, or whether it must be manually opened after Presentation is launched.
 
All events that are logged in the Presentation logfile will also be sent out as LSL markers.
 
All events that are logged in the Presentation logfile will also be sent out as LSL markers.
 
There is an option to only send the "event code" for the event instead of the complete XML information. The "event code" is a string, but most non-stimulus events have numerical (string representation of an integer) event codes, and the user can specify the event code for stimuli, so they can arrange for those to be integers as well. There are a few less common events that can't have integer event codes (pause/resume/quit/text input). They also added an option to send some default number (as a string) if an event code does not contain only the string representation of an integer. This would allow the users to just use that option instead of extracting things with tags, if they don't need more complete information.
 
  
  
Please refer to the [[Interacting with NIC]] section for the details on how to configure NIC to handle the reception of the markers from the LSL.
+
Please refer to the [[Interacting_with_NIC]] section for the details on how to configure NIC to handle the reception of the markers from the LSL.
  
 
== ePrime ==
 
== ePrime ==
 
[http://www.pstnet.com/eprime.cfm E-Prime] is a suite of applications for designing and running experiments. This software can send markers to NIC in a similar way as the Presentation software. By using its programming features a TCP socket can be created to connect to the host and port where NIC runs and then send marker whenever the stimuli are presented. The following link [http://wiki.neuroelectrics.com/images/7/76/Eprime2NIC_example.zip eprime2NIC_example.zip] contains an example on how to send TCP markers from E-Prime to NIC.
 
[http://www.pstnet.com/eprime.cfm E-Prime] is a suite of applications for designing and running experiments. This software can send markers to NIC in a similar way as the Presentation software. By using its programming features a TCP socket can be created to connect to the host and port where NIC runs and then send marker whenever the stimuli are presented. The following link [http://wiki.neuroelectrics.com/images/7/76/Eprime2NIC_example.zip eprime2NIC_example.zip] contains an example on how to send TCP markers from E-Prime to NIC.
  
In the newer version of E-Prime, you can also configure a task to send TCP triggers and TTL pulses when a stimulus is shown, as described [https://support.pstnet.com/entries/24631007 here].
+
In the newer version of E-Prime, you can also configure a task to send TCP triggers and TTL pulses automatically when a stimulus is shown, as described [https://support.pstnet.com/hc/en-us/articles/115015040608-E-STUDIO-Configuring-Task-Events-24789- here].
  
 
== Matlab ==
 
== Matlab ==
Line 106: Line 101:
  
 
The latest version of the Matlab LSL library can be download from [ftp://sccn.ucsd.edu/pub/software/LSL/SDK/ here].
 
The latest version of the Matlab LSL library can be download from [ftp://sccn.ucsd.edu/pub/software/LSL/SDK/ here].
 
== Inquisit ==
 
[http://www.millisecond.com/ Inquisit] can make use of the parallel port output to send event code triggers to Neuroelectrics' devices using our [http://wiki.neuroelectrics.com/index.php/Interacting with NIC#Sending_TTL_pulses TTL adapter] as descibred [http://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm here].
 
 
Wearable Sensing's systems can receive triggers for event code marking and synchronization. These triggers can come from parallel port outputs or other signal generators. Inquisit® is able to send trigger events through the parallel port outputs during an experiment. These combined abilities allow the use of Inquisit® for ERP experiments.
 
  
 
= References =
 
= References =
 
<references />
 
<references />

Latest revision as of 00:02, 27 January 2020

About Event Related Potentials (ERPs)

An event-related potential (ERP) is the measured brain response that is the direct result of a specific sense|sensory, cognition|cognitive, or motor system|motor event.<ref name="Luck">Luck, Steven J. (2005). An Introduction to the Event-Related Potential Technique. The MIT Press. ISBN 0-262-12277-4.</ref>.

Those brain response can be measured with electroencephalography (EEG) using devices such as Enobio. EEG reflects thousands of simultaneously ongoing brain processes. This means that the brain response to a single stimulus or event of interest is not usually visible in the EEG recording of a single trial. To see the brain's response to a stimulus, the experimenter must conduct many trials (usually in the order of 100 or more) and average the results together, causing random brain activity to be averaged out and the relevant waveform to remain, called the ERP.<ref name "Coles">Coles, Michael G.H.; Michael D. Rugg (1996). "Event-related brain potentials: an introduction". Electrophysiology of Mind. Oxford Scholarship Online Monographs. pp. 1–27</ref>

These stimuli can be visual, auditory, tactile and even olfactory and gustatory. In order to record those event-related potential the recording set-up needs to synchronise very accurately both the stimuli presentation and the EEG recording device. Commonly the software in charge of presenting the stimuli send a marker to the EEG recording system each time a stimuli is presented. If the triggers are properly recorded along with the EEG signal, an automatic pre-processing step can automatically cut the signal in epochs for further averaging.

Further information regarding ERPs and its different types can be found in the following two links:1 2, as well as in our White Papers Event Synchronization of EEG data using the LSL and Extraction of ERPs with NE devices.

Stimulus Software

There are several software that can set-up an experiment which presents some stimulus (audio, images, video, etc.) to a subject in order to elicit ERPs in the EEG signal. It is very important that the recorded EEG data is synchronised with those stimulus in order to detect the ERPs when analyzing the data. The NIC software provides the basic infrastructure to receive those markers from this kind of software every time a stimuli is presented. Please refer to the Interacting_with_NIC section for the details on how NIC handles the reception of the markers.

In the following section we detail how some of the most relevant presentation software can be configured to send markers to NIC.

Presentation

The Presentation software allows to connect to a remote application by using sockets in the PCL program section of an experiment scenario. This socket can be used to send markers to NIC every time a stimuli is presented. The following example shows how to proceed in order to send markers to NIC.

scenario = "Sending triggers to NIC";

begin;

text { caption = "Hello world!"; font_size = 24; } hello;

picture {
   text hello;
   x = 0; y = 100;
} hello_pic;

trial {
   picture hello_pic;
   time = 0;
} hello_trial;

begin_pcl;

bool isConnected = false;
# socket creation
socket s = new socket();

hello.set_caption( "Connecting to trigger server..." );
hello.redraw();
hello_trial.set_duration( 1000 );
hello_trial.present();

# Connect to the NIC server. The example assumes that NIC runs
# on the same computer as Presentation. Change "localhost" by the IP or
# computer's name where NIC is running. The NIC server runs on port 1234.
# The time-out at 5 secs (5000 ms) can be changed according to your needs.
# 8 bits for the codification and no ecryption.
isConnected = s.open( "localhost", 1234, 5000, socket::ANSI , socket::UNENCRYPTED );
if isConnected == true
then
	hello_trial.set_duration( 3000 );
	loop
		int i = 1
	until
		i > 50
	begin
		hello.set_caption( "Sending trigger # " + string( i ) );
		hello.redraw();
		# The NIC server process a trigger whenever it receives 
		# a string with the following format:
		# <TRIGGER>xxx</TRIGGER>
		# where xxx is any number different from zero.
		s.send("<TRIGGER>" + string( i ) + "</TRIGGER>");
		hello_trial.present();
	
		i = i + 1
   end
else
	hello.set_caption( "Time out connecting to the server" );
	hello.redraw();
	hello_trial.present();
end
TCP/IP configuration settings in the Presentation software
Presentation extension manager
LSL data port properties

The line

isConnected = s.open( "localhost", 1234, 5000, socket::ANSI , socket::UNENCRYPTED );

can be simplified to the following in case the parameters are set in "Settings->Advanced->TCP/IP Defaults".

isConnected = s.open();

An alternative way of synchronising the presented stimulus by the Presentation software and NIC is by means of the Lab Streaming Layer (LSL) protocol. To get use of this functionality you need to install the LSL Presentation Extension in you Presentation software through the Presentation extension manager.

Once the extension is registered, it can be selected as a data port in Presentation's port settings. Information about the stream outlet name, ID, and connection status can be found in the data port properties window reachable through the "Properties" button that appears when the data port is selected within Presentation's port settings. The Connection Settings property allows users to choose whether the LSL stream outlet should be automatically opened whenever when Presentation starts, or whether it must be manually opened after Presentation is launched. All events that are logged in the Presentation logfile will also be sent out as LSL markers.


Please refer to the Interacting_with_NIC section for the details on how to configure NIC to handle the reception of the markers from the LSL.

ePrime

E-Prime is a suite of applications for designing and running experiments. This software can send markers to NIC in a similar way as the Presentation software. By using its programming features a TCP socket can be created to connect to the host and port where NIC runs and then send marker whenever the stimuli are presented. The following link eprime2NIC_example.zip contains an example on how to send TCP markers from E-Prime to NIC.

In the newer version of E-Prime, you can also configure a task to send TCP triggers and TTL pulses automatically when a stimulus is shown, as described here.

Matlab

Matlab can also be used to generate ERP experiments. It can send markers to NIC using the LSL library. To do it, it's necessary to install the LSL library in Matlab and send the triggers following the LSL standard for markers.

The following Matlab Script contains an example on how to send markers from Matlab to NIC.

The latest version of the Matlab LSL library can be download from here.

References

<references />