pulsenv
biosigpy.ppg.pulsenv.pulsenv ¶
pulsenv(ppg, sampling_frequency, t_d=None, *, t_a=None, t_b=None, window_a=0.25, window_b=0.15, max_gap=np.inf)
Interpolate basal and apex amplitudes on the original PPG grid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ppg | array_like | PPG samples. A missing sample cannot serve as an anchor. | required |
sampling_frequency | float | Positive sampling frequency in Hz. The first PPG sample is at zero seconds. | required |
t_d | array_like | Detection times in seconds from the first PPG sample. Supply detections or both precomputed fiducial vectors. | None |
t_a | array_like | Apex and basal times in seconds from the first PPG sample. NaNs denote missing points. | None |
t_b | array_like | Apex and basal times in seconds from the first PPG sample. NaNs denote missing points. | None |
window_a | float | Forward and backward search windows in seconds for pulsedel. | 0.25 |
window_b | float | Forward and backward search windows in seconds for pulsedel. | 0.25 |
max_gap | float | Split each envelope before interpolation when consecutive valid fiducial times differ by at least this many seconds. Default infinity. | inf |
Returns:
| Type | Description |
|---|---|
lower_envelope, upper_envelope : ndarray | Arrays on the same sample grid as ppg. Each needs two distinct anchors per segment. Values outside supported segments are NaN. |
Source code in src/biosigpy/ppg/pulsenv.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |