Validate parameters for spectral measurements and return a list of values
usable as input for functions retune_acq_settings()
, acq_sptc()
,
and acq_mspct()
.
Find optimal settings for spectral measurements under a given measurement protocol.
Usage
acq_settings(
descriptor,
integ.time = 0.01,
num.scans = 10L,
min.integ.time = -Inf,
max.integ.time = Inf,
tot.time.range = c(0, Inf),
HDR.mult = ifelse(any(num.exposures != -1L), rep(1, length(num.exposures)), c(short =
1, long = 10)),
target.margin = 0.1,
pix.selector = TRUE,
corr.elect.dark = 0L,
corr.sensor.nl = 0L,
boxcar.width = 0L,
force.valid = FALSE,
num.exposures = -1L,
verbose = TRUE
)
tune_acq_settings(descriptor, acq.settings, verbose = TRUE)
Arguments
- descriptor
list as returned by function
get_oo_descriptor
- integ.time
numeric vaue in seconds
- num.scans
integer
- min.integ.time
numeric vaue in seconds
- max.integ.time
numeric vaue in seconds
- tot.time.range
numeric vector of length two with values in seconds
- HDR.mult
a numeric vector with integ.time multipliers to be used for "bracketing".
- target.margin
numeric (0..1)
- pix.selector
a logical or numeric vector used as subscript to select pixels
- corr.elect.dark, corr.sensor.nl
integer 0L (FALSE) or 1L (TRUE)
- boxcar.width
integer Number of pixels to average
- force.valid
logical Accept all spectra as valid, for example do not treat clipping as an error condition.
- num.exposures
integer Number of flashes triggered per scan.
- verbose
a logical to enable or disable warnings
- acq.settings
list as returned by a previous call to
acq_settings()
, ortune_acq_settings()
.
Details
acq_settings()
is used to create a complete set of
instrument settings in a way that they can be reused as needed for repated
acquisition of spectra. acq_settings()
is an object constructor and
tune_acq_settings()
takes as argument a stored object containing
settings and tunes them to optimize them for the measurement of the current
spectral irradiance.
This function searches for the optimal integration time for a given condition by trial and error helped by interpolation and extrapolation when readings are not saturated. In the case of clipping or sensor signal saturation the integration time is decreased until clipping is avoided and then it is increased until optimal.
Note
pixel.selector
can be used for two different purposes: to
ignore bad pixels and to restrict integration-time tuning to the response
from a range of pixels. The interpretation of tot.time.range
is
as follows: first value is minimum time, second value is maximum time.
If both values are the same, then an exact measurement time is computed.
Ocean Optics spectrometers can be queried for the maximum and minimum
supported integration times. This function modifies the user supplied
values if outside these bounds. The defaults of -Inf and Inf force the use
of the whole valid range of integration time supported by the connected
intrument. pixel.selector
can be used for two different purposes: to
ignore bad pixels and to restrict integration-time tuning to the response
from a range of pixels.
The returned value can be used as argument to acq.settings
in
other functions like acq_raw_spct
and
acq_raw_mspct
See also
Other acquisition-settings related functions:
set_integ_time()
,
set_linearized()
,
set_num_exposures()