rlkk_extrapolate
Builtin index · Signal processing
result = rlkk_extrapolate(Z, freqs, target_freqs, [lambda=1e-4])
Input: Z, freqs, target_freqs, lambda · Output: result
What it is
Z: a length-N complex vector (CVec); freqs: a length-N real vector (Hz); target_freqs: a length-M real vector (Hz), which may extend beyond the measured band; lambda (optional number).
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = rlkk_extrapolate(Z, freqs, target_freqs, [lambda=1e-4]) | Z vector or CVecZ: a length-N complex vector (CVec).freqs vectorfreqs: a length-N real vector (Hz).target_freqs vectortarget_freqs: a length-M real vector (Hz), which may extend beyond the measured band.lambda number, optional (default 1e-4)lambda (optional number). | result CVec | Returns a single length-M CVec, not a model. Refits the DRT from (Z, freqs) and evaluates it at target_freqs — for reconstructing truncated/incomplete measurements. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
freqs = logspace(0, 4, 20)
R = 100
C = 1e-6
w = 2 * pi * freqs
Z = R / (1 + 1j * w * R * C) # a simple RC impedance, as measured data
target = logspace(-1, 5, 10) # extends past the measured band on both sides
Z_ext = rlkk_extrapolate(Z, freqs, target, lambda=1e-4)
print("extrapolated {length(Z_ext)} points, first = {Z_ext[0]}, last = {Z_ext[9]}")
extrapolated 10 points, first = 100.003341 + 0.005947j, last = 0.110709 - 2.404278j
from signal-processing
How it works
rlkk_extrapolate(Z, freqs, target_freqs, [lambda=1e-4]) — refits the DRT from (Z, freqs) and evaluates it at target_freqs, which may extend beyond the measured band — the "reconstruct truncated/incomplete data" use case. A single value (CVec), not a model: there is only one output.
From the note above this builtin in the interpreter, where the reasoning was written down as it was built.