| GammaSpectrum-class | R Documentation |
Represents a single spectrum of a gamma ray spectrometry measurement.
hashA character string giving the 32-byte MD5 hash of
the imported file.
nameA character string the measurement reference.
dateA POSIXct element giving the measurement date and time.
instrumentA character string giving the instrument name.
file_formatA character string giving the format of the
imported file.
live_timeA numeric value.
real_timeA numeric value.
channelA integer vector giving the channel number.
Numeric values are coerced to integer as by as.integer()
(and hence truncated towards zero).
energyA numeric vector giving the gamma ray's energy (in keV).
countA numeric vector giving the counts number for each channel.
Numeric values are coerced to integer as by as.integer() (and hence
truncated towards zero).
rateA numeric vector the count rate (1/s) for each channel.
calibrationA linear model used for energy scale
calibration (see energy_calibrate()).
In the code snippets below, x is a GammaSpectrum object.
length(x)Get number of channel in x.
get_hash(x)Get the MD5 hash of the raw data file.
get_names(x), set_names(x) <- valueRetrieves or sets
the name of x according to value.
get_channels(x)Get the number of channels in x.
get_counts(x)Get the counts of x.
get_energy(x)Get the energy range of x.
get_rates(x)Get the count rates of x.
In the code snippets below, x is a GammaSpectrum object.
as.matrix(x)Coerces x to a matrix.
as.data.frame(x)Coerces x to a data.frame.
In the code snippets below, x is a GammaSpectrum 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.
This class retains copy construction.
N. Frerebeau
Other class:
Baseline-class,
CalibrationCurve-class,
GammaSpectra-class,
PeakPosition-class,
coerce()
## Import a Canberra CNF file
spc_file <- system.file("extdata/LaBr.CNF", package = "gamma")
(spc <- read(spc_file))
## Access
get_hash(spc)
get_names(spc)
get_livetime(spc)
get_realtime(spc)
length(spc)
range_energy(spc)
## Subset
spc[["date"]]
spc[["instrument"]]
spc[["file_format"]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.