| TSL2PS | R Documentation |
TSL2PS() is the spectra helper for canonical TSL tables produced by
AT2TS(), VT2TS(), and DT2TS(). It derives grouping keys from the
TSL schema instead of exposing BY or column-name arguments.
TSL2PS(
.x,
xi = 0.05,
Tn = NULL,
output = "PSL",
D50 = FALSE,
D100 = FALSE,
nTheta = 180L
)
.x |
Canonical |
xi |
numeric. Damping ratio(s) |
Tn |
numeric vector. Natural periods in seconds. Must not include |
output |
character. One of |
D50 |
logical scalar. If |
D100 |
logical scalar. If |
nTheta |
integer. Number of rotation angles in |
For each source domain d in acceleration (AT), velocity (VT), and
displacement (DT), the function solves
z'' + 2 xi omega z' + omega^2 z = x_d independently and reports
omega^2 max(abs(z)). The resulting PSA, PSV, and SD ordinates retain
the units of AT, VT, and DT, respectively. They are domain-normalized
gmsp spectra, not classical transformations of one acceleration-driven
oscillator state. The internally prepended Tn = 0 rows are the matching
peak-value anchors PGA, PGV, and PGD.
A data.table.
output = "PSL" returns a long table with metadata columns, OCID,
Tn, spectral ID ("PSA", "PSV", "SD"), and S. If xi is a
vector, the output also includes xi.
output = "PSW" returns a wide table with metadata columns, Tn, and
spectral component columns such as PSA.H1, PSV.H1, and SD.H1. If
xi is a vector, the output also includes xi.
If requested, D50 and D100 appear as ordinary component suffixes such as
PSA.D50 and PSA.D100.
AT2TS(), VT2TS(), DT2TS()
t <- seq(0, 1, by = 0.01)
tsl <- data.table::rbindlist(list(
data.table::data.table(t = t, s = 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"),
data.table::data.table(t = t, s = sin(2 * pi * t + 0.3),
ID = "AT", OCID = "H2"),
data.table::data.table(t = t, s = cos(2 * pi * t + 0.4),
ID = "VT", OCID = "H2"),
data.table::data.table(t = t, s = sin(pi * t + 0.2),
ID = "DT", OCID = "H2")
))
ps <- TSL2PS(tsl, Tn = c(0.1, 0.2))
head(ps)
rot <- TSL2PS(tsl, Tn = 0.1, D50 = TRUE, D100 = TRUE, nTheta = 6L)
rot[OCID %in% c("D50", "D100")]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.