Preprocessing

Clean the raw signal step by step before any analysis: sampling rate, filtering, line noise, bad channels, interpolation and reference.

7 lessons: 6 core, 1 recommended

After this station you can:

  • Run a full preprocessing pipeline on one participant
  • Choose filter settings for your analysis
  • Remove and interpolate bad channels, then re-reference to the average, in the right order

Lessons

  1. ResamplingCore10 min
  2. Bad channelsCore15 min
  3. clean_rawdata & ASRRecommended15 min
  4. Channel interpolationCore10 min
  5. Re-referencingCore15 min

Test yourself

6 questions. Your score stays with you and isn't sent anywhere.

1. Put the preprocessing steps in the order they are applied to continuous data on this site's path:
  1. Re-reference to the average reference
  2. High-pass filter at 0.1 Hz
  3. Interpolate the removed channels
  4. Notch filter from 58 to 62 Hz
  5. Remove the bad channels
Show the answer

The correct answer: 1. High-pass filter at 0.1 Hz, 2. Notch filter from 58 to 62 Hz, 3. Remove the bad channels, 4. Interpolate the removed channels, 5. Re-reference to the average reference

Filtering of the continuous data comes first, then bad channels. The average reference comes last, because it needs all channels spread over the head: a bad channel left in spreads its noise into every channel, and a missing one tilts the average toward the other side. So interpolation comes before it.

Review the lesson: Channel interpolation

2. Which of these choices match the "Which value should I choose?" table in the filtering lesson? (Select all that apply)
Show the answer

The correct answer: ERP analysis: high-pass at 0.1 Hz and low-pass at 30 Hz, Computing ICA: high-pass at 1 Hz on a separate copy

A 30 Hz low-pass removes everything above it, so it does not suit an analysis up to 40 Hz. A 1 or 2 Hz high-pass shrinks P3 and N400 and creates opposite-polarity deflections around them, so 1 Hz is for the ICA copy only.

Review the lesson: High-pass & low-pass filtering

3. Why do you interpolate removed channels before re-referencing to the average?
Show the answer

The correct answer: Because the average reference needs channels spread over the whole head, and a missing channel tilts the average toward the other side

An interpolated channel is a mix of its neighbors, so it adds no new information; it lowers the data rank by one. But it completes the spread of channels over the head, so the average is balanced.

Review the lesson: Channel interpolation

4. You re-referenced D1 to the average reference, excluding EOG1 and EOG2. Which statements are true? (Select all that apply)
Show the answer

The correct answer: Every scalp channel changed shape, EOG1 and EOG2 stayed as they were, The data rank dropped by one, so ICA on D1 gives thirty-one components

Every channel is the difference between its electrode and the reference, so changing the reference changes all channels together. Excluded channels are not part of the computation, so they stay the same. After an average reference the scalp channels sum to zero, so the rank drops by one. ICA weights are tied to the reference they were computed on, so do not change it afterward.

Review the lesson: Re-referencing

5. Your data were recorded at 1000 Hz, and the highest frequency you care about is 40 Hz. Which new rate is the safe choice?
Show the answer

The correct answer: 250 Hz

The rule: the new rate should be at least 2.5 times the highest frequency of interest, 100 Hz here. 80 Hz is only twice, with no margin, because the EEGLAB anti-aliasing filter fully keeps frequencies only up to 80% of the new Nyquist. 250 Hz is the common choice for ERP data.

Review the lesson: Resampling

6. Your analysis is ERP only, and you will apply a 30 Hz low-pass at the end. Do you usually need a notch filter for line noise?
Show the answer

The correct answer: Usually not, because a 30 Hz low-pass removes the 60 Hz peak; but you need it if you keep high frequencies, as in ICA or spectral analysis

The decision follows the frequencies you keep. On this site's path we remove line noise even though the analysis is ERP, because we keep high frequencies until after ICA and postpone the low-pass until after cleaning. A wide filter takes real brain and muscle activity with it, so stay within ± 2 Hz.

Review the lesson: Removing line noise (50/60 Hz)