Skip to content

Conversation

@berkgercek
Copy link
Contributor

@berkgercek berkgercek commented Jan 13, 2025

PR Description

To resolve the lack of "noise" task matching mentioned in #1354 I've implemented logic that prioritizes files found in the same session with task-noise over sub-emptyroom recordings. See the proposal in the mentioned issue for the details of the logic.

Merge checklist

Maintainer, please confirm the following before merging.
If applicable:

  • All comments are resolved
  • This is not your own PR
  • All CIs are happy
  • PR title starts with [MRG]
  • whats_new.rst is updated
  • New contributors have been added to CITATION.cff
  • PR description includes phrase "closes <#issue-number>"

@welcome
Copy link

welcome bot commented Jan 13, 2025

Hello! 👋 Thanks for opening your first pull request here!
Please read the contributor guide, and please follow the steps outlined in the "Instructions for first-time contributors" section therein. ❤️ We will try to get back to you soon. 🚴🏽‍♂️

Copy link
Member

@sappelhoff sappelhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Could you please also follow the steps in the first-time-contributors list? https://github.com/mne-tools/mne-bids/blob/main/CONTRIBUTING.md#instructions-for-first-time-contributors

I think it would be a good idea to write a detailed changelog item for this feature, too!

@sappelhoff
Copy link
Member

@berkgercek please also note that I have merged main into this branch, so please git pull before continuing to work on this branch!

@codecov
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.43%. Comparing base (18bd973) to head (5dc378b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1364      +/-   ##
==========================================
+ Coverage   97.42%   97.43%   +0.01%     
==========================================
  Files          40       40              
  Lines        8922     8966      +44     
==========================================
+ Hits         8692     8736      +44     
  Misses        230      230              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@berkgercek
Copy link
Contributor Author

berkgercek commented Jan 14, 2025

Ok, I've updated the changelog and added myself as a contrib! The test coverage has decreased with this PR because I added functionality to find split-file ER recordings. I would like to cover that section of the code too but there's no easy way using mne_bids.write_raw_bids to specify a number of splits or split size. Any suggestions?

Edit: I also am not entirely sure why the docs are failing to build...

Copy link
Member

@sappelhoff sappelhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thanks a lot @berkgercek

@sappelhoff sappelhoff merged commit d7d08dd into mne-tools:main Jan 20, 2025
24 checks passed
@welcome
Copy link

welcome bot commented Jan 20, 2025

🎉 Congrats on merging your first pull request! 🥳 Looking forward to seeing more from you in the future! 💪

waldie11 pushed a commit to waldie11/mne-bids that referenced this pull request Feb 3, 2025
…ion recordings with task "noise" (closes mne-tools#1354) (mne-tools#1364)

* Changed empty-room matching logic to prioritize task-noise files

* Simple test for noise task

* Tests for the split noise file case and fallback to sub-emptyroom

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix line length and clean up after test

* Work around the weird multiple-match behavior of path.match()

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Better handling of "run" set in the base path for ER search

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove an extraneous print statement

* Update mne_bids/tests/test_path.py

Co-authored-by: Stefan Appelhoff <[email protected]>

* Updated changelog, added self to author list per new contrib guide

* Update CITATION.cff to remove name from original pub

* Update doc/authors.rst to fix doc build

Co-authored-by: Daniel McCloy <[email protected]>

* Added test logic for new code

* Line length

* Cover an unrelated error to bring up %

* correct author order

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Stefan Appelhoff <[email protected]>
Co-authored-by: Daniel McCloy <[email protected]>
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.

ENH/BUG? : Allow empty-room matching of task-noise files in same session

4 participants