difference between Raw.plot_psd and plot via computing psd and freq by psd_multitaper

Hi all,

I am trying to plot the power spectral density of 6 EEG channels
(F3,F4,C3,C4,O1,O2), but Raw.plot_psd gives me a very different plot
compared to plotting the freq and psd computed by psd_multitaper. Here is
the code:

raw.plot_psd(tmin=0,tmax=60,fmin=0,fmax=50,area_mode='std')

f,ax=plt.subplots()
psds,freqs=psd_multitaper(raw,low_bias=True,tmin=0,tmax=60,
bandwidth=None,fmin=0,fmax=50,proj=True,picks=picks,n_jobs=1)

psds = 10*np.log10(psds)
psds_mean = psds.mean(0)
psds_std = psds.std(0)

ax.plot(freqs,psds_mean,color='k')
ax.fill_between(freqs,psds_mean - psds_std, psds_mean + psds_std,color='k',
alpha=.5)

Here are the graphs:

[image: Inline image 2][image: Inline image 1]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161005/2a916d40/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 28587 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161005/2a916d40/attachment-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 155405 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161005/2a916d40/attachment-0003.png

`raw.plot_psd` uses the Welch method by chunking the signal in time,
whereas `psd_multitaper` does not.

Eric

Hi all,

I am trying to plot the power spectral density of 6 EEG channels
(F3,F4,C3,C4,O1,O2), but Raw.plot_psd gives me a very different plot
compared to plotting the freq and psd computed by psd_multitaper. Here is
the code:

raw.plot_psd(tmin=0,tmax=60,fmin=0,fmax=50,area_mode='std')

f,ax=plt.subplots()
psds,freqs=psd_multitaper(raw,low_bias=True,tmin=0,tmax=60,b
andwidth=None,fmin=0,fmax=50,proj=True,picks=picks,n_jobs=1)

psds = 10*np.log10(psds)
psds_mean = psds.mean(0)
psds_std = psds.std(0)

ax.plot(freqs,psds_mean,color='k')
ax.fill_between(freqs,psds_mean - psds_std, psds_mean +
psds_std,color='k', alpha=.5)

Here are the graphs:

[image: Inline image 2][image: Inline image 1]

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161006/8fc9eeae/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 155405 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161006/8fc9eeae/attachment-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 28587 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161006/8fc9eeae/attachment-0003.png

Thank you very much!

Ning

`raw.plot_psd` uses the Welch method by chunking the signal in time,
whereas `psd_multitaper` does not.

Eric

Hi all,

I am trying to plot the power spectral density of 6 EEG channels
(F3,F4,C3,C4,O1,O2), but Raw.plot_psd gives me a very different plot
compared to plotting the freq and psd computed by psd_multitaper. Here is
the code:

raw.plot_psd(tmin=0,tmax=60,fmin=0,fmax=50,area_mode='std')

f,ax=plt.subplots()
psds,freqs=psd_multitaper(raw,low_bias=True,tmin=0,tmax=60,b
andwidth=None,fmin=0,fmax=50,proj=True,picks=picks,n_jobs=1)

psds = 10*np.log10(psds)
psds_mean = psds.mean(0)
psds_std = psds.std(0)

ax.plot(freqs,psds_mean,color='k')
ax.fill_between(freqs,psds_mean - psds_std, psds_mean +
psds_std,color='k', alpha=.5)

Here are the graphs:

[image: Inline image 2][image: Inline image 1]

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161005/14e72b29/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 155405 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161005/14e72b29/attachment-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 28587 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161005/14e72b29/attachment-0003.png