Add scripts for reading, filtering and plotting data#3
Open
MichalSzandar wants to merge 2 commits intomainfrom
Open
Add scripts for reading, filtering and plotting data#3MichalSzandar wants to merge 2 commits intomainfrom
MichalSzandar wants to merge 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a data processing pipeline for SSVEP (Steady-State Visual Evoked Potential) EEG analysis. It reads .mat files, groups signal data into trials, applies a Savitzky-Golay filter, performs FFT/SNR analysis, and optionally generates plots.
Changes:
- Adds a main pipeline script with CLI arguments for reading, filtering, and optionally plotting EEG data
- Implements FFT analysis with SNR computation and confidence intervals, plus associated plotting functions
- Introduces supporting modules for constants, data classes, data reading, filtering, and utilities
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| data/src/main.py | Main entry point orchestrating the pipeline |
| data/src/consts.py | Constants for sampling, filtering, SNR, and channel config |
| data/src/data_classes.py | Data classes for trial groups and trial info |
| data/src/data_reader.py | Reads .mat files and groups DIN markers into trials |
| data/src/filter.py | Applies Savitzky-Golay filter to all trial epochs |
| data/src/filter_plotter.py | Plots raw vs filtered time-domain and PSD comparisons |
| data/src/fft_analysis.py | FFT magnitude, SNR computation, and confidence intervals |
| data/src/fft_plotter.py | Plots single-trial FFT, grouped FFT, and SNR heatmap |
| data/src/utils.py | Utility functions for grouping/filtering trials |
| data/src/init.py | Empty init file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
main script reads data from specified .mat file, groups signal data into 23 trials, applies savitzky-golay filter and optionally plots FFT results and savitzky-golay filtered vs raw data comparisons