Pre-processing: Artifact Rejection and Correction

Video Navigator

  1. Overview of Artifacts (25s)
  2. Why We Care About Artifacts (1m 02s)
  3. Ocular Artifacts: Blinks (2m 06s)
  4. Ocular Artifacts: Eye Movements (2m 37s)
  5. Drift: Slow Voltage Shifts (3m 22s)
  6. Amplifier & ADC Saturation/Blocking (3m 53s)
  7. Alpha (4m 14s)
  8. Muscle & Heart (4m 59s)
  9. Speech-Related Artifacts (5m 23s)
  10. Other Artifacts (5m 48s)
  11. Dealing with Artifacts (6m 41s)
  12. Signal Detection (7m 12s)
  13. Methods for Detecting Artifacts (7m 52s)
  14. Choosing Rejection Parameters (10m 25s)
  15. Process in Matlab (12m 12s)

Overview of Artifacts

  1. EEG records any and all electrical activity
    1. Event-related brain potentials
    2. Muscle potentials
    3. Electrocardiogram
    4. Skin potentials
    5. Ongoing EEG (e.g. alpha)
    6. Electricity from computer monitors, fluorescent lights, cell phones, etc.
  2. Activity related to things other than the brain are called artifacts

Why We Care About Artifacts

  1. Artifacts can obscure brain data of interest, decreasing signal-to-noise ratio (SNR)
  2. Some are random and attenuated with averaging, but this increases trials required
  3. Some are systematic or regular (in sync with events such as muscle activity from button presses) and not attenuated with averaging
  4. Ocular artifacts (e.g. blinks) may also mean subject didn’t see the stimulus

Ocular Artifacts: Blinks

  1. Result of the corneal-retinal potential
  2. Vertical electrooculogram (VEOG)
    1. Blinks have distinct waveform patterns at the VEOG channels

Ocular Artifacts: Eye Movements

  1. Also result of the corneal-retinal potential
  2. Bipolar horizontal EOG (HEOG) recordings
    1. distinct patterns at HEOG electrodes, box like patterns
  3. Eye movements occur in saccades
  4. Affect sensory input

Drift: Slow Voltage Shifts

  1. Skin potentials and sweat
  2. Changes in electrode position or imepdance
    1. e.g. due to subject shifting, electrolyte drying out

Amplifier & ADC Saturation/Blocking

  1. Saturation or Blocking
    1. Signal is out of range (too high/low for amplifier to register)
  2. Appears as a flat line
  3. Occurance is Rare

Alpha

  1. EEG oscillations at ~10 Hz
  2. Typically posterior
  3. Occurs when concentrating, tired, or has eyes closed
  4. Alpha can be reduced if intertrial intervals are jittered to reduce chance of alpha staying in sync with task events

Muscle & Heart

  1. Electromyogram (EMG) - muscle movements
    1. Jaw clenching, forehead muscles
  2. Electrocardiogram (EKG) - beating of the heart

Speech-Related Artifacts

  1. EMG in response to speech (glossokinetic artifacts)
  2. Muscle activity involved in speech production
  3. Electrical gradient across the tongue
  4. Leads to limitations on studies involving language production

Other Artifacts

  1. C.R.A.P. - Commonly Recorded Artifactual Potentials
  2. Some examples of behaviors that generate C.R.A.P.:
    1. Tapping foot or bouncing leg
    2. Chewing gum
    3. Talking/muttering to oneself (e.g. “Argh!” when making errors)
    4. Trying so hard not to blink that eye muscles are twitching
  3. Make sure you are paying close attention to both the EEG and the video feed (if you have one)

Dealing with Artifacts

  1. Reduce
    1. Reduce the occurrence of artifacts
  2. Reject
    1. Exclude contaminated trials
  3. Correct
    1. Estimate the influence of the artifacts and attempt to reverse the effects
    2. (not discussing today)

Signal Detection

  1. Signal Detection is needed for Artifact Rejection
    1. Smoke detector example
      1. You need to select a threshold value so you don’t miss the smoke of a fire, but you also don’t have the alarm going off every time you burn toast
  2. Possible outcomes
    1. Hit: signal present, with response
    2. Miss: signal present, no response
    3. False alarm: no signal present, response made
    4. Correct Rejection: no signal present, did not respond
  3. Want to have as many hits and correctly identified rejections as we can, while reducing false alarms and misses

Methods for Detecting Artifacts

  1. Simple Voltage Threshold
    1. Sets an upper and lower threshold and marks any trial that exceed either threshold
    2. Useful for detecting blinks but not very useful for other artifacts
    3. Why?
      1. Impacted by baseline correction
        1. If you have not baseline corrected then the activity may not fall in your window, or you may have a false alarm because the data falls too close to the threshold
  2. Moving Window Peak-to-Peak Amplitude
    1. Define window width and step, and voltage threshold
    2. Measures the difference between each peak between highest peak and lowest peak within the window
    3. Marks trial if peak-to-peak amplitude exceeds threshold
      1. Will detect blinks regardless of baseline or drift
      2. Better for isolating individual artifacts
  3. Step function
    1. Useful for detecting small eye movements
    2. Uses a moving window to find the difference in mean amplitude between two regions

Choosing Rejection Parameters

  1. Choosing channels to use in artifact rejection
    1. Typically eye channels
    2. May choose channels based on component of interest
    3. NOT Bad channels
  2. Voltage thresholds (e.g. -75 to 75 μV)
    1. Tailoring to individual subjects
  3. Choosing relevant time windows (e.g. -200 to 750 ms)
    1. Component of interest
    2. Motor response or blink breaks

Process in Matlab

Manual Artifact Rejection

  1. Open Matlab and Set Path to EEGlab and ERPlab plugins
  2. Open EEGlab
  3. File > Load existing dataset > epoch.set
    1. Loads as Dataset 1
    2. Tells you what has happened to the dataset so far in the name
  4. Tools > Channel Data (scroll)
    1. Look through all trials for artifacts and select (click) trials that have artifacts that you want to remove
    2. Click Reject and say "yes: to reject the selected trials
    3. Save this step
    4. This Creates Dataset 2

Automated Artifact Rejection

  1. Select Dataset 1
  2. ERPlab > Artifact Detection in Epoched Data > Simple Voltage Threshold
    1.  Period
      1. -150 150 (space between)Voltage Threshold 100
    2. Voltage Threshold
      1. -75 75
    3. Channels
      1. Eye channels FP2, HEOG R, HEOG L, VEOG L
    4. Mark Flag 1
    5. Accept
    6. Matlab command window will tell you how many trials were flagged
  3. ERPLAB > Artifact detection in epoched data > Moving window peak to peak threshold
      1. Note: you could have used both forms of artifact rejection by using the same dataset and setting a new flag, but we went back to the previous dataset to compare the two artifact rejection techniques
    1.  Period
      1. -200 800 (space between)Voltage Threshold 100
    2. Voltage Threshold
      1. 75
    3. Moving window
      1. 200
    4. Step
      1. 100
    5. Channels
      1. Eye channels FP2, HEOG R, HEOG L, VEOG L
    6. Mark Flag 1
    7. Accept
    8. Matlab command window will tell you how many trials were flagged
      1. This step found 50% of trials have artifacts according to these parameters for this dataset
    9. This is a save step, and we suggest keeping a "notebook" file to save/record the number and percent of trials accepted and excluded
  4. Compare the averages to determine the differences
    1. ERPlab > Compute Averaged ERPs > Exclude epochs marked and allow other default parameters
      1. Save the new erpset as a name (you also have the option to save the erpset to your computer desktop or other folders
      2. Creates a erpset in the ERPSETs list
    2. ERPlab > Plot ERP waveform
      1. Select bins of interest (Here 1:2)
      2. Select channels of interest (Here Fz, FPz, FC3, FC4)
      3. Set frames to how many channels you have so they have optimal space
      4. A y-range is default selected, you may need to adjust this, especially if your data looks flat

Additional Information

PURSUE teaching modules provide instructors with everything they need to add EEG/ERP content in existing courses, teach a full semester course, or train research assistants in the lab. Follow this link to Lab Training Modules that can be used with tutorial videos.

Associated Teaching Modules: Lab Training Modules, Artifact Rejection: Blinks