Update field bad.pixs
of the instrument descriptor embedded in
raw_spct
and raw_mspct
objects.
Details
Spectral objects, including those with raw counts data can contain an
instrument descriptor. One member of this attribute is a vector of indexes to
bad pixels. New bad pixels can be identified in some cases after data are
acquired. Recomputing of physical quantities from raw counts normally reuses
the embedded calibration data. Function update_bad_pixs()
makes it
possible to update the embedded bad pixels information before recomputing
derived quantities. This function can be applied only to
raw_spct
objects created with functions from package 'ooacquire'.
With defaults arguments for formal parameters bad.pixs
and
action
, the bad.pixs
field of the descriptor is updated to
match that in the matching calibration data in the version of 'ooacquire'
currently loaded. However, if a numeric vector to positions in the detector
array is passed as argument, depending on the argument passed to
action
, this vector will be used either to replace the existing one,
or the indexes in the vector "added" to those already stored, using
union()
.