Improve automatic local referencing#209
Merged
vinaysraghavan merged 10 commits intomainfrom Jan 15, 2025
Merged
Conversation
Change the make_contact_rereference_arr function to handle input channelnames in any order (not strictly ascending) and to properly handle local referencing on ECoG grid
Added input `grid_sizes` to allow custom input of grid sizes. After talking with Max Nentwich, I realized that, while square and 1 x 2 rectangle grids are relatively standard/common, grids are occasionally cut, so custom shapes as input is needed.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #209 +/- ##
==========================================
- Coverage 74.62% 74.03% -0.60%
==========================================
Files 58 58
Lines 4233 4287 +54
==========================================
+ Hits 3159 3174 +15
- Misses 1074 1113 +39 ☔ View full report in Codecov by Sentry. |
Update test of make_contact_rereference_arr to improve coverage
Change expected test outcome
Collaborator
gavinmischler
left a comment
There was a problem hiding this comment.
Just a couple small things, then looks good!
Remove debugging print statement
Removed the assumption that channels 1-N are always provided for a given contact. Now, any channel numbers on a contact can be provided, and local average referencing will be robust to this. This is useful in cases where depth electrodes are inserted through the brain, e.g. some electrodes are in the CSF beyond the brain, some electrodes are in the brain, and some are in the skull/scalp, since only electrodes in the brain should be used for re-referencing. It now also notifies the user if channels cannot properly be re-referenced because `extent` is too small due to a lack of spatially local sites.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
What does this implement/fix? Explain your changes.
Change the make_contact_rereference_arr function to handle input channelnames in any order (not strictly ascending) and to properly handle local referencing on ECoG grid
Any other comments?