# Annotation count inconsistency

**URL:** https://mne.discourse.group/t/annotation-count-inconsistency/8711
**Category:** Support & Discussions
**Created:** [April 25, 2024, 5:13pm UTC](https://mne.discourse.group/t/annotation-count-inconsistency/8711 "2024-04-25T17:13:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![yusuf8834](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/yusuf8834/32/3624_2.png) [@yusuf8834](https://mne.discourse.group/u/yusuf8834)
#### Post date: [April 25, 2024, 5:13pm UTC](https://mne.discourse.group/t/annotation-count-inconsistency/8711/1 "2024-04-25T17:13:29Z")

</div>

Hello,

I am currently working with EDF+ files and have encountered an inconsistency in the number of annotations reported by two different libraries, MNE and edfio. I am seeking insights into why these differences might occur and how can I be sure I get the all annotations.

Here is a brief overview of what I observed:

Using MNE to read an EDF+ file:

```python
import mne
file = "./edfs/EDNDOTKK.edf"
data = mne.io.read_raw_edf(file, verbose=True)
annotations = data.annotations
print(len(annotations)) # Outputs: 1272

```

Using edfio to read the same EDF+ file:

```python
from edfio import read_edf
file = "./edfs/EDNDOTKK.edf"
edf = read_edf(file)
print(len(edf.annotations)) # Outputs: 1306

```

Given that both libraries are reading the same file, I expected the number of annotations to match, but they do not. This file includes redacted annotations, which might be affecting the parsing process.

Any insights or recommendations on how to further investigate or resolve this discrepancy would be greatly appreciated.

- MNE version: 1.7.0
- Operating system: Windows 11

edit: Further research thought me that my files are edf+D.

Thank you!

---

<div class="post-metadata">

### Author: ![cbrnr](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/cbrnr/32/1409_2.png) [@cbrnr](https://mne.discourse.group/u/cbrnr)
#### Post date: [April 25, 2024, 7:41pm UTC](https://mne.discourse.group/t/annotation-count-inconsistency/8711/2 "2024-04-25T19:41:43Z")

</div>

I don’t know if there’s a package that can reliably read EDF+D files. However, EDFbrowser includes a command line tool to convert an EDF+D file to multiple EDF+C files, which can be read by both `edfio` and `mne`.
