Skip to content

Compute PI and RI metrics#20

Open
DaleKernot wants to merge 4 commits into
VirtualPregnancy:developfrom
DaleKernot:feature/ri-pi-indices
Open

Compute PI and RI metrics#20
DaleKernot wants to merge 4 commits into
VirtualPregnancy:developfrom
DaleKernot:feature/ri-pi-indices

Conversation

@DaleKernot
Copy link
Copy Markdown
Contributor

Closes #19.
Adds optional per-beat waveforms from mean_wave() via return_valid_beats=True, plus PI, RI, and velocity helpers that use those aligned beats. Default mean_wave() behaviour matches develop branch, the flag only adds valid_beats for metric calculation.

Functions
mean_wave(..., return_valid_beats=False) — when True, also returns valid_beats (quality-filtered, aligned beats).
compute_psv_edv(valid_beats) — per-beat and mean PSV, EDV, TAMV.
compute_pi(valid_beats) — per-beat and mean PI: (PSV − EDV) / TAMV.
compute_ri(valid_beats) — per-beat and mean RI: (PSV − EDV) / PSV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metric calculation from digitised signals

1 participant