Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix annotation of last sample #308

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

richardkoehler
Copy link
Contributor

Reference issue

Fixes issue #12893 in mne-python (mne-tools/mne-python#12893)
The issue is also discussed in PR #12895 in mne-python (mne-tools/mne-python#12895)

What does this implement/fix?

Currently, when annotating bad epochs in mne-qt-browser, annotations were limited to the last sample of the recording, so that the last sample of the recording would not actually be rejected.
This fixes this issue, and additionally allows for 1-sample annotations at the start (t=0) and end (t=xmax) of the recording.

  • raise upper limit of RawViewBox to xmax + 1 sample, so that new annotations can extend above the recording
  • raise upper limit of AnnotRegion to xmax + 1 sample for all annotations
  • to allow for 1-sample annotations at the beginning (0) and end (xmax) of recording in the AnnotationDock :
    • raise maximum of an annotation start to xmax
    • lower the minimum of an annotation end/stop to 0
    • raise maximum of an annotation end to xmax + 1 sample

- raise upper limit of RawViewBox to xmax + 1 sample, so that new annotations can extend above the recording
- raise upper limit of AnnotRegion to xmax + 1 sample for all annotations
- to allow for 1-sample annotations at the beginning (0) and end (xmax) of recording in the AnnotationDock :
    - raise maximum of an annotation start to xmax
    - lower the minimum of an annotation end/stop to 0
    - raise maximum of an annotation end to xmax + 1 sample
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant