R/restoreObserved.R

Defines functions .restoreObserved

# Inverse of .transformReflection for each column: inverse DFT divided by T
# (eq-marco-idft) at the observed positions of the extension
# (vmd.model.es.qmd:269). The spectra are Hermitian, so the discarded
# imaginary part is rounding.
.restoreObserved <- function(spectrum, observed) {
    Re(stats::mvfft(spectrum, inverse = TRUE)[observed, , drop = FALSE]) /
        nrow(spectrum)
}

Try the xemd package in your browser

Any scripts or data that you put into this service are public.

xemd documentation built on Nov. 9, 2026, 1:09 a.m.