# extracting high frequency broadband (HFB) envelope

**URL:** https://mne.discourse.group/t/extracting-high-frequency-broadband-hfb-envelope/2224
**Category:** Mailing List Archive (read-only)
**Tags:** list-archive
**Created:** [June 19, 2020, 2:26pm UTC](https://mne.discourse.group/t/extracting-high-frequency-broadband-hfb-envelope/2224 "2020-06-19T14:26:53Z")
**Posts on this page:** 3
**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: [June 19, 2020, 2:26pm UTC](https://mne.discourse.group/t/extracting-high-frequency-broadband-hfb-envelope/2224/1 "2020-06-19T14:26:53Z")

</div>

External Email - Use Caution

Hello,

I want to perform event related analysis on some high frequency amplitude of some ECoG signals.

I apply raw.filter() and raw.apply\_hilbert(envelope=true) in the frequency band of interest on my initial data.

The resulting HFB envelope contains only positive values, as an amplitude should.

Strangely once I epoch the envelope with mne.epoch() using some equally spaced stimulus releated events, the resulting epochs contain some negative value in their entries. But is does not seems that epoching shift the origin x axis or does it?

I know that I can also extract the envelope directly from epoched data but this a confusing observation and would appreciate some explanation of what could go wrong if anybody has ?

Cheers,

Guillaume Corlouer

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20200619/52b0588f/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200619/52b0588f/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: [June 19, 2020, 2:33pm UTC](https://mne.discourse.group/t/extracting-high-frequency-broadband-hfb-envelope/2224/2 "2020-06-19T14:33:02Z")

</div>

External Email - Use Caution

> Strangely once I epoch the envelope with mne.epoch() using some equally  
> spaced stimulus releated events, the resulting epochs contain some negative  
> value in their entries. But is does not seems that epoching shift the  
> origin x axis or does it?

Did you set `baseline=None`? The default  
\<[https://mne.tools/dev/generated/mne.Epochs.html#mne.Epochs&gt](https://mne.tools/dev/generated/mne.Epochs.html#mne.Epochs&gt); is  
`baseline=(None, 0.)` which would mean that your data are being baseline  
corrected (which you probably don't want).

Eric  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20200619/7f99bdde/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200619/7f99bdde/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: [June 19, 2020, 2:43pm UTC](https://mne.discourse.group/t/extracting-high-frequency-broadband-hfb-envelope/2224/3 "2020-06-19T14:43:33Z")

</div>

External Email - Use Caution

Turns out I didn't set `baseline=None`, indeed I don't want it to be baseline corrected, this solved the problem, thanks a lot !
