Interactive annotations cannot be < ~100 ms

Hi,

I’m trying to annotate some short events on a continuous recording using the interactive annotation tool in raw.plot but it seems that I cannot create annotations shorter than ~ 100 ms (with sampling rate at 500 Hz). Anything shorter than that just disappears once I release the mouse drag. I get this issue in my data but also in the interactive annotation example below.

I’m wondering if this is expected and if there is a way to create shorter or even single-sample annotations using the interactive tool?

Thank you!

MP

Platform: Linux-5.4.0-67-generic-x86_64-with-glibc2.31
Python: 3.9.2 (default, Mar 3 2021, 20:02:32) [GCC 7.3.0]
Executable: /home/mp/anaconda3/envs/mne/bin/python
CPU: x86_64: 24 cores
Memory: 125.8 GB

mne: 0.23.dev0
numpy: 1.19.4 {blas=NO_ATLAS_INFO, lapack=lapack}
scipy: 1.6.1
matplotlib: 3.3.4 {backend=module://ipykernel.pylab.backend_inline}

sklearn: 0.24.1
numba: 0.53.0
nibabel: 3.2.1
nilearn: 0.7.1
dipy: Not found
cupy: Not found
pandas: 1.2.3
mayavi: 4.7.2
pyvista: 0.29.0 {OpenGL 4.5.0 NVIDIA 460.39 via GeForce RTX 2070 SUPER/PCIe/SSE2}
vtk: 9.0.1
PyQt5: 5.15.4

import os
from datetime import timedelta
import mne

sample_data_folder = mne.datasets.sample.data_path()
sample_data_raw_file = os.path.join(sample_data_folder, 'MEG', 'sample',
                                    'sample_audvis_raw.fif')
raw = mne.io.read_raw_fif(sample_data_raw_file, verbose=False)
raw.crop(tmax=60).load_data()

fig = raw.plot(start=2, duration=6)
fig.canvas.key_press_event('a')

Yes, that’s by design. I agree that creating shorter annotations would be useful though. Could you open an issue so that we can discuss how to best fix this?

Sure will do. Thanks!

1 Like