See command line for batch option (output below).
To add a peak: right-click on the blue line in the top graph.
To delete a peak: right-click a peak (the following trough will be removed too).
Running from Matlab:
load D:\Working\WHH\all3101
% run_pd
x = D.recording{1}.ts.pleth.Time * 60;
y = squeeze( D.recording{1}.ts.pleth.Data );
O = peakdetect_gui( y, x );
Parameters
In the GUI, set these then "Run" to re-calculate peaks. This will overwrite any manual peak editing you did.
Parameter | Meaning | Change |
---|---|---|
mawindow | window length for moving average | reduce to allow for faster baseline trend changes |
decaytimeconstpk | decay time constant for peaks | reduce to detect more peaks; this determines how fast the peak threshold decays down from the previous peak towards. |
decaytimeconsttr | decay time constant for troughs | reduce to detect more troughs; this determines how fast the peak threshold decays up from the previous trough. |
threshlimpk | percent of peak height above moving average mean (sets lower bound for peak decay) | decrease to detect more peaks (can be negative) |
threshlimtr | percent of trough depth below moving average mean (sets upper bound for trough decay) | decrease to detect more peaks (can be negative) |
flagmininterval | flag for using/not using mininternval | set to 0 for not using (useful if you want to have a flags structure to test, but don't want to constantly change or remove "mininterval") |
mininterval | minimum interval allowed between peaks (or troughts) | set so that no non-physiologic values are found (e.g. in seconds, 0.25 ~ 4 Hz ~ 240 bpm) |
Outputs
Field | Meaning | ||
---|---|---|---|
Core output | |||
px | peak timepoint | ||
py | peak height | ||
tx | trough timepoint | ||
ty | trough height | ||
New channels | |||
ratex | rate timepoint | timepoints at which we have a rate caluclation | |
ratey | rate value | bpm (beats/breaths per minute) | |
intervalx | interval timepoint | timepoints at which we have an interval calculation (inverse of rate) | |
intervaly | time from previous peak | ||
heightx | height timepoint | ||
heighty | peak-to-trough amplitude | au (arbitrary units) | |
ratex_seconds | rate timepoint in seconds | (batch only) | |
ratey_Hz | rate in Hertz | (batch only) | |
ratey_bpm | rate in cycles/minute | (batch only) | |
peak_num | total number of peaks + troughts | ||
Other fields: parameters for automatic peak detection |
O =
peak_num: 2619
px: [1x1310 double]
py: [1x1310 double]
tx: [1x1309 double]
ty: [1x1309 double]
meany: [1x81200 double]
limit_pk: [1x81200 double]
threshold_pk: [1x81200 double]
limit_tr: [1x81200 double]
threshold_tr: [1x81200 double]
all_valpx: [1x1310 double]
all_valpy: [1x1310 double]
all_valtx: [1x1310 double]
all_valty: [1x1310 double]
all_px: [1x2102 double]
all_py: [1x2102 double]
all_tx: [1x2101 double]
all_ty: [1x2101 double]
px_auto: [1x1310 double]
py_auto: [1x1310 double]
tx_auto: [1x1309 double]
ty_auto: [1x1309 double]
ratex: [1x1309 double]
ratey: [1x1309 double]
intervalx: [1x1309 double]
intervaly: [1x1309 double]
heightx: [1x1309 double]
heighty: [1x1309 double]