# How to avoid epoch loss in fNIRS data processing

**URL:** <https://mne.discourse.group/t/how-to-avoid-epoch-loss-in-fnirs-data-processing/10522>\
**Category:** Support & Discussions\
**Tags:** preprocessing, fnirs, epochs\
**Created:** [November 13, 2024, 3:20am UTC](https://mne.discourse.group/t/how-to-avoid-epoch-loss-in-fnirs-data-processing/10522 "2024-11-13T03:20:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![FLF](https://avatars.discourse-cdn.com/v4/letter/f/3ab097/32.png) [@FLF](https://mne.discourse.group/u/FLF)\
**Post date:** [November 13, 2024, 3:20am UTC](https://mne.discourse.group/t/how-to-avoid-epoch-loss-in-fnirs-data-processing/10522/1 "2024-11-13T03:20:23Z")

</div>

Hello everyone，

- operating system: Windows 10  
I have a question regarding MNE version 1.6.1. When I use `mne.Epochs(reject=None, preload=False)`in fNIRS data processing,some epochs are lost.  
Could you please advise on how I might prevent this from occurring?  
Thank you very much for your time and assistance."

---

<div class="post-metadata">

**Author:** ![wmvanvliet](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/wmvanvliet/32/100_2.png) [@wmvanvliet](https://mne.discourse.group/u/wmvanvliet)\
**Post date:** [November 13, 2024, 7:58am UTC](https://mne.discourse.group/t/how-to-avoid-epoch-loss-in-fnirs-data-processing/10522/2 "2024-11-13T07:58:36Z")

</div>

Disclaimer: I’ve never worked with fNIRS data and know nothing about it

Epochs can also be dropped because of annotations in the raw (continuous) data. Check `raw.annotations` and see what it there. Any annotations starting with `BAD` are considered stretches of bad data in which no epochs will be created. Another important annotation is made when multiple raw files are concatenated. The boundary between two raw files is considered bad data as well.

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [November 13, 2024, 8:49am UTC](https://mne.discourse.group/t/how-to-avoid-epoch-loss-in-fnirs-data-processing/10522/3 "2024-11-13T08:49:25Z")

</div>

Hello and welcome to the forum! You can use `epochs.plot_drop_log()` to get some descriptives on **why** epochs were dropped.

Best wishes,  
Richard

---

<div class="post-metadata">

**Author:** ![FLF](https://avatars.discourse-cdn.com/v4/letter/f/3ab097/32.png) [@FLF](https://mne.discourse.group/u/FLF)\
**Post date:** [November 13, 2024, 12:09pm UTC](https://mne.discourse.group/t/how-to-avoid-epoch-loss-in-fnirs-data-processing/10522/4 "2024-11-13T12:09:01Z")

</div>

Thank you for your reply.  
epochs.plot\_drop\_log() indicates that the epoch dropped is “NO\_DATA”.

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [November 13, 2024, 12:51pm UTC](https://mne.discourse.group/t/how-to-avoid-epoch-loss-in-fnirs-data-processing/10522/5 "2024-11-13T12:51:08Z")

</div>

> [@FLF](#):
>
> epochs.plot\_drop\_log() indicates that the epoch dropped is “NO\_DATA”.

This usually means that those epochs extended beyond the time of the recording. This can happen if the time-locked event is close to the beginning or the end of the recording. For example, if your recording is 100 seconds long, the last event occurs after 99 seconds, and you want to create epochs from, say, –0.2 to +2.0 seconds, this won’t work. Similarly with the beginning of the recording.

Best wishes,  
Richard

---

<div class="post-metadata">

**Author:** ![FLF](https://avatars.discourse-cdn.com/v4/letter/f/3ab097/32.png) [@FLF](https://mne.discourse.group/u/FLF)\
**Post date:** [November 13, 2024, 1:45pm UTC](https://mne.discourse.group/t/how-to-avoid-epoch-loss-in-fnirs-data-processing/10522/6 "2024-11-13T13:45:32Z")

</div>

Thank you very much for your reply, which helped me solve my problem.

Best wishes,  
Lufeng

---

<div class="post-metadata">

**Author:** ![FLF](https://avatars.discourse-cdn.com/v4/letter/f/3ab097/32.png) [@FLF](https://mne.discourse.group/u/FLF)\
**Post date:** [November 13, 2024, 1:48pm UTC](https://mne.discourse.group/t/how-to-avoid-epoch-loss-in-fnirs-data-processing/10522/7 "2024-11-13T13:48:10Z")

</div>

thanks for your reply.

---

<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:** [November 20, 2024, 1:48pm UTC](https://mne.discourse.group/t/how-to-avoid-epoch-loss-in-fnirs-data-processing/10522/8 "2024-11-20T13:48:27Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
