| VT2TS | R Documentation |
End-to-end workflow that takes velocity 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 derivation and integration, yields post-tapering and optional trimming.
VT2TS(
.x,
units.source,
time = "t",
Fmax = 16,
kNyq = 3.125,
resample = TRUE,
derivate = "freq",
units.target = "mm",
NW = 128,
OVLP = 75,
flatZeros = FALSE,
Astop0 = 1e-04,
Apass0 = 0.001,
AstopLP = 0.001,
ApassLP = 0.98,
trimZeros = FALSE,
detrend = FALSE,
regularize = FALSE,
verbose = FALSE,
audit = TRUE,
output = "TSL",
isRaw = TRUE,
lowPass = TRUE
)
.x |
data.table. Input velocity records with a time column and one or more signal columns. |
units.source |
character. Source units for input velocity when |
time |
character. Name of the time column in the input (default |
Fmax |
numeric. Maximum frequency of interest (Hz). Guides STFT strategy. |
kNyq |
numeric. Target Nyquist multiplier ( |
resample |
logical. Kept for compatibility; the actual decision is made by
the internal STFT strategy based on |
derivate |
character. Derivative method for |
units.target |
character. Target units for output acceleration. Default: "mm". |
NW |
integer. Nominal STFT window length (samples). May be adjusted. |
OVLP |
numeric. Window overlap percent. |
flatZeros |
logical. Apply edge tapering. If |
Astop0, Apass0 |
numeric. Normalized thresholds |
AstopLP, ApassLP |
numeric. Anti-alias LP specifications for resampling. |
trimZeros |
logical. If |
detrend |
logical. Remove mean before/after stages. |
regularize |
logical. Force time regularization of input if needed. |
verbose |
logical. Print diagnostic logs. |
audit |
logical. If |
output |
character. Early/short-circuit outputs (default: "TSL"): "VTo", "AT", "VT", "DT", "TSW", "TSL". |
isRaw |
logical. If |
lowPass |
logical. If |
Returns the requested object based on output.
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 <- VT2TS(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.