Skip to contents

Estimates peak purity by assessing the dissimilarity of the spectra comprising the peak, using the method described in Stahl 2003.

Usage

get_purity(
  x,
  pos,
  weight = 1,
  cutoff = 0.05,
  noise_variance = NULL,
  noise_threshold = 0.01,
  lambdas,
  try = TRUE
)

Arguments

x

A chromatogram in matrix format

pos

A vector containing the center, lower and upper bounds of a peak as numeric indices.

weight

Weight provided to get_agilent_threshold.

cutoff

Proportion of maximum absorbance to use as cutoff. Argument to trim_peak.

noise_variance

Variance of noise. Argument to get_agilent_threshold.

noise_threshold

Threshold to define noise. Highest proportion of maximum absorbance.

lambdas

Wavelengths to include in calculations.

try

Logical. Whether to estimate the purity or not. Defaults to TRUE.

Value

Returns the mean purity of the peak specified by pos, defined as the proportion of timepoints with purity values below 1.

References

Stahl, Mark. “Peak Purity Analysis in HPLC and CE Using Diode-Array Technology.” Agilent Technologies, April 1, 2003, 16. /hrefhttps://www.agilent.com/cs/library/applications/5988-8647EN.pdf

Author

Ethan Bass