# Frequency analysis

**URL:** https://mne.discourse.group/t/frequency-analysis/1943
**Category:** Mailing List Archive (read-only)
**Tags:** list-archive
**Created:** [August 30, 2019, 12:16am UTC](https://mne.discourse.group/t/frequency-analysis/1943 "2019-08-30T00:16:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)
#### Post date: [August 30, 2019, 12:16am UTC](https://mne.discourse.group/t/frequency-analysis/1943/1 "2019-08-30T00:16:39Z")

</div>

External Email - Use Caution

Dear MNE team,

First of all, thank you for your hard work.

I am comparing different methods for EEG frequency analysis, and I have the following question/suggestions:

&nbsp;&nbsp;\* in "psd\_array\_multitaper" the user can decide to normalize the PSD by N or N\*Fs, however in "psd\_array\_welch" such choice is not available. Is this the wanted behaviour ? "psd\_array\_welch" is normalize with N\*Fs (default of scipy spectrogram I believe)  
&nbsp;&nbsp;\* In "psd\_array\_welch", the type of windowing is restrained to 'hamming' windows. Would it be possible to add an argument to choose it ?  
&nbsp;&nbsp;\* I am not very familiar with stockwell transform, but is it possible to get a spectrogram out of it ? I wanted to compare it with the other methods.

Cheers,

Bastien

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)
#### Post date: [August 30, 2019, 3:30pm UTC](https://mne.discourse.group/t/frequency-analysis/1943/2 "2019-08-30T15:30:22Z")

</div>

External Email - Use Caution

> &nbsp;&nbsp;&nbsp;- in "psd\_array\_multitaper" the user can decide to normalize the PSD  
> &nbsp;&nbsp;&nbsp;by N or N\*Fs, however in "psd\_array\_welch" such choice is not available. Is  
> &nbsp;&nbsp;&nbsp;this the wanted behaviour ? "psd\_array\_welch" is normalize with N\*Fs  
> &nbsp;&nbsp;&nbsp;(default of scipy spectrogram I believe)
> 
> We should probably just use the Welch-style normalization everywhere. It

should at least be the default. Feel free to open an MNE-Python GitHub  
issue and we can decide how to unify these.

> &nbsp;&nbsp;&nbsp;- In "psd\_array\_welch", the type of windowing is restrained to  
> &nbsp;&nbsp;&nbsp;'hamming' windows. Would it be possible to add an argument to choose it ?
> 
> Sure, feel free to make a PR to add this.

> &nbsp;&nbsp;&nbsp;- I am not very familiar with stockwell transform, but is it possible  
> &nbsp;&nbsp;&nbsp;to get a spectrogram out of it ? I wanted to compare it with the other  
> &nbsp;&nbsp;&nbsp;methods.
> 
> You can get a time-frequency representation of the data from the Stockwell

transform. I am not too familiar with it either, but Its Wikipedia page  
\<[https://en.wikipedia.org/wiki/S\_transform&gt](https://en.wikipedia.org/wiki/S_transform&gt); says it's a generalization of  
the STFT.

Eric  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20190830/34cb2f10/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190830/34cb2f10/attachment.html)
