GammaSpectrum-class | R Documentation |
Represents a single spectrum of a gamma ray spectrometry measurement.
hash
A character
string giving the 32-byte MD5 hash of
the imported file.
name
A character
string the measurement reference.
date
A POSIXct
element giving the measurement date and time.
instrument
A character
string giving the instrument name.
file_format
A character
string giving the format of the
imported file.
live_time
A numeric
value.
real_time
A numeric
value.
channel
A integer
vector giving the channel number.
Numeric values are coerced to integer as by as.integer()
(and hence truncated towards zero).
energy
A numeric
vector giving the gamma ray's energy (in keV).
count
A numeric
vector giving the counts number for each channel.
Numeric values are coerced to integer as by as.integer()
(and hence
truncated towards zero).
rate
A numeric
vector the count rate (1/s
) for each channel.
calibration
A 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) <- value
Retrieves 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.