| plot_response | R Documentation |
Plots the relative spectral response measured by
response_calibration(), with a band of plus or minus one standard
uncertainty.
plot_response(
object,
title = NULL,
wavelength = NULL,
xlab = "Wavelength (nm)",
ylab = "Relative response",
base_size = 11,
linewidth = 0.6
)
object |
The result of |
title |
The plot title. By default, the number of lamp spectra and the median uncertainty. |
wavelength |
Optional ( |
xlab, ylab |
The axis titles. Default are |
base_size |
The size of the text, in points. Default is 11. |
linewidth |
The width of the response line. Default is 0.6. |
A ggplot object.
response_calibration()
planck <- function(wl, t) 1 / (wl^5 * (exp(1.4388e7 / (wl * t)) - 1))
reference <- data.frame(wavelength = seq(250, 850, by = 10))
reference$value <- planck(reference$wavelength, 3100)
reference$rsd <- 0.03
wl <- seq(260, 840, by = 0.1)
set.seed(1)
lamp <- 2e4 * exp(-((wl - 500) / 250)^2) * planck(wl, 3100) / planck(500, 3100) +
rnorm(length(wl), sd = 20)
names(lamp) <- wl
plot_response(response_calibration(lamp, reference))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.