Skip to contents

An S4 Class to Represent a Set of Peaks

Slots

hash

A character string giving the 32-byte MD5 hash of the imported spectrum file.

noise_method

A character string specifying the method used for peak detection.

noise_threshold

A length one numeric vector giving the noise threshold.

window

A length one numeric vector giving the half-window size.

channel

A integer vector giving the channel number. Numeric values are coerced to integer as by as.integer() (and hence truncated towards zero).

energy_observed

A numeric vector giving the observed gamma ray energy (in keV).

energy_expected

A numeric vector giving the expected gamma ray energy (in keV).

Note

This class retains copy construction.

Access

In the code snippets below, x is a PeakPosition object.

get_hash(x)

Get the MD5 hash of the raw data file.

get_channels(x)

Get the channels of x.

get_energy(x), set_energy(x) <- value

Retrieves or sets the energy scale of x according to value.

Coerce

In the code snippets below, x is a PeakPosition object.

as.matrix(x)

Coerces x to a matrix.

as.data.frame(x)

Coerces x to a data.frame.

Subset

In the code snippets below, x is a PeakPosition object.

x[[i]]

Extracts information from a slot selected by subscript i. i is a character vector of length one and will be matched to the name of the slots.

Author

N. Frerebeau