identifyPeaks: Identify Peaks in AES Spectrum

Description Usage Arguments Value Examples

View source: R/identifyPeaks.R

Description

Creates a table of the most intense peaks in an element's simulated atomic emission spectrum. The table is constructed using data stored in an object created using simulateAES and is ordered from more intense peaks to less intense peaks.

Usage

1
2
3
4
5
6
7
identifyPeaks(
  file,
  signal_type = c("relative", "absolute"),
  percent_max = 1,
  num_peaks = 5,
  sortby = c("intensity", "wavelength")
)

Arguments

file

The name of the object, created using simulateAES, that contains the results of a simulation.

signal_type

How to report the emission intensity; one of "relative", which scales the intensity to a maximum value of 1, or "absolute", which uses the actual emission intensities. Defaults to "relative".

percent_max

The minimum intensity for which a peak is identified, given as a percentage of the element's maximum absolute or relative emission intensity. Defaults to 1% of the element's maximum absolute or relative emission intensity.

num_peaks

The maximum number of peaks to return. Defaults to a table with a maximum of 5 peaks.

sortby

How to sort the peaks; one of "intensity", which sorts the list of peaks from highest to lowest intensity, or "wavelength", which sorts the list of peaks from shortest to longest wavelength.

Value

Returns a data frame with two columns: the wavelengths (in nm) of the peaks and the absolute or relative intensities of the peaks.

Examples

1
2
3
hydrogen = simulateAES(atom = "H")
hydrogen_peaks = identifyPeaks(file = hydrogen)
hydrogen_peaks

dtharvey/atomicEmission documentation built on July 11, 2021, 2 p.m.