# Width of the transition band when applying a Hilbert	transform

**URL:** <https://mne.discourse.group/t/width-of-the-transition-band-when-applying-a-hilbert-transform/1403>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [January 20, 2018, 10:45pm UTC](https://mne.discourse.group/t/width-of-the-transition-band-when-applying-a-hilbert-transform/1403 "2018-01-20T22:45:46Z")\
**Posts on this page:** 9\
**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:** [January 20, 2018, 10:45pm UTC](https://mne.discourse.group/t/width-of-the-transition-band-when-applying-a-hilbert-transform/1403/1 "2018-01-20T22:45:46Z")

</div>

Hello,

My question relates more to a signal processing issue, so apologies in  
advance if it is not appropriate for the forum.  
I am currently doing an exploratory EEG power analysis using the  
filter-Hilbert transform and would appreciate some advice on the  
parameterization of the band-pass filter. For each epoch and time step, I  
want to compute the power of each frequency from 1 to 30 Hz (in steps of  
1).  
I am thus bandpass filtering the data prior to the application of the  
Hilbert transform (so I bandpass filter from 1 to 2Hz, then from 2 to 3hz  
etc. ).  
Mne's FIR filter implemented via mne.filter.filter\_data is perfect for this  
purpose, but I am wondering if I should use the default automatic width of  
transition band, or whether i should set l\_trans\_bandwidth and  
h\_trans\_bandwidth  
to some fixed value x across all frequency bands. If so, how should I set x  
to achieve a good balance between frequency/timing precision ?

Best,  
J.  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20180120/c5561245/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180120/c5561245/attachment.html)

---

<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:** [January 22, 2018, 8:17pm UTC](https://mne.discourse.group/t/width-of-the-transition-band-when-applying-a-hilbert-transform/1403/2 "2018-01-22T20:17:51Z")

</div>

hi J,

may I ask what you are aiming to do afterwards with these filtered data?

Alex

---

<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:** [January 22, 2018, 8:27pm UTC](https://mne.discourse.group/t/width-of-the-transition-band-when-applying-a-hilbert-transform/1403/3 "2018-01-22T20:27:45Z")

</div>

Hello,  
I mainly want to estimate theta, alpha, and beta power in the 200-600ms  
postimulus window. Note that I could bandpass filter the data in the  
corresponding ranges (e.g., theta: 4-7).

averaged power in a specific temporal window (200 600ms poststimulus) for  
theta bvand, alpha band, and beta band.

---

<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:** [January 22, 2018, 8:30pm UTC](https://mne.discourse.group/t/width-of-the-transition-band-when-applying-a-hilbert-transform/1403/4 "2018-01-22T20:30:22Z")

</div>

I would fix the transition band widths otherwise you will have different  
filters per band. In one of our examples we do something similar.

Denis

---

<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:** [January 22, 2018, 8:31pm UTC](https://mne.discourse.group/t/width-of-the-transition-band-when-applying-a-hilbert-transform/1403/5 "2018-01-22T20:31:03Z")

</div>

hi,

how about starting with something like this:

[http://martinos.org/mne/stable/auto\_examples/time\_frequency/plot\_time\_frequency\_global\_field\_power.html](http://martinos.org/mne/stable/auto_examples/time_frequency/plot_time_frequency_global_field_power.html)

?

HTH  
Alex

---

<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:** [January 22, 2018, 8:32pm UTC](https://mne.discourse.group/t/width-of-the-transition-band-when-applying-a-hilbert-transform/1403/6 "2018-01-22T20:32:33Z")

</div>

Yes, this is the example I had in mind.

---

<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:** [January 22, 2018, 11:11pm UTC](https://mne.discourse.group/t/width-of-the-transition-band-when-applying-a-hilbert-transform/1403/7 "2018-01-22T23:11:58Z")

</div>

Hi J,

Note that 1 Hz wide filters are very narrow, especially if you want to  
analyze only a 400 ms window. The higher your frequency resolution, the  
lower your temporal resolution.

Best,  
Ross

---

<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:** [January 23, 2018, 2:46pm UTC](https://mne.discourse.group/t/width-of-the-transition-band-when-applying-a-hilbert-transform/1403/8 "2018-01-23T14:46:16Z")

</div>

Hi Ross,

I agree. I set the transition band to 2 Hz, but I don't know if that will  
provide sufficient temporal resolution. Is there some analytic way to  
determine the temporal/spectral precision based on the width of the  
transition band?  
Best,  
J

---

<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:** [January 23, 2018, 7:42pm UTC](https://mne.discourse.group/t/width-of-the-transition-band-when-applying-a-hilbert-transform/1403/9 "2018-01-23T19:42:51Z")

</div>

Unfortunately there's no hard and fast rule. In general you should filter  
as "gently" as possible, since impulse responses can get shockingly long  
with steeper slopes in the frequency domain. The best way to know how  
spread in time your filtered signal is going to be is probably to look  
directly at the filter impulse response (or the envelope of the IR). That  
will give you and idea of how much the estimate at one time point depends  
on the time points nearby.

Another good thing to do is to make some synthetic, known input signals and  
process them to see how your analysis affects them.

Hope that helps,  
Ross
