Skip to contents

For each realisation s, inverts each model's Dn(ky) curve to kmax(Da), builds weighted ensemble mean, then averages over realisations.

Usage

invertDnDraws(draws, Da, weights, p = c(0.05, 0.1, 0.16, 0.84, 0.9, 0.95))

Arguments

draws

data.table(ky, s, Dn, IDn) — Dn in cm

Da

numeric vector — displacement targets in cm

weights

named numeric vector, ensemble weights by IDn

p

numeric quantiles in (0,1) to report alongside the mean. Default c(0.05, 0.10, 0.16, 0.84, 0.90, 0.95). The output always includes the ensemble mean as the first p row.

Value

data.table(Da, p, kmax). Column p is character: "mean" or the numeric quantile formatted as "0.84", "0.90", etc.

Details

Log-log linear extrapolation is used when Da falls outside the support of the computed Dn(ky) curve. No calibration-range clamping is applied — the natural support of the curve bounds the inversion.

All inputs must be in the same displacement units (cm).

Examples

if (FALSE) { # \dontrun{
out <- fitDnCurve(uhs, ky = getDnKy(uhs, Ts = 0.3), Ts = 0.3, Mw = 7.5,
                  NS = 100,
                  weights = c(AM88=1, BT07=1, SR08=1, BM17=1))
invertDnDraws(out$draws, Da = c(2.5, 5, 10),
              weights = c(AM88=1, BT07=1, SR08=1, BM17=1))
} # }