SPM8 functions

  1. convert
    Converts Biosemi to SPM data for preprocessing. Depends on modality. Typing 'modality' will display modality.
  2. filter
    • spm_eeg_filter
    • Removes unwanted frequency bands, liek those from muscles/blinking. Four different kinds: low, high, bandpass, stop.
  3. filter types
    • Lowpass = only takes what's below the cutoff frequency.
    • Highpass = only takes what's above the cutoff frequency.
    • Bandpass = only takes data within a specified range.
    • Stopband = takes everything except data within a specified range.
  4. downsample
    • spm_eeg_downsample
    • For a high frequency sampling rate, will reduce the size of the data file and thus the time needed to process the data. As long as it's above Nyquist, that's good. Maybe around 200 Hz? That's way above Nyquist but better than original sampling rate which was around 500 Hz.
  5. hgexport
    • Save images to a disk. hgexport('factorystyle') has default width, height, resolution etc. set for the exported image, or you can define a structure with your own values.
    • hgexport(gcf,'filename',hgexport('factorystyle'),'Format','tiff')
  6. montage
    • spm_eeg_montage
    • Also called referencing, and identify reference channels/remove bad channels/create an average reference point. Reduces the size of the file further. Average referencing by subtracting the mean of all channels from each individual channel. It will assign default locations to sensors, so modality is important to have set.
  7. epoch
    • spm_eeg_epoch
    • Choose the peristmulus time window for each condition, and will break continuous data into individual trials and remove long gaps between each trial.
  8. artefacts
    • spm_eeg_artef
    • We want to get rid of artefacts which are bad channels, ones that don't add anything, or where there's higher data variability/not good data. Define these bad channels using thresholding and detecting trials where signal exceeds a certain point because of things like blinking.
  9. averaging
    • spm_eeg_average
    • Produces an ERP; robust averaging will suppress artefacts without rejecting trials or channels completely, just the contaminated data. Uses weights to indicate how artefactual something is. Single trials are averaged within the trial type. Refilter after averaging to avoid high frequency noise.
  10. spm_eeg_bc
    Baseline correction, subtracts baseline from channel data.
  11. spm_eeg_grandmean
    Average of the evoked responses over subjects, or can be used to average over multiple sessions of a single subject.
  12. spm_eeg_marge
    Will concatenate multiple sessions into one, for things like graphing multiple sessions in one data graph.
  13. spm_eeg_fuse
    Allows simultaneous recording of MEG and EEG and will merge them into a single dataset as long as they don't have the same channels and they're otherwise identical (things like trials, etc).
  14. spm_eeg_weight_epochs
    Will compute linear combinations of single trials or evoked responses using a contrast vector. Can either combine trials or see what data would look like without certain trails [1 0] -- create a data file with only the first trial.
  15. spm_eeg_copy
    Will copy a dataset. Save it under a new name.
  16. spm_eeg_remove_bad_trials
    Will remove bad trials.
  17. fsample
    Will return the sample rate.
  18. size
    Will return a vector in which (1,2,3) = (channels,samples,trials).
Author
sstringer
ID
12270
Card Set
SPM8 functions
Description
Functions for SPM8
Updated