R/Abs_sumD.R

Defines functions Abs_sumD

#' A function rather aimed at developers
#' @noRd

Abs_sumD = function(phasePara, specDat) {

  n=dim(specDat)[1]
  phases=phasePara[1]+phasePara[2]*c(1:n)/n

  dat3col=cbind(specDat, phases)
  phasedDat=t(apply(dat3col, 1, phaseCorr2)) ### output is a two column matrix: the phased real and the phased imaginary of freq data
  return(abs(sum(phasedDat[,2]))) # absolute of integral
}
ajiangsfu/NMRphasing documentation built on Dec. 22, 2024, 12:22 p.m.