# Edge effects and trial-based epoching

**URL:** <https://mne.discourse.group/t/edge-effects-and-trial-based-epoching/8790>\
**Category:** Support & Discussions\
**Tags:** preprocessing, eeg, epochs\
**Created:** [May 10, 2024, 3:07pm UTC](https://mne.discourse.group/t/edge-effects-and-trial-based-epoching/8790 "2024-05-10T15:07:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Goliath](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@Goliath](https://mne.discourse.group/u/Goliath)\
**Post date:** [May 10, 2024, 3:07pm UTC](https://mne.discourse.group/t/edge-effects-and-trial-based-epoching/8790/1 "2024-05-10T15:07:12Z")

</div>

I perform a preproccessing on a task-related EEG data from [here](https://openneuro.org/datasets/ds003838/versions/1.0.6) in order to reconstruct sources with eLORETA and then create functional connectivity matrices with some FC metrics (wPLI, imCoh and PLV). The dataset’s experiment includes stimuli presentation 2 seconds apart, so I create epochs in [-0.5; 2] second interval around the corresponding event. What I’m concerned about is that, according to [this video](https://www.youtube.com/watch?v=9j_FoEFJqV0), I might have edge effects due to dividing the data. On the other hand, I don’t see such artifacts in the time-frequency plane:

![изображение](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/e/ef328508cfda543223662444abe90aea8dc57397.png)

All in all, my questions are:

1. Should I really care about these edge effects, provided they don’t seem to take place and I use phase-based FC metrics?
2. If I should, how could I deal with them? The video suggests creating buffering zones on the edges of an epoch; I guess, it is exactly what the overlap parameter in the make\_fixed\_length\_epochs function is used for. Obviously, there is no such parameter in the Epochs class constructor. Should I use make\_fixed\_length\_epochs instead, relying on the fact that stimuli events are evenly spaced? Is there another way of dealing with such artifacts?
