




Definition of Mark
In neuroscience experiments, event markers (Mark) are the core means to achieve time synchronization, especially in electroencephalography (EEG) studies, the accuracy of Mark directly determines the validity and scientificity of the subsequent data analysis.
Role of Mark
During EEG experiments, Mark is used to record the exact point in time at which a particular experimental event or stimulus is presented and embed it in the timeline of the EEG signal. This event-signal time-locking mechanism facilitates the later stage:
①Event-related potential (ERP) extraction and analysis
② Comparison of stimulus categorization (conditioned effects analysis)
(iii) Alignment of subject reaction time with neural response timing
Mark's realization
In EEG-based experiments, the E-Prime software is usually used for stimulus presentation and Mark control. The program architecture is divided into two parts:
Structural Programming:Through E-Prime's timeline settings, spatiotemporal attributes such as the order of stimulus presentation, duration, and interval are defined to ensure that the experimental process is rigorous and controllable.
Functional Programming: TheCombined with hardware synchronization interfaces (e.g., parallel port, serial port, network TTL, etc.), it achieves millisecond output of Mark signals for precise synchronization with the EEG acquisition system.
Event-based signal segmentation and overlay analysis can only be carried out if Mark is accurately embedded in the EEG timeline.
Types of Mark
Depending on the experimental needs, Mark is mainly categorized intoStimulus Category Mark, ,Response event MarkandStimulus number MarkThere are three types, which have different roles in the experimental process.
Stimulus Category Mark (required))
Definition:Each experimental condition/stimulus category was uniquely coded for later segmentation, stacking, and counting of data by condition.
Applications:Most paradigms such as ERP, behavioral experiments, etc., must be typed into the stimulus category Mark.
Example:When studying "the effect of product advertisements on purchase intentions", it can be defined:
Condition 1: Advertisement with intervention (Mark=11)
Condition 2: No intervention in advertising (Mark=7)
Since there is no right/wrong nature of "buy/no buy", there is no need for a Response Event Mark, only a Stimulus Category Mark.


Reaction Event Mark (optional)
Definition: There are two types of information that mark a subject's response:
Reaction positive and negative Mark:Direct marking of subjects' responses as correct (Mark=1) or incorrect (Mark=2)
Reaction key Mark:The actual keystroke mark (e.g., j-key (Mark=12); f-key (Mark=11)) that the subject responded to in the probing interface was typed directly in the EEG


"Response Positive Mark":
Role:During the experiment, the system can automatically mark "correct" or "incorrect" according to whether the subject's answer is correct or not, so as to filter the correct or incorrect trials for analysis at a later stage.
Hit Mark way:It must be typed in real time after the subject's response, usually after the stimulus response interface, and is accomplished through InLine programming.
"Reaction Button Mark":
Role:The specific value of the key pressed by the subject is recorded directly without judging the correctness or incorrectness. Data classification is required later in conjunction with behavioral data.
Hit Mark way:Typed at the moment of the subject's keystroke, the data analysis needs to be combined with behavioral response data.
Stimulus number Mark (optional))
Definition:Numbering each Trial makes it easier to accurately weed out anomalies at a later stage.
Hit Mark way:It must be typed in before the start of each Trial, usually before the Fixation, to ensure that each Trial is individually numbered.
Example:When analyzing behavioral data, if an extreme abnormality is found in the reaction time of a Trial, the corresponding physiological data can be found and eliminated based on its number (e.g., Mark=70) to improve the reliability of data analysis.



The three common forms of E-prime marking are serial, parallel and network card.
Parallel Port:
Pros:
① Millisecond time accuracy with very low system delay (suitable for high time accuracy experiments such as EEG)
② support flexible event marking function, marking value can range from 0-255 (for marking standardization and stability considerations, marking value of 0 is not recommended for event triggering, so it is recommended to use marking value of 1-255 for event coding and classification in practical applications)
Drawbacks:
Most current laptops haveNo longer equipped with a standard parallel portThereforePlaying Mark through the parallel port is not directly supported.
Network Card:
Pros:
be in favor ofMultiple end devices connect and synchronize data via WiFi network, realizing a truly cross-platform and cross-device experimental solution.
Without relying on traditional parallel ports or dedicated hardware interfaces, the system can do the following as long as they are on the same local area network (LAN):
①Multiple computers synchronized access to the experimental system
②Multi-device parallel acquisition
③ Cross-room or remote deployment of experimental scenarios
No special requirements for computers: no need for special interfaces or high-compatibility hardware, only need to have basic network connectivity, you can quickly deploy experiments, significantly reducing the threshold for system construction.
Drawbacks:
Although WiFi-based networking provides great flexibility and deployment convenience, it is highly dependent on the stability of the network environment, and there are still some technical limitations in some experiments that are extremely sensitive to time synchronization.
Specifically:
① Wireless networks may experience delay fluctuations (jitter) or packet loss in data transmission, especially in complex or interference-rich network environments;
② Therefore, it is not recommended to use wireless networking schemes in e.g., event-related potential (ERP) and neural time-locking type EEG experiments to avoid the impact on the temporal accuracy and reproducibility of the results.
Serial Port:
Pros:
Among the event marking requirements of various experimental devices, serial port, as a traditional and reliable data communication method, has good compatibility and adaptability, especially suitable for the current mainstream experimental environment.
① Widely compatible, generally supported by mainstream devices: most of the EEG, eye movement instrument, near infrared brain imaging instrument and other scientific research equipment, all provide serial event input function, which is convenient to achieve a unified event marking protocol between different systems without customizing the interface, reducing the complexity of integration.
②Adapted to modern computers, no need for parallel port support: With modern laptops gradually eliminating parallel port interfaces, the serial port, with its flexible access via USB converters, is ideal for bridging experimental synchronization between old and new devices.
Drawbacks:
Although serial ports are widely used in a variety of experimental environments due to their good compatibility and modern adaptability, there are still some technical limitations in scenarios that require high event synchronization accuracy, and researchers need to fully weigh them when deploying solutions.
① Limited transmission rate: Serial communication uses bit-by-bit serial transmission, and its data rate is usually lower than that of parallel port or network communication protocol. In experiments that require high-speed transmission of a large number of event markers or concurrent processing of multiple channels, a bottleneck may occur.
② Synchronization accuracy is relatively average: due to communication delay fluctuations and serial processing characteristics, serial ports are not as stable as parallel ports or hardware triggering mechanisms for millisecond-level event synchronization.
Now, we've learned about the different types of Mark, application scenarios and common forms of marking. In the next tweets, we will demonstrate step-by-step how to properly Mark in E-Prime, so stay tuned!