Skip to content

Comments

Update spatial_filter.py#235

Open
dr-r-kan wants to merge 2 commits intovferat:mainfrom
dr-r-kan:patch-2
Open

Update spatial_filter.py#235
dr-r-kan wants to merge 2 commits intovferat:mainfrom
dr-r-kan:patch-2

Conversation

@dr-r-kan
Copy link

@dr-r-kan dr-r-kan commented Jun 5, 2025

PR: Fixed indexing issue in the _channel_spatial_filter() which led to array setting error.

Issue was only occurring on some files, which were loaded from fifs, converted from edf imports. Now runs smoothly.

dr-r-kan and others added 2 commits June 5, 2025 12:04
PR: Fixed indexing issue in the _channel_spatial_filter() which led to array setting error.
@mscheltienne mscheltienne requested a review from vferat June 6, 2025 10:21
@vferat
Copy link
Owner

vferat commented Jun 6, 2025

Hey @KishiBayes, thanks for opening this PR.

Could you provide a bit more details about the issue you encountered, and what this code change wants to achieve ?

From what I understand, there can be an issue in the current code version:

  max_mask = neighbors_data == np.amax(neighbors_data, keepdims=True, axis=0)
  min_mask = neighbors_data == np.amin(neighbors_data, keepdims=True, axis=0)
  keep_mask = ~(max_mask | min_mask)

where several neighbors can have a min/mask value and therefore removing more than 2 neighboring values, resulting in an error. Is that it ?

I may be wrong, please don't hesitate to let me know if it is the case.

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.

2 participants