Measures the intensity at one user-supplied wavenumber for every spectrum
in an OpenSpecy object.
Usage
point_intensity(x, ...)
# Default S3 method
point_intensity(x, ...)
# S3 method for class 'OpenSpecy'
point_intensity(x, wavenumber, method = c("nearest", "linear"), ...)Value
A named numeric vector with one intensity per spectrum. Names and order
match the columns of x$spectra. A non-finite selected or interpolated
intensity is returned as NA for that spectrum. If the requested
wavenumber is outside the shared axis, all values are returned as NA.
Details
This function measures a specified spectral point; it does not search for a
local maximum. With method = "nearest", a point exactly halfway
between two measured wavenumbers uses the lower wavenumber. Linear
interpolation is confined to the two adjacent measured points and never
extrapolates beyond the shared wavenumber axis.
See also
peak_ratio() for ratios between two point intensities and
area_under_band() for measurements over a spectral region.
Examples
data("raman_hdpe")
point_intensity(raman_hdpe, wavenumber = 2880)
#> intensity
#> 576
point_intensity(raman_hdpe, wavenumber = 2880, method = "linear")
#> intensity
#> 602.4639