Add demo script for CAR method comparison#736
Conversation
Implements demos/car_improvement.py that calculates and saves correlations between channels before and after CAR for three cases: 1. User-specified CAR groups without scaling (original method) 2. User-specified CAR groups with scaling 3. Clustering-based CAR groups with scaling Outputs comparison plots and statistics to QA_output/car_demo/. Closes katzlabbrandeis#735 Co-authored-by: Ona <no-reply@ona.com>
Solution ExplanationThis demo script addresses issue #735 by implementing a standalone comparison tool for the three CAR approaches discussed in PR #730. Implementation DetailsMethod 1 - No Scaling (Original blech_clust)
Method 2 - With Scaling
Method 3 - Clustering + Scaling
Key Design Decisions
TestingThe script requires a data directory with:
Run with: |
Summary
Implements
demos/car_improvement.pythat calculates and saves correlations between channels before and after Common Average Reference (CAR) for three cases:Outputs
The script generates comparison plots and statistics saved to
QA_output/car_demo/:car_comparison_heatmaps.png: Side-by-side correlation matrices for all methodscar_comparison_paired_plot.png: Paired points showing correlation changes per channel paircar_comparison_summary.png: Bar plot of mean correlations by methodcar_comparison_summary.txt: Text summary with statisticsUsage
Closes #735
Ref: #730