| restrict_range | R Documentation |
restrict_range() restricts wavenumber ranges to user specified values.
Multiple ranges can be specified by inputting a series of max and min
values in order.
flatten_range() will flatten ranges of the spectra that should have no
peaks.
Multiple ranges can be specified by inputting the series of max and min
values in order.
restrict_range(x, ...)
## Default S3 method:
restrict_range(x, ...)
## S3 method for class 'OpenSpecy'
restrict_range(
x,
min = NULL,
max = NULL,
make_rel = TRUE,
automate = FALSE,
artifact_ratio = 2,
tail_n = 5L,
co2_region = c(2200, 2420),
max_crop = 0.2,
saturation = NULL,
saturation_min_run = NULL,
saturation_tolerance = sqrt(.Machine$double.eps),
saturation_guard = 1L,
max_saturation_loss = 0.7,
min_remaining = 3L,
...
)
flatten_range(x, ...)
## Default S3 method:
flatten_range(x, ...)
## S3 method for class 'OpenSpecy'
flatten_range(
x,
min = 2200,
max = 2400,
make_rel = TRUE,
automate = FALSE,
artifact_ratio = 2,
tail_n = 5L,
...
)
x |
an |
min |
a vector of minimum values for the range to be flattened. |
max |
a vector of maximum values for the range to be flattened. |
make_rel |
logical; should the output intensities be normalized to the
range [0, 1] using |
automate |
logical; if |
artifact_ratio |
numeric; minimum artifact-to-control maximum ratio.
The default |
tail_n |
integer; number of points defining each spectral tail. |
co2_region |
numeric length two; carbon dioxide exclusion region used by automatic tail assessment. |
max_crop |
numeric; maximum fraction of the full wavenumber span that automatic tail restriction may remove across both ends. |
saturation |
|
saturation_min_run |
integer or |
saturation_tolerance |
numeric; relative tolerance used to recognize an effectively constant automatic detector plateau. |
saturation_guard |
integer; sampled points added to both sides of each detected saturated interval before the shared union is removed. |
max_saturation_loss |
numeric; largest fraction of wavenumber coverage that saturation restriction may remove. The default is 0.70. |
min_remaining |
integer; minimum retained wavenumber count after saturation restriction. |
... |
additional arguments passed to subfunctions; currently not in use. |
An OpenSpecy object with the spectral intensities within specified
ranges restricted or flattened.
Win Cowger, Zacharias Steinmetz
conform_spec() for conforming wavenumbers to be matched with
a reference library;
adj_intens() for log transformation functions;
min() and round()
test_noise <- as_OpenSpecy(x = seq(400,4000, by = 10),
spectra = data.frame(intensity = rnorm(361)))
plot(test_noise)
restrict_range(test_noise, min = 1000, max = 2000)
restrict_range(test_noise, automate = TRUE, make_rel = FALSE)
flattened_intensities <- flatten_range(test_noise, min = c(1000, 2000),
max = c(1500, 2500))
plot(flattened_intensities)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.