| AT2TS | R Documentation |
End-to-end workflow that takes acceleration time histories and produces a consistent set of acceleration, velocity, and displacement time series. It optionally regularizes sampling, converts units (for raw data), selects optimal STFT parameters and resampling strategy, applies robust edge tapering, performs spectral-domain integration, and provides post-tapering/optional trimming.
The function is designed for seismic/structural records but is agnostic to
the physical origin provided Fmax reflects the analysis band of interest.
AT2TS(
.x,
units.source,
time = "t",
Fmax = 16,
kNyq = 3.125,
resample = TRUE,
units.target = "mm",
NW = 128,
OVLP = 75,
flatZeros = FALSE,
Astop0 = 0.001,
Apass0 = 0.001,
AstopLP = 0.001,
ApassLP = 0.98,
trimZeros = FALSE,
detrend = FALSE,
regularize = FALSE,
output = "TSL",
verbose = FALSE,
audit = TRUE,
isRaw = TRUE
)
.x |
data.table. Input acceleration records with a time column and one or more signal columns (e.g., H1, H2, V). |
units.source |
character. Source units for input acceleration when
|
time |
character. Name of the time column in the input (default |
Fmax |
numeric. Maximum frequency of interest (Hz). Used to set STFT
strategy and low-pass regularization in integration. Default: |
kNyq |
numeric. Target Nyquist multiplier ( |
resample |
logical. Kept for compatibility; the actual decision is made by
the internal STFT strategy based on |
units.target |
character. Output target units for acceleration records. Default: "mm". |
NW |
integer. Nominal STFT window length (samples); may be adjusted by the
strategy. Default: |
OVLP |
numeric. Window overlap percent. Default: |
flatZeros |
logical. If |
Astop0 |
numeric. Normalized stop threshold |
Apass0 |
numeric. Normalized pass threshold |
AstopLP |
numeric. Stopband attenuation for anti-alias LP (resampling).
Default: |
ApassLP |
numeric. Passband for anti-alias LP (resampling). Default: |
trimZeros |
logical. If |
detrend |
logical. Remove mean before/after each main stage. Default: |
regularize |
logical. Force time regularization of input if needed.
Default: |
output |
character. Short-circuit outputs (default: "TSL"): "ATo": early wide-frame after units; "AT"/"VT"/"DT": final wide; "TSW": combined wide; "TSL": long table. |
verbose |
logical. Print diagnostic logs. Default: |
audit |
logical. If |
isRaw |
logical. If |
Returns the requested object based on output (no other
element is returned alongside it):
"ATo": wide table with ts (time starting at 0), Units and
channels, before any tapering or integration.
"AT" / "VT" / "DT": wide table with the channels only (no
ts column).
"TSW": wide table with columns ts, AT.<OCID>, VT.<OCID>,
DT.<OCID>.
"TSL" (default): long table with columns t, s, ID
(one of "AT", "VT", "DT"), and OCID.
Sampling interval and row count are not returned separately; recover
them from the output via 1 / diff(ts)[1] and nrow(.).
t <- seq(0, 2, by = 0.02)
x <- data.table::data.table(
t = t,
H1 = sin(2 * pi * t),
H2 = 0.5 * cos(2 * pi * t),
UP = 0.25 * sin(4 * pi * t)
)
tsl <- AT2TS(x, units.source = "mm", Fmax = 4, NW = 16,
audit = FALSE, isRaw = FALSE)
head(tsl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.