Remove artefacts based of an enveloppe #3715
Draft
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.
Because this code has been asked by several people, I have the feeling that there might be the need for such a preprocessing Node, to remove artefacts. The idea is the following: the node creates an low-pass filtered version of the rectified signal, compute the noise levels of this new signal, and detect thresholds crossings (onsets/offsets). We are then using these detected time periods to feed a silence_periods nodes, such that periods spotted by the enveloppe will be blanked.
Do you think such a node can be useful? For people using tetrode/few channels it seems to matter quite a lot. For denser probes, this could be debatted, and especially one could think about extending the silence_periods node to work on a per_channel basis instead of across all channels. But this could be debated