[Eeglablist] PSD problems when using pwelch on plotting spectra and maps

Federico Gabriel Arguissain fga at hst.aau.dk
Thu Jun 16 07:48:55 PDT 2011


Dear all,

I have been trying to plot the spectra of an EEG register (raw data) with "Plot-> Plot spectra and maps", which uses the pwelch function. The register was sampled at 512 Hz, saved on a cnt file and imported using the ANT plugin (v1.09). I selected a 100% of data to sample and a frequency range of 0 to 256 Hz to plot. For the topoplot() function I used the default options (according to the Command window it uses: windows length  512, fft length 1024, overlap 0)
I found out that the PSD plot showed a response more similar to the Hamming window than the PSD of the signal. Even changing the overlap the response was the same or even worse.
It turned out that only when putting the same window length and fft length ( 512 and 512, 1024 and 1024, etc.) the PSD function had the shape of a "realistic" recording. Also removing the DC improved a lot the plot.
My partner José Biurrun Manresa tried to obtain the PSD without using the EEGLAB interface and I obtained the same results with this register. What really improved the obtained plot was detrending the signal:

plot(10*log10(pwelch(detrend(EEG.data(1,:)))))
Probably would be a good idea to suggest detrending the signal or removing the offset before plotting the spectra of raw data. Any suggestion on this would be great. Thanks in advance.

Best regards,
Federico Arguissain


----------------------------------------------
Federico Gabriel Arguissain, Ph.D. fellow

Center for Sensory-Motor Interaction - SMI
Department of Health Science and Technology - HST
Aalborg University

Fredrik Bajers Vej 7E-1, DK-9220 Aalborg E, Denmark
phone:  +45 9940 9762
email: fga at hst.aau.dk<mailto:fga at hst.aau.dk>
Skype: federico.arguissain
http://www.smi.hst.aau.dk/
----------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110616/f8f9e1a8/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: uploads-2011-06-16_1321.txt
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110616/f8f9e1a8/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PSD S1S1_cond1b_default_1.png
Type: image/png
Size: 138823 bytes
Desc: PSD S1S1_cond1b_default_1.png
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110616/f8f9e1a8/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PSD S1S1_cond1b_default_enlarge.png
Type: image/png
Size: 150999 bytes
Desc: PSD S1S1_cond1b_default_enlarge.png
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110616/f8f9e1a8/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PSD S1S1_cond1b_nfft 512 winsize 512.png
Type: image/png
Size: 140563 bytes
Desc: PSD S1S1_cond1b_nfft 512 winsize 512.png
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110616/f8f9e1a8/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PSD S1S1_cond1b_nfft 512 winsize 512_enlarge.png
Type: image/png
Size: 126755 bytes
Desc: PSD S1S1_cond1b_nfft 512 winsize 512_enlarge.png
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110616/f8f9e1a8/attachment-0003.png>


More information about the eeglablist mailing list