Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tutorial:plot_a_time-frequency_representation_and_power_spectrum_of_a_single_channel [2011/10/16 20:52]
Rick Jansen
tutorial:plot_a_time-frequency_representation_and_power_spectrum_of_a_single_channel [2014/04/07 23:56] (current)
Simon-Shlomo Poil
Line 1: Line 1:
 ====How to plot a time-frequency representation and power spectrum of a single channel ==== ====How to plot a time-frequency representation and power spectrum of a single channel ====
  
-A simple way to explore your signal is to plot the time-frequency representation (TF-plot) and power spectrum. The TF-plot will tell you how the power in different frequency bands changes over time, and the power spectrum shows you the time-averaged power.+A simple way to explore your signal is to plot the time-frequency representation (TF-plot) and power spectrum. The TF-plot will tell you how the power in different frequency bands changes over time, and the power spectrum shows you the time-averaged power. 
  
-To plot a time-frequency representation and power spectrum in NBT you first need to load the signal you are interested in.+To plot a time-frequency representation and power spectrum in NBT you can use [[http://nbtoolbox.hg.sourceforge.net/hgweb/nbtoolbox/NBTrelease/file/tip/Visualization/nbt_plot_TF_and_spectrum_one_channel.m|this function]]. Open the GUI, load a NBT signal, and go to **Visualization|Plot time-frequency plot and power spectrum of one channel**. A dialog window will ask you to specify plot parameters. You can, e.g., set the 'print PDF' to 1, and a PDF file of the plot will be saved, or you can change the frequency range. You can also change these parameters directly from the plot
  
-  - Write //nbt_gui// in the command window, or if you have EEGlab open; go to **NBT|Menu tools|Close EEGLAB, open NBT**. +Click 'OK' when you are done. A window like this will pop-up:
-  - Then go to **File|Load NBT Signal** in the NBT window. +
- +
-When the signal is loaded, go to **Visualization|Plot time-frequency plot and power spectrum of one channel**. A dialog window will ask you to specify plot parameters. You can, e.g., set the 'print PDF' to 1, and a PDF file of the plot will be saved, or you can change the frequency range. You can also change these parameters directly from the plot.  +
- +
-Click 'OK' when you are done. The following interface will pop-up.+
  
 {{:tutorial:tfspectrumplot.png|}} {{:tutorial:tfspectrumplot.png|}}
  
 In the top of the window you see the TF-plot, in the case shown you see clear alpha (10 Hz) activity during the whole recording. Using the slide bar you can change the color scale of the plot. You can also set the color scale by clicking on the //Edit plot parameters// button, and change the //color interval// parameter to, e.g., 0 100. You can change between channels by clicking on the desired channels in the middle listbox, or by right-clicking on the topographic plot on the channel (in case of EEG data). Finally, you can compute the TF-plot using wavelets instead of multi-tapers, which will give a more smooth image. In the top of the window you see the TF-plot, in the case shown you see clear alpha (10 Hz) activity during the whole recording. Using the slide bar you can change the color scale of the plot. You can also set the color scale by clicking on the //Edit plot parameters// button, and change the //color interval// parameter to, e.g., 0 100. You can change between channels by clicking on the desired channels in the middle listbox, or by right-clicking on the topographic plot on the channel (in case of EEG data). Finally, you can compute the TF-plot using wavelets instead of multi-tapers, which will give a more smooth image.
- 
  
 In the left corner you see the power spectrum, in this case a clear 10 Hz peak is present.  In the left corner you see the power spectrum, in this case a clear 10 Hz peak is present. 
  
- +To compute and store amplitudes in several frequency bands, go to the tutorial [[tutorial:amplitude_in_classical_frequency_bands|]].
- +
-To compute amplitudes in several frequency bands, go to the next tutorial [[tutorial:amplitude_in_classical_frequency_bands|]]+
  
 ==== Command line usage ==== ==== Command line usage ====
- 
  
 You can also plot the TF-plot and spectrum using the the command line: You can also plot the TF-plot and spectrum using the the command line:
Line 54: Line 45:
 </code> </code>
 will plot channel number 1 with all the default settings for the other parameters.\\ will plot channel number 1 with all the default settings for the other parameters.\\
 +
 +<html>
 +<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
 +<!-- nbtwikibundbar -->
 +<ins class="adsbygoogle"
 +     style="display:inline-block;width:728px;height:90px"
 +     data-ad-client="ca-pub-8640848843881724"
 +     data-ad-slot="2215324537"></ins>
 +<script>
 +(adsbygoogle = window.adsbygoogle || []).push({});
 +</script></html>
  
    
tutorial/plot_a_time-frequency_representation_and_power_spectrum_of_a_single_channel.1318798342.txt.gz · Last modified: 2011/10/16 20:52 by Rick Jansen
The NBTwiki platform - version 2.8 - 9 May 2013
Copyright (C) 2008-2015