Refactor waveform shape metrics class and methods#123
Conversation
Align waveform-shape metrics pipeline with simplified manuscript - Update canonical metric set to match the revised LaTeX article - Remove deprecated harmonic rolloff/support and phase-organization metrics from public outputs - Replace E_low/E_total with manuscript-defined E_LF/E_HF - Rename normalized cumulative-distance landmarks from d10–d90 to d10_over_D–d90_over_D - Replace D_T notation with D in formulas and metadata - Rename kinetic metrics to manuscript-style names: S_rise, S_fall, t_rise_over_T, t_fall_over_T - Rename shape descriptors to Q_t_width, Q_t_skew, Q_d_width, Q_d_skew - Add metric-family metadata for clearer HDF5 browsing and manuscript traceability - Move obsolete harmonic/phase outputs to diagnostics rather than canonical scalar metrics - Refresh LaTeX formula attributes and output descriptions for consistency
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65c0007eaa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "S_rise": float(S_rise) | ||
| if np.isfinite(S_rise) | ||
| else np.nan, | ||
| "slope_fall_normalized": float(slope_fall_normalized) | ||
| if np.isfinite(slope_fall_normalized) | ||
| "S_fall": float(S_fall) | ||
| if np.isfinite(S_fall) | ||
| else np.nan, | ||
| "t_up_over_T": float(t_up_over_T) if np.isfinite(t_up_over_T) else np.nan, | ||
| "t_down_over_T": float(t_down_over_T) | ||
| if np.isfinite(t_down_over_T) | ||
| "t_rise_over_T": float(t_rise_over_T) if np.isfinite(t_rise_over_T) else np.nan, | ||
| "t_fall_over_T": float(t_fall_over_T) |
There was a problem hiding this comment.
Keep legacy metric keys or update all downstream consumers
This change renames/removes public scalar keys (for example crest_factor→CF, slope_rise_normalized→S_rise, t_up_over_T→t_rise_over_T, d10→d10_over_D) without compatibility aliases, but multiple postprocess paths still hard-code the old names (e.g. src/postprocess/utils/groups_comparison_dashboard.py SELECTED_METRICS_PNG and METRIC_GROUPS, and similar lists in stats_groups_comparison.py / waveform_metric_summary_tables.py). Because those utilities filter by expected key names, renamed metrics are dropped from exported plots/tables, which silently removes large parts of the default analysis outputs.
Useful? React with 👍 / 👎.
Align waveform-shape metrics pipeline with simplified manuscript