NeuroAnalyzer tutorials: Plot (3)

Load data:

using NeuroAnalyzer
using ContinuousWavelets
eeg = load("files/eeg.hdf");
[ Info: Loaded: EEG (24 × 282991 × 1; 1105.43 s)

Plot spectrogram (STFT):

plot_spectrogram(eeg, ch="Fp1", db=true)

(!) To smooth the histogram, use smooth=true option and n parameter (kernel size of the Gaussian blur; larger kernel means more smoothing).

plot_spectrogram(eeg, ch="Fp1", db=true, smooth=true, n=5)

Plot spectrogram (multi-taper):

plot_spectrogram(eeg, ch="Fp1", db=true, method=:mt)

Plot spectrogram (Morlet wavelet):

plot_spectrogram(eeg, ch="Fp1", db=true, method=:mw)

Plot spectrogram (Gauss-Morlet):

plot_spectrogram(eeg, ch="Fp1", method=:gh)

Plot spectrogram (continuous wavelet transformation):

plot_spectrogram(eeg, ch="Fp1", method=:cwt, wt=wavelet(Morlet(6), β=2, Q=128))

Plot multi-channel spectrogram:

plot_spectrogram(eeg, ch="eeg", db=true, frq_lim=(0, 50))

To mark a thresholded region:

plot_spectrogram(eeg, ch="Fp1", db=true, smooth=true, n=5, frq_lim=(0, 50), threshold=0, threshold_type=:geq)

(!) threshold parameters sets the region (0 dB in that case), the following types of thresholding are available:

  • :eq: draw region is values are equal to threshold
  • :neq: draw region is values are not equal to threshold
  • :geq: draw region is values are ≥ to threshold
  • :leq: draw region is values are ≤ to threshold
  • :g: draw region is values are > to threshold
  • :l: draw region is values are < to threshold