| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Last updated:10 June 2025
Summary
This study is designed to examine the relationship between the late positive potential (LPP) of the event-related potential (ERP) and subsequent memory at varying delays. EEG is recorded as participants are presented with a list of 200 neutral words, 200 negative words, and 40 animal words. The task is to press a button to indicate whether the word is an animal word. After a short delay, half the presented stimuli along with new neutral, negative, and animal words are presented and participants compete a remember/know/new memory test. The other half of the stimuli are tested in a memory test the next day.
Contact Information
Eric Fields
e_fields2@uncg.edu
UNC Greensboro
License
Copyright (c) 2025, Eric Fields
All rights reserved.
This code is free and open source software made available under the terms of the 3-clause BSD license:
https://opensource.org/licenses/BSD-3-Clause
Software Versions
Code was developed and tested in MATLAB 2023a, EEGLAB 2023.1, ERPLAB 10.04, Python 3.10 & 3.11, and pandas 2.1.4.
I. Pre-processing
II. ICA Decomposition
Run pre_ICA_rej. A window will pop up. Scroll through the data and click to highlight each epoch that should be excluded from the ICA training set (these will not be permanently deleted from the data). The goal is to exclude epochs with artifact that is not from a regular, consistent source such as EMG, EOG, or EEG. For example, trials with random drift or jump on particular electrodes (e.g., as a result of the participant moving) should be excluded. Don't be afraid to be aggressive here to get the best ICA solution. When finished, click "Update Marks" at the bottom right of the window.
Run save_ICA_rej immediately after marking trials for exclusion for ICA. This will save the selections you made. It will also ask you if you want to exclude any electrodes from ICA training. You should only do this for electrodes you plan to interpolate later.
Run run_ICA. This will perform ICA for any participant that has the information from the pre-ICA rejection steps, but does not have ICA weights. It will save the calculated weighting matrix to a file and to the preart EEGset.
III. Artifact correction and rejection
Run from_preart. This script will load the preart EEGset. If there is no subject-specific artifact rejection script, one will be created from the default script. If a script already exists, it will be opened.
In the EEGLAB GUI, click on Tools -> Inspect/label components by map. Then click on Plot -> Component activations (scroll) and also Plot -> Channel activations (scroll). Inspect the scalp maps of the components and the activation pattern of the components (in comparison with activations in the original channel data) to determine which independent components represent correctable artifact. This generally consists of 1-3 components that represent blinks and saccades.
In the artifact rejection script, change the ICrej variable to an array of all components to be rejected (e.g., [1, 3]). If one or more of these components seem to capture blinks well, change the blink_corr variable to true. If you do not wish to perform ICA correction, you can leave both of these variables set to false. Note that trials with blinks in the -50 - 200 ms range will be rejected even if blinks are corrected, because the participant had their eyes closed when the stimulus was presented.
Run the artifact rejection script.
When the confirmation dialogue comes up, click "Plot single trials" and scroll through the data to check whether the ICA correction is accurately removing the intended artifact and only the intended artifact. Then click "Accept".
When the script finishes there will be a summary of artifact detection in the command window which describes rejected trials per channel and per detection algorithm. Two windows will pop up, one showing the data and the other a table showing artifact rejection values for each channel for each rejection algorithm. This table represents the trial the mouse is currently hovering over. Scroll through the data and determine if artifact detection is adequately separating trials that should and should not be rejected. If not, try to determine what changes to algorithm thresholds or other parameters could improve artifact detection. At the command prompt, type 'y' if you are satisfied with artifact correction and rejection and want to save and proceed. Type 'n' if you would like to make some changes to the artifact rejection script and run again. Continue this process until you are satisfied. NOTE: If for any reason an error is generated and the artifact rejection script does not finish running correctly, you need to restart the process by re-running from_preart. This will ensure you are working with the preart set, not a set with partial artifact correction/rejection (running the artifact rejection script again on such a set will cause problems).
IV. Averaging
Code for and results of statistical analysis can be found in the stats folder.
| Back | FazBrowse Home | New Git URL |