Description Usage Arguments Details Value Examples
Convert instrument values, called digital number (DN) counts, to radiometric units using instrument specific metadata and calibration values (instrument response functions).
1 2 3 4 |
dn |
A hyperSpec object that includes a matrix of hyperspectral digital number values [counts] and a dataframe that includes the 'integration time' of each spectrum |
type |
The type of conversion to be calculated. See details |
cal.DN2RadiantEnergy |
Path to a file that contains the instrument specific calibration for conversion from counts to radiant energy [uJ/count] and other radiometric units |
is.REF |
Is the spectra of a 'reference panel'. If true the spectra is multiplied by panel-specific reflectance (must be supplied) |
cal.RRefPanel |
Path to a file that contains the reference panel specific calibration of reflectance [-] |
instrument.metadata |
A named list with instrument metadata. See details. |
Radiometry terminology and units from https://en.wikipedia.org/wiki/Template:SI_radiometry_units.
Various unit conversions can be applied: Options include normalised DN [counts/s nm], radiant energy [J], spectral flux [W/nm], spectral intensity [W/sr nm], spectral radiance [W/sr m2 nm], spectral irradiance [W/m2 nm] and spectral irradiance of a reference panel relative to a 'lambertian' surface with a reflectance factor of 1 throughout the wavelength range of interest [W/m2 nm].
These only make sense if the 'measurement geometry', 'integration time' [s] of a measurement, 'surface area of the instrument light apature' [m], and 'instrument-specific response function' in radiant energy (e.g., J/count or other units; FIXME: are there options for specifying other units?) is known and supplied to the function.
Reference panel-specific reflectance over the wavelngth range of the measurement to be converted must be supplied to for reference panel values.
A hyperSpec object including a matrix of radiometrically corrected spectra, metadata extracted from the spectra headers and file information.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # set path to data files
file.path <- system.file("extdata", package = "FASTSpectra")
# parse spectra into hyperSpec object
dn <- read.txt.OceanOptics(files=paste0(file.path,"/*.txt"))
# assign measurement id and type using fieldlog file
logfile <- paste0(file.path,"/fieldlog.csv")
dn <- assign.type(dn, logfile=logfile)
# split into sample and reference
type <- slot(dn,"data")[["type"]]
dn <- split(x=dn, f=type)
# convert samples to spectral radiance [W / sr m2 nm]
cal.rad <- paste0(file.path,"/*.IrradCal")
rad <- rad.corr(dn$SAMP, type="spectral.radiance", cal.DN2RadiantEnergy = cal.rad)
require(hyperSpec)
plot(rad, wl.range=380:850)
# convert references to spectral irradiance relative to 100% reference panel [W / m2 nm]
cal.ref <- paste0(file.path,"/*.ReflCal")
ref <- rad.corr(dn$REF, type="spectral.radiance", is.REF=TRUE, cal.DN2RadiantEnergy = cal.rad, cal.RRefPanel = cal.ref)
plot(ref, wl.range=380:850)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.