import.calibration: Import an instrument or reference panel's calibration data

Description Usage Arguments Details Value Examples

Description

Given a path to folder that contains a file with instrument or reference panel specific calibration data this function imports the data into a hyperSpec object ready for use in radiometric correction

Usage

1
2
import.calibration(files = "*.IrradCal", type = "uJ/count", label = NULL,
  theta_v = 0)

Arguments

files

A specific file path or list of file paths. Default is select all text files in working directory "*.IrradCal"

type

One of c("uJ/count", "R_ref_panel").

label

A list of form list(parameter = expression(parameter)). Default is to label the parameter as "C_Q_e_ (uJ count^-1^)"

Details

At present only 2 formats are accepted:

An Ocean Optics format calibration file ('type="uJ/count"') e.g., '*.IrradCal'. This has a 7 line header (YAML) and tab-delimited columns of 'wavelength' and '[uJoule/count]'.

A reference panel reflectance calibration ('type="RefCal"'), i.e., the reflectance of the reference panel relative to a 'lambertian' surface with a reflectance factor of 1 throughout the wavelength range of interest. This has a heaer of 4 lines (YAML) and 2 tab delimited columns, 'wavelength' and 'R_lambda'.

Value

A hyperSpec object including a matrix of spectra, metadata extracted from the spectra headers and file information

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# set path to data files
file.path <- system.file("extdata", package = "FASTSpectra")

# parse radient energy calibration file
cal.rad <- import.calibration(files = paste0(file.path,"*.IrradCal"), type = "uJ/count")
summary(cal.rad)

#' # parse reference panel reflectance calibration file
cal.ref <- import.calibration(files = paste0(file.path,"*.ReflCal"), type = "R_ref_panel")
summary(cal.rad)

edwardpmorris/FASTSpectra documentation built on May 15, 2019, 11:03 p.m.