Releases: Eden-Kramer-Lab/ripple_detection
Releases · Eden-Kramer-Lab/ripple_detection
v1.7.0
[1.7.0] - 2025-10-17
Added
-
Flexible Signal Normalization: New
normalize_signal()function supporting both z-score (mean/std) and median/MAD normalization methods- Median/MAD normalization provides robust statistics less sensitive to outliers
- Configurable normalization baseline via
normalization_maskornormalization_time_rangeparameters - All detectors (
Kay_ripple_detector,Karlsson_ripple_detector,Roumis_ripple_detector,multiunit_HSE_detector) now support these parameters - Enables advanced use cases: normalize during immobility only, use baseline period, exclude artifacts
- Comprehensive test coverage including 23 new tests for normalization functionality
-
Tutorial Notebook: Added
examples/ripple_detection_tutorial.ipynbwith step-by-step guide- Demonstrates basic ripple detection workflow
- Shows how to use different normalization methods
- Includes visualization examples
Changed
- Parameter Enhancement: Added
normalization_method,normalization_mask, andnormalization_time_rangeparameters to all detector functions- Default behavior unchanged (z-score normalization on full signal)
- New parameters provide fine-grained control over normalization baseline
Deprecated
use_speed_threshold_for_zscoreparameter inmultiunit_HSE_detector- Use
normalization_mask=speed < speed_thresholdinstead for equivalent functionality - Deprecation warning added with migration guidance
- Use
Fixed
- Updated README badges to reference release workflow and codecov
- Reformatted pyproject.toml for better readability
Removed
- PR test GitHub Actions workflow (consolidated with main test workflow)
Closed Issues
v1.6.0
[1.6.0] - 2025-10-16
Added
-
Critical UX Improvements: Comprehensive input validation to prevent common user errors
- Speed units validation: Warns when speed appears to be in m/s instead of cm/s, preventing silent data loss
- Time units validation: Errors when time array appears to be in samples instead of seconds
- Sampling frequency validation: Warns when time step doesn't match expected sampling rate
- Array shape validation: Clear error messages for wrong LFP dimensions (1D, 0D, >2D arrays)
- Array length validation: Detailed error showing exact sample counts when arrays don't match
- Data length validation: Checks minimum data length required for filtering (954 samples)
- Filter sampling frequency validation: Prevents crashes with incompatible sampling rates (<1200 Hz)
-
Enhanced Documentation
- Added comprehensive Troubleshooting section to README with solutions for common errors
- Added Parameter Selection Guide table with recommended adjustment strategies
- Added complete workflow example to
Kay_ripple_detectordocstring showing filtering → detection steps - Clarified that
multiunit_HSE_detectoraccepts both binary (0/1) and spike count formats - Added amplitude units documentation to
simulate_LFP(arbitrary units with SNR guidance) - Bolded all unit specifications in docstrings (seconds, cm/s, Hz) for clarity
-
Improved Error Messages
- All new error messages follow WHAT/WHY/HOW pattern with actionable solutions
- Errors include working code examples for fixing issues
- Validation errors provide specific details (array shapes, sample counts, expected values)
Changed
- BREAKING:
_preprocess_detector_inputs()now requiressampling_frequencyandspeed_thresholdparameters for validation (internal function, unlikely to affect users) - Enhanced parameter descriptions across all detector functions with clearer units and adjustment guidance
- Improved
filter_ripple_band()error handling to catch issues before scipy crashes
Fixed
- Prevented cryptic numpy errors (
axis 1 is out of bounds,operands could not be broadcast) with clear validation errors - Fixed misleading filter warning-then-crash behavior for incompatible sampling frequencies
- Improved empty result guidance - docstrings now suggest specific parameter adjustments
v1.5.0
- Add maximum threshold, area, total energy metrics
Full Changelog: v1.4.0...v1.5.0
v1.2.0
v0.1.8.dev0
v0.1.7.dev0
- Fix docstring to include
close_ripple_thresholdparameter - Speed up Karlsson ripple detection method by zero padding the fft in the hilbert transform
- Remove unnecessary copying of arrays
v0.1.5.dev0
v0.1.4.dev0
- Fix order of squaring and summing in Kay ripple detector