braindecode.augmentation.functional.bandstop_filter¶
- braindecode.augmentation.functional.bandstop_filter(X, y, sfreq, bandwidth, freqs_to_notch)¶
Apply a band-stop filter with desired bandwidth at the desired frequency position.
- Parameters
- Xtorch.Tensor
EEG input example or batch.
- ytorch.Tensor
EEG labels for the example or batch.
- sfreqfloat
Sampling frequency of the signals to be filtered.
- bandwidthfloat
Bandwidth of the filter, i.e. distance between the low and high cut frequencies.
- freqs_to_notcharray-like | None
Array of floats of size
(batch_size,)
containing the center of the frequency band to filter out for each sample in the batch. Frequencies should be greater thanbandwidth/2 + transition
and lower thansfreq/2 - bandwidth/2 - transition
(wheretransition = 1 Hz
).
- Returns
- torch.Tensor
Transformed inputs.
- torch.Tensor
Transformed labels.
References
- 1
Cheng, J. Y., Goh, H., Dogrusoz, K., Tuzel, O., & Azemi, E. (2020). Subject-aware contrastive learning for biosignals. arXiv preprint arXiv:2007.04871.
- 2
Mohsenvand, M. N., Izadi, M. R., & Maes, P. (2020). Contrastive Representation Learning for Electroencephalogram Classification. In Machine Learning for Health (pp. 238-253). PMLR.