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/05/09 14:58]
Simon-Shlomo Poil
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 show you the average 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 PDFto 1, and a PDF file will be save of the plot, or you an change the frequency range. You can change these parameters directly from the plot.  +
- +
-Click ok when you 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 channeled in the middle listbox, or by right-clicking on the topographic plot on the channel. +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 spectruma clear 10 Hz peak is seen.  +To compute and store amplitudes in several frequency bandsgo to the tutorial [[tutorial:amplitude_in_classical_frequency_bands|]].
- +
- +
- +
-Go to the next tutorial [[tutorial:how_to_plot_integrated_amplitudes_in_several_frequency_bands_of_all_channels|]]+
  
 ==== 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 39: Line 30:
  time-frequency representation and the power spectrum. (default = [1 45])\\  time-frequency representation and the power spectrum. (default = [1 45])\\
 -//nFFT// is number of fast Fourier transforms, higher this number and the frequency resolution goes up,\\ -//nFFT// is number of fast Fourier transforms, higher this number and the frequency resolution goes up,\\
- but the time resolution goes down (default = 2^9)\\+ but the time resolution goes down (default = 2^10)\\
 -//plotting//. If plotting = 1, then a pdf plot will be generated in current\\ -//plotting//. If plotting = 1, then a pdf plot will be generated in current\\
  directory. (default = 0)\\  directory. (default = 0)\\
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.1304953085.txt.gz · Last modified: 2011/05/09 14:58 by Simon-Shlomo Poil
The NBTwiki platform - version 2.8 - 9 May 2013
Copyright (C) 2008-2015