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

ENH: Add annotation of head velocity #757

Merged
merged 3 commits into from
Jul 6, 2023
Merged

Conversation

larsoner
Copy link
Member

@larsoner larsoner commented Jul 5, 2023

Before merging …

  • Changelog has been updated (docs/source/changes.md)

With updated vals for ds004229:

mf_mc_rotation_velocity_limit = 30.0  # deg/s for annotations
mf_mc_translation_velocity_limit = 20e-3  # m/s

During the run we see:

[14:47:31] │ ⏳️ preprocessing/_03_maxfilter sub-102 Translation velocity exceeded 0.02 m/s limit for 5.5 s (1.8%)
[14:47:31] │ ⏳️ preprocessing/_03_maxfilter sub-102 Rotation velocity exceeded 30.0 °/s limit for 4.0 s (1.3%)

And in the report we get:

Screenshot from 2023-07-05 14-49-41

@hoechenberger
Copy link
Member

hoechenberger commented Jul 5, 2023

@larsoner I'm wondering if we shouldn't add part of this upstream to mne.Report? I got this impression when I saw you injecting custom HTML. – It's an open question, I'm not entirely sure about the best approach myself. WDYT?

@larsoner
Copy link
Member Author

larsoner commented Jul 5, 2023

Indeed in principle people could want to automatically gain some notes about raw annotations. In principle we could maybe add some logic to report.add_raw to autodetect the built-in annot types we have, but for example it would miss the limit that I inject here. Or if users have done their own annotations they'll have to write custom code anyway. So there is a deeper API discussion to be had. My inclination is to add stuff here first and if people think it's useful generally then we can add it upstream and remove our "custom" code here

@hoechenberger hoechenberger merged commit 4d16356 into mne-tools:main Jul 6, 2023
46 checks passed
@hoechenberger
Copy link
Member

Thanks @larsoner

@larsoner larsoner deleted the annot branch July 6, 2023 12:34
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.

None yet

3 participants