View source: R/opus_read_file.R
opus_read | R Documentation |
Read file(s) acquired with a Bruker Vertex FTIR Instrument.
opus_read( file, type = "spec", simplify = FALSE, wns_digits = 1L, progress = TRUE, atm_comp_minus4offset = FALSE )
file |
Character vector with path to file(s). |
type |
Character vector of spectra types to extract from OPUS binary
file. Default is |
simplify |
Logical (defaults to |
wns_digits |
Integer that specifies the number of decimal places used to round
the wavenumbers (values of x-variables) if |
progress |
Logical (defaults to |
atm_comp_minus4offset |
Logical whether spectra after atmospheric compensation are read with
an offset of -4 bytes from Bruker OPUS files. Default is |
The type of spectra returned by the function when using type = "spec"
depends on the setting of the Bruker instrument: typically, it can be either absorbance or reflectance.
The type of spectra to extract from the file can also use Bruker's OPUS software naming conventions, as follows:
ScSm
corresponds to sc_sample
ScRf
corresponds to sc_ref
IgSm
corresponds to ig_sample
IgRf
corresponds to ig_ref
The output of opus_read()
depends on the value of the simplify
option used in the function call.
If simplify = FALSE
(default), opus_read()
returns a list of 10 elements:
metadata
: a data.frame
containing metadata from the OPUS file
spec
If "spec"
was requested in the type
option, a matrix of the spectrum of the sample (otherwise set to NULL
).
spec_no_atm_comp
If "spec_no_atm_comp"
was requested in the type
option, a matrix of the spectrum of the sample without background compensation (otherwise set to NULL
).
sc_sample
If "sc_sample"
was requested in the type
option, a matrix of the single channel spectrum of the sample (otherwise set to NULL
).
sc_ref
If "sc_ref"
was requested in the type
option, a matrix of the single channel spectrum of the reference (otherwise set to NULL
).
ig_sample
If "ig_sample"
was requested in the type
option, a matrix of the interferogram of the sample (otherwise set to NULL
).
ig_ref
If "ig_ref"
was requested in the type
option, a matrix of the interferogram of the reference (otherwise set to NULL
).
wavenumbers
If "spec"
or "spec_no_atm_comp"
was requested in the type
option, a numeric vector of the wavenumbers of the spectrum of the sample (otherwise set to NULL
).
wavenumbers_sc_sample
If "sc_sample"
was requested in the type
option, a numeric vector of the wavenumbers of the single channel spectrum of the sample (otherwise set to NULL
).
wavenumbers_sc_ref
If "sc_ref"
was requested in the type
option, a numeric vector of the wavenumbers of the single channel spectrum of the reference (otherwise set to NULL
).
If simplify = TRUE
, a list of two elements is returned:
wavenumbers
: Numeric vector with wavenumbers of the requested spectra.
spectra
: Matrix with spectra of requested type (see argument type
).
Philipp Baumann
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.