| normalizeTS | R Documentation |
Divides the signal column s by the peak amplitude of a reference quantity
(norm) for every (metadata, OCID) group. The same scale factor is applied
to all ID values within each group so that the physical relationship
between AT, VT, and DT is preserved.
The default norm = "PGA" scales by 1 / max(abs(s)) computed from
ID == "AT" rows, making max(abs(AT)) = 1 for every channel. The same
SF is then applied to the corresponding VT and DT rows.
Modifies .x in place; returns .x[].
normalizeTS(.x, norm = "PGA")
.x |
Canonical |
norm |
character. Reference quantity used to derive the scale factor.
|
.x with s scaled in place.
VT2TS(), mapComponents()
t <- seq(0, 1, by = 0.01)
tsl <- data.table::rbindlist(list(
data.table::data.table(t = t, s = 2 * sin(2 * pi * t),
ID = "AT", OCID = "H1"),
data.table::data.table(t = t, s = cos(2 * pi * t),
ID = "VT", OCID = "H1"),
data.table::data.table(t = t, s = sin(pi * t),
ID = "DT", OCID = "H1")
))
normalizeTS(tsl)
max(abs(tsl[ID == "AT", s]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.