Spectral quantiles at one oscillator period by log-log interpolation
interpolateSpectrum.RdInterpolates every quantile curve of one spectrum slice (one site, model, Vs30 and return period) at a target oscillator period, as the displacement sampling does when the spectrum lacks the periods \(1.3 T_s\) or \(1.5 T_s\). Each curve is interpolated independently; the slice is not grouped.
Value
A data.table with Tn, p and Sa, one row per quantile
label plus the mean row when the slice has one, ordered by Tn and
p.
Mathematics
For the rows \((T_i, S_{a,i})\) of one probability label,
$$S_a(T) = \exp\, L\left(\ln T;\ \ln(T_i + 10^{-8}),\ \ln S_{a,i}\right)$$
where \(L\) is linear interpolation (stats::approx) with constant
extension beyond the tabulated periods (rule = 2). The offset
\(10^{-8}\) admits a zero-period node; a target of zero falls below
every node and takes the lowest-period ordinate. Duplicate
\((T, p)\) rows signal a warning and are averaged in
\(\ln S_a\), a geometric mean. The "mean" rows follow the same rule
when there are two or more; a single mean row is copied to the target
period and a slice without one returns no mean row.