diff --git a/DESCRIPTION b/DESCRIPTION
index cdcd8838..f352ce85 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -2,7 +2,7 @@ Package: ggspectra
Type: Package
Title: Extensions to 'ggplot2' for Radiation Spectra
Version: 0.3.14.9000
-Date: 2024-12-05
+Date: 2024-12-07
Authors@R:
c(
person("Pedro J.", "Aphalo", email = "pedro.aphalo@helsinki.fi", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-3385-972X")),
@@ -19,7 +19,7 @@ LazyLoad: TRUE
ByteCompile: TRUE
Depends:
R (>= 4.1.0),
- photobiology (>= 0.11.2),
+ photobiology (>= 0.11.4.9003),
ggplot2 (>= 3.5.0)
Imports:
photobiologyWavebands (>= 0.5.2),
diff --git a/NEWS.md b/NEWS.md
index 5ddfa833..8748850f 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -4,6 +4,14 @@ editor_options:
wrap: 72
---
+# ggspectra 0.4.0
+
+- Update for compatibility with 'photobiology' (>= 0.12.0), which is required.
+- `autoplot()` methods no longer support normalization on-the-fly, but existing
+normalization is updated when the unit or quantity is modified.
+- The argument passed to `idfactor` when plotting multiple spectra stored in
+long form, can be used to rename the existing idfactor of the spectral object.
+
# ggspectra 0.3.15
- Fix a bug in `autotitle()` affecting only collections of spectra where all
diff --git a/R/autoplot-calibration-spct.R b/R/autoplot-calibration-spct.R
index 93c0f7c9..964e1862 100644
--- a/R/autoplot-calibration-spct.R
+++ b/R/autoplot-calibration-spct.R
@@ -270,7 +270,7 @@ autoplot.calibration_spct <-
geom = "line",
time.format = "",
tz = "UTC",
- norm = NULL,
+ norm = NA,
text.size = 2.5,
idfactor = NULL,
facets = FALSE,
@@ -279,12 +279,9 @@ autoplot.calibration_spct <-
object.label = deparse(substitute(object)),
na.rm = TRUE) {
- if (is.null(idfactor)) {
- idfactor <- getIdFactor(object)
- }
- if (is.na(idfactor) || !is.character(idfactor)) {
- idfactor <- getMultipleWl(object) > 1L
- }
+ force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor = idfactor)
if (plot.data != "as.is") {
return(
@@ -312,8 +309,6 @@ autoplot.calibration_spct <-
)
}
- force(object.label)
-
annotations.default <-
getOption("photobiology.plot.annotations",
default = c("boxes", "labels", "colour.guide", "peaks"))
@@ -361,8 +356,7 @@ autoplot.calibration_mspct <-
...,
range = getOption("ggspectra.wlrange", default = NULL),
unit.out = "ignored",
- norm = getOption("ggspectra.normalize",
- default = "skip"),
+ norm = NA,
pc.out = getOption("ggspectra.pc.out", default = FALSE),
plot.data = "as.is",
idfactor = TRUE,
@@ -371,8 +365,9 @@ autoplot.calibration_mspct <-
na.rm = TRUE) {
force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor = idfactor, default = TRUE)
- idfactor <- validate_idfactor(idfactor = idfactor)
# We trim the spectra to avoid unnecessary computations later
if (!is.null(range)) {
object <- trim_wl(object, range = range, use.hinges = TRUE, fill = NULL)
@@ -395,7 +390,7 @@ autoplot.calibration_mspct <-
unit.out = unit.out,
norm = norm,
pc.out = pc.out,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
facets = facets,
object.label = object.label,
na.rm = na.rm,
@@ -408,7 +403,7 @@ autoplot.calibration_mspct <-
unit.out = unit.out,
norm = norm,
pc.out = pc.out,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
facets = facets,
object.label = object.label,
na.rm = na.rm,
diff --git a/R/autoplot-cps-spct.r b/R/autoplot-cps-spct.r
index 750ae1f0..d5dbc618 100644
--- a/R/autoplot-cps-spct.r
+++ b/R/autoplot-cps-spct.r
@@ -253,7 +253,7 @@ autoplot.cps_spct <-
w.band = getOption("photobiology.plot.bands",
default = list(UVC(), UVB(), UVA(), PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = "skip",
+ norm = NA,
unit.out = NULL,
pc.out = getOption("ggspectra.pc.out", default = FALSE),
label.qty = "mean",
@@ -271,12 +271,10 @@ autoplot.cps_spct <-
object.label = deparse(substitute(object)),
na.rm = TRUE) {
- if (is.null(idfactor)) {
- idfactor <- getIdFactor(object)
- }
- if (is.na(idfactor) || !is.character(idfactor)) {
- idfactor <- getMultipleWl(object) > 1L
- }
+ force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor)
+ object <- rename_idfactor(object, idfactor)
if (plot.data != "as.is") {
return(
@@ -304,22 +302,12 @@ autoplot.cps_spct <-
)
}
- force(object.label)
-
annotations.default <-
getOption("photobiology.plot.annotations",
default = c("boxes", "labels", "colour.guide", "peaks"))
annotations <- decode_annotations(annotations,
annotations.default)
- # avoid warning in 'photobiology' (== 0.10.10)
- if (is.character(norm) && norm == "update" && !is_normalized(object)) {
- norm <- "skip"
- }
- # normalization skipping is handled by normalize()
- object <- photobiology::normalize(x = object,
- range = range,
- norm = norm,
- na.rm = na.rm)
+
if (length(w.band) == 0) {
if (is.null(range)) {
w.band <- waveband(object)
@@ -370,8 +358,9 @@ autoplot.cps_mspct <-
na.rm = TRUE) {
force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor = idfactor, default = TRUE)
- idfactor <- validate_idfactor(idfactor = idfactor)
# We trim the spectra to avoid unnecessary computations later
if (!is.null(range)) {
object <- photobiology::trim_wl(object,
@@ -379,15 +368,6 @@ autoplot.cps_mspct <-
use.hinges = TRUE,
fill = NULL)
}
- # We apply the normalization to the collection if it is to be bound
- # otherwise normalization is applied to the "parallel-summary" spectrum
- if (plot.data == "as.is") {
- object <- photobiology::normalize(object,
- range = getOption("ggspectra.wlrange", default = NULL),
- norm = norm,
- na.rm = na.rm)
- norm <- "skip"
- }
# we convert the collection of spectra into a single spectrum object
# containing a summary spectrum or multiple spectra in long form.
z <- switch(plot.data,
@@ -405,7 +385,7 @@ autoplot.cps_mspct <-
range = getOption("ggspectra.wlrange", default = NULL),
norm = norm,
pc.out = pc.out,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
facets = facets,
object.label = object.label,
na.rm = na.rm,
@@ -417,7 +397,7 @@ autoplot.cps_mspct <-
range = getOption("ggspectra.wlrange", default = NULL),
norm = norm,
pc.out = pc.out,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
facets = facets,
object.label = object.label,
na.rm = na.rm,
diff --git a/R/autoplot-filter-spct.r b/R/autoplot-filter-spct.r
index ed0fb0fc..7d207faa 100644
--- a/R/autoplot-filter-spct.r
+++ b/R/autoplot-filter-spct.r
@@ -57,7 +57,7 @@ Afr_plot <- function(spct,
ylim,
na.rm,
...) {
- if (!is.filter_spct(spct)) {
+ if (!photobiology::is.filter_spct(spct)) {
stop("Afr_plot() can only plot filter_spct objects.")
}
@@ -65,15 +65,16 @@ Afr_plot <- function(spct,
ylim <- rep(NA_real_, 2L)
}
force(spct)
- spct <- any2Afr(spct, action = "add")
+ spct <- photobiology::any2Afr(spct, action = "add")
if (!is.null(range)) {
- spct <- trim_wl(spct, range = range)
+ spct <- photobiology::trim_wl(spct, range = range)
}
if (!is.null(w.band)) {
- w.band <- trim_wl(w.band, range = range(spct))
+ w.band <-
+ photobiology::trim_wl(w.band, range = photobiology::wl_range(spct))
}
- if (is_scaled(spct)) {
+ if (photobiology::is_scaled(spct)) {
if (pc.out) {
warning("Percent not supported for scaled spectral data.")
pc.out <- FALSE
@@ -82,9 +83,9 @@ Afr_plot <- function(spct,
s.Afr.label <- expression(Spectral~~absorptance~~italic(A)[lambda]~~("rel."))
Afr.label.total <- "atop(italic(A), (rel))"
Afr.label.avg <- "atop(bar(italic(A)[lambda]), (rel))"
- } else if (is_normalized(spct)) {
+ } else if (photobiology::is_normalized(spct)) {
warning("Plotting of normalized absorptance not supported")
- return(ggplot())
+ return(ggplot2::ggplot())
} else if (pc.out) {
scale.factor <- 100
s.Afr.label <- expression(Spectral~~absorptance~~italic(A)[lambda]~~("%"))
@@ -136,7 +137,9 @@ Afr_plot <- function(spct,
y.max <- max(spct[["Afr"]], 1, y.min, na.rm = TRUE)
}
- plot <- ggplot(spct, aes(x = .data[["w.length"]], y = .data[["Afr"]]))
+ plot <-
+ ggplot2::ggplot(spct,
+ ggplot2::aes(x = .data[["w.length"]], y = .data[["Afr"]]))
temp <- find_idfactor(spct = spct,
idfactor = idfactor,
facets = facets,
@@ -147,37 +150,48 @@ Afr_plot <- function(spct,
# We want data plotted on top of the boundary lines
if ("boundaries" %in% annotations) {
if (y.max > 1.005) {
- plot <- plot + geom_hline(yintercept = 1, linetype = "dashed", colour = "red")
+ plot <-
+ plot + ggplot2::geom_hline(yintercept = 1,
+ linetype = "dashed", colour = "red")
} else {
- plot <- plot + geom_hline(yintercept = 1, linetype = "dashed", colour = "black")
+ plot <-
+ plot + ggplot2::geom_hline(yintercept = 1,
+ linetype = "dashed", colour = "black")
}
if (y.min < -0.005) {
- plot <- plot + geom_hline(yintercept = 0,
- linetype = "dashed", colour = "red")
+ plot <-
+ plot + ggplot2::geom_hline(yintercept = 0,
+ linetype = "dashed", colour = "red")
} else {
- plot <- plot + geom_hline(yintercept = 0,
- linetype = "dashed", colour = "black")
+ plot <-
+ plot + ggplot2::geom_hline(yintercept = 0,
+ linetype = "dashed", colour = "black")
}
}
if (!is.null(geom) && geom %in% c("area", "spct")) {
- plot <- plot + geom_spct(fill = "black", colour = NA, alpha = 0.2)
+ plot <-
+ plot + geom_spct(fill = "black", colour = NA, alpha = 0.2)
}
- plot <- plot + geom_line(na.rm = na.rm)
- plot <- plot + labs(x = expression("Wavelength, "*lambda~(nm)), y = s.Afr.label)
+ plot <-
+ plot + ggplot2::geom_line(na.rm = na.rm)
+ plot <-
+ plot + ggplot2::labs(x = expression("Wavelength, "*lambda~(nm)),
+ y = s.Afr.label)
if (length(annotations) == 1 && annotations == "") {
return(plot)
}
- plot <- plot + scale_fill_identity() + scale_color_identity()
+ plot <-
+ plot + ggplot2::scale_fill_identity() + ggplot2::scale_color_identity()
plot <- plot + decoration(w.band = w.band,
label.mult = scale.factor,
y.max = y.max,
y.min = y.min,
- x.max = max(spct),
- x.min = min(spct),
+ x.max = photobiology::wl_max(spct),
+ x.min = photobiology::wl_min(spct),
annotations = annotations,
label.qty = label.qty,
span = span,
@@ -188,23 +202,29 @@ Afr_plot <- function(spct,
na.rm = TRUE)
if (!is.null(annotations) &&
- length(intersect(c("labels", "summaries", "colour.guide", "reserve.space"), annotations)) > 0L) {
+ length(intersect(c("labels", "summaries", "colour.guide", "reserve.space"),
+ annotations)) > 0L) {
y.limits <- c(y.min, y.min + (y.max - y.min) * 1.25)
- x.limits <- c(min(spct) - wl_expanse(spct) * 0.025, NA) # NA needed because of rounding errors
+ x.limits <- c(photobiology::wl_min(spct) -
+ photobiology::wl_expanse(spct) * 0.025, NA) # NA needed because of rounding errors
} else {
y.limits <- c(y.min, y.max)
- x.limits <- range(spct)
+ x.limits <- photobiology::wl_range(spct)
}
if (pc.out) {
- plot <- plot + scale_y_continuous(labels = scales::percent, breaks = y.breaks,
- limits = y.limits)
+ plot <-
+ plot + ggplot2::scale_y_continuous(labels = scales::percent,
+ breaks = y.breaks,
+ limits = y.limits)
} else {
- plot <- plot + scale_y_continuous(breaks = y.breaks,
- limits = y.limits)
+ plot <-
+ plot + ggplot2::scale_y_continuous(breaks = y.breaks,
+ limits = y.limits)
}
- plot + scale_x_continuous(limits = x.limits, breaks = scales::pretty_breaks(n = 7))
+ plot + ggplot2::scale_x_continuous(limits = x.limits,
+ breaks = scales::pretty_breaks(n = 7))
}
@@ -270,7 +290,7 @@ T_plot <- function(spct,
na.rm,
ylim,
...) {
- if (!is.filter_spct(spct)) {
+ if (!photobiology::is.filter_spct(spct)) {
stop("T_plot() can only plot filter_spct objects.")
}
if (!is.null(geom) && !geom %in% c("area", "line", "spct")) {
@@ -281,29 +301,29 @@ T_plot <- function(spct,
ylim <- rep(NA_real_, 2L)
}
force(spct)
- spct <- any2T(spct, action = "replace")
+ spct <- photobiology::any2T(spct, action = "replace")
if (!is.null(range)) {
- spct <- trim_wl(spct, range = range)
+ spct <- photobiology::trim_wl(spct, range = range)
}
- Tfr.type <- getTfrType(spct)
+ Tfr.type <- photobiology::getTfrType(spct)
if (!is.null(w.band)) {
- w.band <- trim_wl(w.band, range = range(spct))
+ w.band <- trim_wl(w.band, range = photobiology::wl_range(spct))
}
if (!length(Tfr.type)) {
Tfr.type <- "unknown"
}
Tfr.tag <- switch(Tfr.type,
- internal = "int",
- total = "tot",
+ internal = "int",
+ total = "tot",
unknown = "",
- NA_character_)
- Tfr.name <- switch(Tfr.type,
- internal = "Internal",
- total = "Total",
- unknown = "Unknown-type",
NA_character_)
+ Tfr.name <- switch(Tfr.type,
+ internal = "Internal",
+ total = "Total",
+ unknown = "Unknown-type",
+ NA_character_)
- if (is_scaled(spct)) {
+ if (photobiology::is_scaled(spct)) {
if (pc.out) {
warning("Percent not supported for scaled spectral data.")
pc.out <- FALSE
@@ -312,13 +332,13 @@ T_plot <- function(spct,
s.Tfr.label <- bquote(.(Tfr.name)~~spectral~~transmittance~~k %*% T[lambda]^{.(Tfr.tag)}~~("rel."))
Tfr.label.total <- paste("k %*% T^{", Tfr.tag,"}", sep = "")
Tfr.label.avg <- paste("bar(k %*% T[lambda]^{", Tfr.tag, "})", sep = "")
- } else if (is_normalized(spct)) {
+ } else if (photobiology::is_normalized(spct)) {
if (pc.out) {
warning("Percent not supported for normalized spectral data.")
pc.out <- FALSE
}
scale.factor <- 1
- norm <- round(getNormalization(spct)[["norm.wl"]], 1)
+ norm <- round(photobiology::getNormalization(spct)[["norm.wl"]], 1)
s.Tfr.label <- bquote(.(Tfr.name)~~spectral~~transmittance~~T[lambda]^{.(Tfr.tag)}/T[lambda==.(norm)]^{.(Tfr.tag)}~~("rel."))
Tfr.label.total <- paste("atop(T^{", Tfr.tag,
"}, T[lambda == ", norm, "]^{", Tfr.tag, "}",
@@ -377,7 +397,9 @@ T_plot <- function(spct,
y.max <- max(c(spct[["Tfr"]], 1), na.rm = TRUE)
}
- plot <- ggplot(spct, aes(x = .data[["w.length"]], y = .data[["Tfr"]]))
+ plot <-
+ ggplot2::ggplot(spct,
+ ggplot2::aes(x = .data[["w.length"]], y = .data[["Tfr"]]))
temp <- find_idfactor(spct = spct,
idfactor = idfactor,
facets = facets,
@@ -388,39 +410,44 @@ T_plot <- function(spct,
# We want data plotted on top of the boundary lines
if ("boundaries" %in% annotations) {
if (y.max > 1.005) {
- plot <- plot + geom_hline(yintercept = 1,
- linetype = "dashed", colour = "red")
+ plot <-
+ plot + ggplot2::geom_hline(yintercept = 1,
+ linetype = "dashed", colour = "red")
} else {
- plot <- plot + geom_hline(yintercept = 1,
- linetype = "dashed", colour = "black")
+ plot <-
+ plot + ggplot2::geom_hline(yintercept = 1,
+ linetype = "dashed", colour = "black")
}
if (y.min < -0.005) {
- plot <- plot + geom_hline(yintercept = 0,
- linetype = "dashed", colour = "red")
+ plot <-
+ plot + ggplot2::geom_hline(yintercept = 0,
+ linetype = "dashed", colour = "red")
} else {
- plot <- plot + geom_hline(yintercept = 0,
- linetype = "dashed", colour = "black")
+ plot <-
+ plot + ggplot2::geom_hline(yintercept = 0,
+ linetype = "dashed", colour = "black")
}
}
if (!is.null(geom) && geom %in% c("area", "spct")) {
plot <- plot + geom_spct(fill = "black", colour = NA, alpha = 0.2)
}
- plot <- plot + geom_line(na.rm = na.rm)
+ plot <- plot + ggplot2::geom_line(na.rm = na.rm)
plot <- plot + labs(x = expression("Wavelength, "*lambda~(nm)), y = s.Tfr.label)
if (length(annotations) == 1 && annotations == "") {
return(plot)
}
- plot <- plot + scale_fill_identity() + scale_color_identity()
+ plot <-
+ plot + ggplot2::scale_fill_identity() + ggplot2::scale_color_identity()
plot <- plot + decoration(w.band = w.band,
label.mult = scale.factor,
y.max = y.max,
y.min = y.min,
- x.max = max(spct),
- x.min = min(spct),
+ x.max = photobiology::wl_max(spct),
+ x.min = photobiology::wl_min(spct),
annotations = annotations,
label.qty = label.qty,
span = span,
@@ -439,14 +466,18 @@ T_plot <- function(spct,
x.limits <- range(spct)
}
if (pc.out) {
- plot <- plot + scale_y_continuous(labels = scales::percent, breaks = y.breaks,
- limits = y.limits)
+ plot <-
+ plot + ggplot2::scale_y_continuous(labels = scales::percent, breaks = y.breaks,
+ limits = y.limits)
} else {
- plot <- plot + scale_y_continuous(breaks = y.breaks,
- limits = y.limits)
+ plot <-
+ plot + ggplot2::scale_y_continuous(breaks = y.breaks,
+ limits = y.limits)
}
- plot + scale_x_continuous(limits = x.limits, breaks = scales::pretty_breaks(n = 7))
+ plot +
+ ggplot2::scale_x_continuous(limits = x.limits,
+ breaks = scales::pretty_breaks(n = 7))
}
@@ -510,7 +541,7 @@ A_plot <- function(spct,
na.rm,
ylim,
...) {
- if (!is.filter_spct(spct)) {
+ if (!photobiology::is.filter_spct(spct)) {
stop("A_plot() can only plot filter_spct objects.")
}
if (!is.null(geom) && !geom %in% c("area", "line", "spct")) {
@@ -520,14 +551,14 @@ A_plot <- function(spct,
if (is.null(ylim) || !is.numeric(ylim)) {
ylim <- rep(NA_real_, 2L)
}
- spct <- any2A(spct, action = "replace")
+ spct <- photobiology::any2A(spct, action = "replace")
if (!is.null(range)) {
- spct <- trim_wl(spct, range = range)
+ spct <- photobiology::trim_wl(spct, range = range)
}
if (!is.null(w.band)) {
- w.band <- trim_wl(w.band, range = range(spct))
+ w.band <- photobiology::trim_wl(w.band, range = photobiology::wl_range(spct))
}
- Tfr.type <- getTfrType(spct)
+ Tfr.type <- photobiology::getTfrType(spct)
if (!length(Tfr.type)) {
Tfr.type <- "unknown"
}
@@ -541,11 +572,11 @@ A_plot <- function(spct,
total = "Total",
unknown = "Unknown-type",
NA_character_)
- if (is_scaled(spct)) {
+ if (photobiology::is_scaled(spct)) {
s.A.label <- bquote(.(Tfr.name)~~spectral~~absorbance~~k %*% A[lambda]^{.(Tfr.tag)}~~("rel."))
A.label.total <- paste("k %*% A^{", Tfr.tag, "}", sep = "")
A.label.avg <- paste("bar(k %*% A[lambda]^{", Tfr.tag, "})", sep = "")
- } else if (is_normalized(spct)) {
+ } else if (photobiology::is_normalized(spct)) {
norm <- round(getNormalization(spct)[["norm.wl"]], 1)
s.A.label <- bquote(.(Tfr.name)~~spectral~~absorbance~~A[lambda]^{.(Tfr.tag)}/A[lambda==.(norm)]^{.(Tfr.tag)}~~("rel."))
A.label.total <- paste("atop(A^{", Tfr.tag,
@@ -581,8 +612,8 @@ A_plot <- function(spct,
if (!is.na(ylim[1])) {
y.min <- ylim[1]
spct[["A"]] <- ifelse(spct[["A"]] < y.min,
- NA_real_,
- spct[["A"]])
+ NA_real_,
+ spct[["A"]])
} else {
y.min <- min(c(spct[["A"]], 0), na.rm = TRUE)
}
@@ -590,13 +621,15 @@ A_plot <- function(spct,
if (!is.na(ylim[2])) {
y.max <- ylim[2]
spct[["A"]] <- ifelse(spct[["A"]] > y.max,
- NA_real_,
- spct[["A"]])
+ NA_real_,
+ spct[["A"]])
} else {
y.max <- max(spct[["A"]], na.rm = TRUE)
}
- plot <- ggplot(spct, aes(x = .data[["w.length"]], y = .data[["A"]]))
+ plot <-
+ ggplot2::ggplot(spct,
+ ggplot2::aes(x = .data[["w.length"]], y = .data[["A"]]))
temp <- find_idfactor(spct = spct,
idfactor = idfactor,
facets = facets,
@@ -607,12 +640,18 @@ A_plot <- function(spct,
# We want data plotted on top of the boundary lines
if ("boundaries" %in% annotations) {
if (y.max > 6) {
- plot <- plot + geom_hline(yintercept = 6, linetype = "dashed", colour = "red")
+ plot <-
+ plot + ggplot2::geom_hline(yintercept = 6,
+ linetype = "dashed", colour = "red")
}
if (y.min < -0.01) {
- plot <- plot + geom_hline(yintercept = 0, linetype = "dashed", colour = "red")
+ plot <-
+ plot + ggplot2::geom_hline(yintercept = 0,
+ linetype = "dashed", colour = "red")
} else {
- plot <- plot + geom_hline(yintercept = 0, linetype = "dashed", colour = "black")
+ plot <-
+ plot + ggplot2::geom_hline(yintercept = 0,
+ linetype = "dashed", colour = "black")
}
}
@@ -626,13 +665,14 @@ A_plot <- function(spct,
return(plot)
}
- plot <- plot + scale_fill_identity() + scale_color_identity()
+ plot <-
+ plot + ggplot2::scale_fill_identity() + ggplot2::scale_color_identity()
plot <- plot + decoration(w.band = w.band,
y.max = min(y.max, 6),
y.min = y.min,
- x.max = max(spct),
- x.min = min(spct),
+ x.max = photobiology::wl_max(spct),
+ x.min = photobiology::wl_min(spct),
annotations = annotations,
label.qty = label.qty,
span = span,
@@ -643,15 +683,17 @@ A_plot <- function(spct,
na.rm = TRUE)
if (!is.null(annotations) &&
- length(intersect(c("boxes", "segments", "labels", "summaries", "colour.guide", "reserve.space"), annotations)) > 0L) {
+ length(intersect(c("boxes", "segments", "labels", "summaries",
+ "colour.guide", "reserve.space"), annotations)) > 0L) {
y.limits <- c(y.min, min(y.max, 6) * 1.25)
- x.limits <- c(min(spct) - wl_expanse(spct) * 0.025, NA) # NA needed because of rounding errors
+ x.limits <- c(min(spct) - photobiology::wl_expanse(spct) * 0.025, NA) # NA needed because of rounding errors
} else {
y.limits <- c(y.min, min(y.max, 6))
x.limits <- range(spct)
}
- plot <- plot + scale_y_continuous(limits = y.limits)
- plot + scale_x_continuous(limits = x.limits, breaks = scales::pretty_breaks(n = 7))
+ plot <- plot + ggplot2::scale_y_continuous(limits = y.limits)
+ plot + ggplot2::scale_x_continuous(limits = x.limits,
+ breaks = scales::pretty_breaks(n = 7))
}
@@ -754,13 +796,13 @@ R_plot <- function(spct,
unknown = "Unknown-type",
NA_character_)
- if (is_scaled(spct)) {
+ if (photobiology::is_scaled(spct)) {
scale.factor <- 1
s.Rfr.label <- bquote(.(Rfr.name)~~spectral~~reflectance~~k %*% R[lambda]^{.(Rfr.tag)}~~("rel."))
Rfr.label.total <- paste("k %*% R^{", Rfr.tag, "}", sep = "")
Rfr.label.avg <- paste("bar(k %*% R[lambda]^{", Rfr.tag, "})", sep = "")
- } else if (is_normalized(spct)) {
- norm <- round(getNormalization(spct)[["norm.wl"]], 1)
+ } else if (photobiology::is_normalized(spct)) {
+ norm <- round(photobiology::getNormalization(spct)[["norm.wl"]], 1)
s.Rfr.label <- bquote(.(Rfr.name)~~spectral~~reflectance~~R[lambda]^{.(Rfr.tag)}/R[lambda==.(norm)]^{.(Rfr.tag)}~~("rel."))
Rfr.label.total <- paste("atop(R^{", Rfr.tag,
"}, R[lambda == ", norm, "]^{", Rfr.tag, "})",
@@ -819,7 +861,7 @@ R_plot <- function(spct,
y.max <- max(c(spct[["Rfr"]], 1), na.rm = TRUE)
}
- plot <- ggplot(spct, aes(x = .data[["w.length"]], y = .data[["Rfr"]]))
+ plot <- ggplot2::ggplot(spct, aes(x = .data[["w.length"]], y = .data[["Rfr"]]))
temp <- find_idfactor(spct = spct,
idfactor = idfactor,
facets = facets,
@@ -830,34 +872,44 @@ R_plot <- function(spct,
# We want data plotted on top of the boundary lines
if ("boundaries" %in% annotations) {
if (y.max > 1.005) {
- plot <- plot + geom_hline(yintercept = 1, linetype = "dashed", colour = "red")
+ plot <-
+ plot + ggplot2::geom_hline(yintercept = 1,
+ linetype = "dashed", colour = "red")
} else {
- plot <- plot + geom_hline(yintercept = 1, linetype = "dashed", colour = "black")
+ plot <-
+ plot + ggplot2::geom_hline(yintercept = 1,
+ linetype = "dashed", colour = "black")
}
if (y.min < -0.005) {
- plot <- plot + geom_hline(yintercept = 0, linetype = "dashed", colour = "red")
+ plot <-
+ plot + ggplot2::geom_hline(yintercept = 0,
+ linetype = "dashed", colour = "red")
} else {
- plot <- plot + geom_hline(yintercept = 0, linetype = "dashed", colour = "black")
+ plot <-
+ plot + ggplot2::geom_hline(yintercept = 0,
+ linetype = "dashed", colour = "black")
}
}
if (!is.null(geom) && geom %in% c("area", "spct")) {
plot <- plot + geom_spct(fill = "black", colour = NA, alpha = 0.2)
}
- plot <- plot + geom_line(na.rm = na.rm)
- plot <- plot + labs(x = expression("Wavelength, "*lambda~(nm)), y = s.Rfr.label)
+ plot <- plot + ggplot2::geom_line(na.rm = na.rm)
+ plot <- plot + labs(x = expression("Wavelength, "*lambda~(nm)),
+ y = s.Rfr.label)
if (length(annotations) == 1 && annotations == "") {
return(plot)
}
- plot <- plot + scale_fill_identity() + scale_color_identity()
+ plot <-
+ plot + ggplot2::scale_fill_identity() + ggplot2::scale_color_identity()
plot <- plot + decoration(w.band = w.band,
y.max = y.max,
y.min = y.min,
- x.max = max(spct),
- x.min = min(spct),
+ x.max = photobiology::wl_max(spct),
+ x.min = photobiology::wl_min(spct),
annotations = annotations,
label.qty = label.qty,
span = span,
@@ -870,20 +922,24 @@ R_plot <- function(spct,
if (!is.null(annotations) &&
length(intersect(c("labels", "summaries", "colour.guide", "reserve.space"), annotations)) > 0L) {
y.limits <- c(y.min, y.min + (y.max - y.min) * 1.25)
- x.limits <- c(min(spct) - wl_expanse(spct) * 0.025, NA) # NA needed because of rounding errors
+ x.limits <- c(min(spct) - photobiology::wl_expanse(spct) * 0.025, NA) # NA needed because of rounding errors
} else {
y.limits <- c(y.min, y.max)
- x.limits <- range(spct)
+ x.limits <- photobiology::wl_range(spct)
}
if (pc.out) {
- plot <- plot + scale_y_continuous(labels = scales::percent, breaks = y.breaks,
- limits = y.limits)
+ plot <-
+ plot + ggplot2::scale_y_continuous(labels = scales::percent,
+ breaks = y.breaks,
+ limits = y.limits)
} else {
- plot <- plot + scale_y_continuous(breaks = y.breaks,
- limits = y.limits)
+ plot <-
+ plot + ggplot2::scale_y_continuous(breaks = y.breaks,
+ limits = y.limits)
}
- plot + scale_x_continuous(limits = x.limits, breaks = scales::pretty_breaks(n = 7))
+ plot + ggplot2::scale_x_continuous(limits = x.limits,
+ breaks = scales::pretty_breaks(n = 7))
}
#' Create a complete ggplot for a object spectrum.
@@ -937,10 +993,10 @@ O_plot <- function(spct,
facets,
na.rm,
ylim) {
- if (!is.object_spct(spct)) {
+ if (!photobiology::is.object_spct(spct)) {
stop("O_plot() can only plot object_spct objects.")
}
- if (getMultipleWl(spct) > 1L && (is.null(facets) || !facets)) {
+ if (photobiology::getMultipleWl(spct) > 1L && (is.null(facets) || !facets)) {
warning("Only one object spectrum per panel supported")
facets <- TRUE
} else if (is.null(facets)) {
@@ -961,10 +1017,11 @@ O_plot <- function(spct,
warning("'ylim' not supported for stacked plots!")
}
if (!is.null(range)) {
- spct <- trim_wl(spct, range = range)
+ spct <- photobiology::trim_wl(spct, range = range)
}
if (!is.null(w.band)) {
- w.band <- trim_wl(w.band, range = range(spct))
+ w.band <- photobiology::trim_wl(w.band,
+ range = photobiology::wl_range(spct))
}
Rfr.type <- getRfrType(spct)
if (length(Rfr.type) == 0) {
@@ -979,7 +1036,7 @@ O_plot <- function(spct,
}
if (Tfr.type == "internal") {
# warning("Internal transmittance converted to total transmittance")
- spct <- convertTfrType(spct, Tfr.type = "total")
+ spct <- photobiology::convertTfrType(spct, Tfr.type = "total")
}
s.Rfr.label <- expression(atop(Spectral~~reflectance~R[lambda]~~absorptance~~A[lambda], and~~transmittance~T[lambda]))
spct[["Afr"]] <- 1.0 - spct[["Tfr"]] - spct[["Rfr"]]
@@ -1033,55 +1090,73 @@ O_plot <- function(spct,
}
}
- idfactor <- getIdFactor(spct) # needed as we will get a tibble back
- molten.tb <- photobiology::spct_wide2long(spct, idfactor = "variable", rm.spct.class = TRUE)
+ idfactor <-
+ photobiology::getIdFactor(spct) # needed as we will get a tibble back
+ molten.tb <-
+ photobiology::spct_wide2long(spct, idfactor = "variable", rm.spct.class = TRUE)
- plot <- ggplot(molten.tb, aes(x = .data[["w.length"]], y = .data[["value"]]))
- attributes(plot[["data"]]) <- c(attributes(plot[["data"]]), get_attributes(spct))
+ plot <-
+ ggplot2::ggplot(molten.tb, aes(x = .data[["w.length"]], y = .data[["value"]]))
+ attributes(plot[["data"]]) <- c(attributes(plot[["data"]]),
+ photobiology::get_attributes(spct))
if (stacked) {
if (is.null(geom) || geom %in% c("spct", "area")) {
- plot <- plot + geom_area(aes(alpha = .data[["variable"]]), fill = "black", colour = NA)
- plot <- plot + scale_alpha_manual(values = c(Tfr = 0.4,
- Rfr = 0.25,
- Afr = 0.55),
- breaks = c("Rfr", "Afr", "Tfr"),
- labels = c(Tfr = expression(T[lambda]),
- Afr = expression(A[lambda]),
- Rfr = expression(R[lambda])),
- guide = guide_legend(title = NULL))
- } else {
- plot <- plot + geom_line(aes(linetype = .data[["variable"]]),
- position = position_stack())
- plot <- plot + scale_linetype(labels = c(Tfr = expression(T[lambda]),
+ plot <-
+ plot + geom_area(aes(alpha = .data[["variable"]]),
+ fill = "black", colour = NA)
+ plot <-
+ plot +
+ ggplot2::scale_alpha_manual(values = c(Tfr = 0.4,
+ Rfr = 0.25,
+ Afr = 0.55),
+ breaks = c("Rfr", "Afr", "Tfr"),
+ labels = c(Tfr = expression(T[lambda]),
Afr = expression(A[lambda]),
Rfr = expression(R[lambda])),
guide = guide_legend(title = NULL))
+ } else {
+ plot <-
+ plot + ggplot2::geom_line(aes(linetype = .data[["variable"]]),
+ position = ggplot2::position_stack())
+ plot <-
+ plot +
+ ggplot2::scale_linetype(labels = c(Tfr = expression(T[lambda]),
+ Afr = expression(A[lambda]),
+ Rfr = expression(R[lambda])),
+ guide = guide_legend(title = NULL))
}
} else {
if (!is.null(geom) && geom %in% c("spct", "area")) {
plot <- plot + geom_spct(aes(group = .data[["variable"]]),
fill = "black", colour = NA, alpha = 0.2)
}
- plot <- plot + geom_line(aes(linetype = .data[["variable"]]))
- plot <- plot + scale_linetype(labels = c(Tfr = expression(T[lambda]),
- Afr = expression(A[lambda]),
- Rfr = expression(R[lambda])),
- guide = guide_legend(title = NULL))
+ plot <-
+ plot +
+ ggplot2::geom_line(aes(linetype = .data[["variable"]]))
+ plot <-
+ plot +
+ ggplot2::scale_linetype(labels = c(Tfr = expression(T[lambda]),
+ Afr = expression(A[lambda]),
+ Rfr = expression(R[lambda])),
+ guide = ggplot2::guide_legend(title = NULL))
}
if (is.numeric(facets)) {
plot <- plot +
- facet_wrap(facets = vars(.data[[idfactor]]), ncol = as.integer(facets))
+ ggplot2::facet_wrap(facets = vars(.data[[idfactor]]),
+ ncol = as.integer(facets))
} else if (facets) {
plot <- plot +
- facet_wrap(facets = vars(.data[[idfactor]]))
+ ggplot2::facet_wrap(facets = vars(.data[[idfactor]]))
}
- plot <- plot + labs(x = expression("Wavelength, "*lambda~(nm)), y = s.Rfr.label)
+ plot <-
+ plot + ggplot2::labs(x = expression("Wavelength, "*lambda~(nm)), y = s.Rfr.label)
if (length(annotations) == 1 && annotations == "") {
return(plot)
}
- plot <- plot + scale_fill_identity() + scale_color_identity()
+ plot <-
+ plot + ggplot2::scale_fill_identity() + ggplot2::scale_color_identity()
valid.annotations <- c("labels", "boxes", "segments", "colour.guide", "reserve.space")
if (!stacked) {
@@ -1092,8 +1167,8 @@ O_plot <- function(spct,
plot <- plot + decoration(w.band = w.band,
y.max = y.max,
y.min = y.min,
- x.max = max(spct),
- x.min = min(spct),
+ x.max = photobiology::wl_max(spct),
+ x.min = photobiology::wl_min(spct),
annotations = annotations,
label.qty = label.qty,
span = span,
@@ -1105,10 +1180,11 @@ O_plot <- function(spct,
if (!is.null(annotations) &&
length(intersect(c("boxes", "segments", "labels", "colour.guide", "reserve.space"), annotations)) > 0L) {
y.limits <- c(y.min, y.min + (y.max - y.min) * 1.25)
- x.limits <- c(min(spct) - wl_expanse(spct) * 0.025, NA)
+ x.limits <-
+ c(photobiology::wl_min(spct) - photobiology::wl_expanse(spct) * 0.025, NA)
} else {
y.limits <- c(y.min, y.max)
- x.limits <- range(spct)
+ x.limits <- photobiology::wl_range(spct)
}
if (pc.out) {
plot <- plot +
@@ -1117,12 +1193,12 @@ O_plot <- function(spct,
limits = y.limits)
} else {
plot <-
- plot + scale_y_continuous(breaks = y.breaks,
- limits = y.limits)
+ plot + ggplot2::scale_y_continuous(breaks = y.breaks,
+ limits = y.limits)
}
- plot + scale_x_continuous(limits = x.limits,
- breaks = scales::pretty_breaks(n = 7))
+ plot + ggplot2::scale_x_continuous(limits = x.limits,
+ breaks = scales::pretty_breaks(n = 7))
}
@@ -1168,13 +1244,13 @@ O_plot <- function(spct,
#' autoplot(yellow_gel.spct)
#' autoplot(yellow_gel.spct, geom = "spct")
#' autoplot(yellow_gel.spct, plot.qty = "transmittance")
-#' autoplot(yellow_gel.spct, plot.qty = "absorptance")
#' autoplot(yellow_gel.spct, plot.qty = "absorbance")
#' autoplot(yellow_gel.spct, pc.out = TRUE)
#' autoplot(yellow_gel.spct, annotations = c("+", "wls"))
#'
#' # spectra for two filters in long form
#' autoplot(two_filters.spct)
+#' autoplot(two_filters.spct, idfactor = TRUE)
#' autoplot(two_filters.spct, idfactor = "Spectra")
#' autoplot(two_filters.spct, facets = TRUE)
#'
@@ -1190,8 +1266,7 @@ autoplot.filter_spct <-
w.band = getOption("photobiology.plot.bands",
default = list(UVC(), UVB(), UVA(), PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.norm",
- default = "update"),
+ norm = NA,
plot.qty = getOption("photobiology.filter.qty",
default = "transmittance"),
pc.out = getOption("ggspectra.pc.out",
@@ -1212,19 +1287,16 @@ autoplot.filter_spct <-
object.label = deparse(substitute(object)),
na.rm = TRUE) {
- if (is.null(idfactor)) {
- idfactor <- getIdFactor(object)
- }
- if (is.na(idfactor) || !is.character(idfactor)) {
- idfactor <- getMultipleWl(object) > 1L
- }
+ force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor)
+ object <- rename_idfactor(object, idfactor)
if (plot.data != "as.is") {
return(
- autoplot(object = subset2mspct(object),
+ autoplot(object = photobiology::subset2mspct(object),
w.band = w.band,
range = range,
- norm = norm,
plot.qty = plot.qty,
pc.out = pc.out,
label.qty = label.qty,
@@ -1245,19 +1317,11 @@ autoplot.filter_spct <-
)
}
- force(object.label)
-
annotations.default <-
getOption("photobiology.plot.annotations",
default = c("boxes", "labels", "summaries", "colour.guide", "peaks"))
annotations <- decode_annotations(annotations,
annotations.default)
- # normalization updated and quantity changed in one go
- object <- photobiology::normalize(x = object,
- range = range,
- norm = norm,
- qty.out = plot.qty,
- na.rm = na.rm)
if (is.null(label.qty)) {
if (photobiology::is_normalized(object) ||
photobiology::is_scaled(object)) {
@@ -1328,10 +1392,10 @@ autoplot.filter_spct <-
}
out.ggplot +
autotitle(object = object,
- time.format = time.format,
- tz = tz,
- object.label = object.label,
- annotations = annotations)
+ time.format = time.format,
+ tz = tz,
+ object.label = object.label,
+ annotations = annotations)
}
#' @rdname autoplot.filter_spct
@@ -1342,8 +1406,7 @@ autoplot.filter_mspct <-
function(object,
...,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.norm",
- default = "update"),
+ norm = NA,
plot.qty = getOption("photobiology.filter.qty",
default = "transmittance"),
pc.out = getOption("ggspectra.pc.out",
@@ -1355,27 +1418,20 @@ autoplot.filter_mspct <-
na.rm = TRUE) {
force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor = idfactor, default = TRUE)
- idfactor <- validate_idfactor(idfactor = idfactor)
- # We trim the spectra to avoid unnecesary computaions later
+ # We trim the spectra to avoid unnecessary computations later
if (!is.null(range)) {
object <- photobiology::trim_wl(object, range = range, use.hinges = TRUE, fill = NULL)
}
- # We apply the normalization to the collection if it is to be bound
- # otherwise normalization is applied to the "parallel-summary" spectrum
- if (plot.data == "as.is") {
- object <- photobiology::normalize(object,
- norm = norm,
- qty.out = plot.qty,
- na.rm = na.rm)
- norm <- "skip"
- }
# we convert spectra to the quantity to be plotted
object <- switch(plot.qty,
transmittance = any2T(object, action = "replace"),
absorbance = any2A(object, action = "replace"),
# we need to discard T´Rfr if present
- absorptance = msmsply(any2Afr(object, action = "replace"), `[`, i = TRUE, j = c("w.length", "Afr")))
+ absorptance = msmsply(any2Afr(object, action = "replace"),
+ `[`, i = TRUE, j = c("w.length", "Afr")))
# we convert the collection of spectra into a single spectrum object
# containing a summary spectrum or multiple spectra in long form.
z <- switch(plot.data,
@@ -1390,13 +1446,12 @@ autoplot.filter_mspct <-
se = photobiology::s_se(object)
)
col.name <- c(transmittance = "Tfr", absorptance = "Afr", absorbance = "A")
- if (is.filter_spct(z) && col.name[plot.qty] %in% names(z)) {
+ if (photobiology::is.filter_spct(z) && col.name[plot.qty] %in% names(z)) {
autoplot(object = z,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = norm,
plot.qty = plot.qty,
pc.out = pc.out,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
facets = facets,
object.label = object.label,
na.rm = na.rm,
@@ -1407,9 +1462,8 @@ autoplot.filter_mspct <-
autoplot(object = z,
y.name = paste(col.name[plot.qty], plot.data, sep = "."),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = norm,
pc.out = pc.out,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
facets = facets,
object.label = object.label,
na.rm = na.rm,
@@ -1457,8 +1511,7 @@ autoplot.reflector_spct <-
w.band=getOption("photobiology.plot.bands",
default = list(UVC(), UVB(), UVA(), PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.norm",
- default = "update"),
+ norm = NA,
plot.qty = getOption("photobiology.reflector.qty",
default = "reflectance"),
pc.out = getOption("ggspectra.pc.out",
@@ -1479,19 +1532,16 @@ autoplot.reflector_spct <-
object.label = deparse(substitute(object)),
na.rm = TRUE) {
- if (is.null(idfactor)) {
- idfactor <- getIdFactor(object)
- }
- if (is.na(idfactor) || !is.character(idfactor)) {
- idfactor <- getMultipleWl(object) > 1L
- }
+ force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor)
+ object <- rename_idfactor(object, idfactor)
if (plot.data != "as.is") {
return(
- autoplot(object = subset2mspct(object),
+ autoplot(object = photobiology::subset2mspct(object),
w.band = w.band,
range = range,
- norm = norm,
plot.qty = plot.qty,
pc.out = pc.out,
label.qty = label.qty,
@@ -1512,19 +1562,12 @@ autoplot.reflector_spct <-
)
}
- force(object.label)
-
annotations.default <-
getOption("photobiology.plot.annotations",
default = c("boxes", "labels", "summaries", "colour.guide", "peaks"))
annotations <- decode_annotations(annotations,
annotations.default)
- # normalization needs to be redone if unit.out has changed
- object <- photobiology::normalize(x = object,
- range = range,
- norm = norm,
- qty.out = plot.qty,
- na.rm = na.rm)
+
if (is.null(label.qty)) {
if (photobiology::is_normalized(object) ||
photobiology::is_scaled(object)) {
@@ -1578,7 +1621,7 @@ autoplot.reflector_mspct <-
function(object,
...,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.normalize", default = "update"),
+ norm = NA,
plot.qty = getOption("photobiology.reflector.qty",
default = "reflectance"),
pc.out = getOption("ggspectra.pc.out",
@@ -1590,8 +1633,9 @@ autoplot.reflector_mspct <-
na.rm = TRUE) {
force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor = idfactor, default = TRUE)
- idfactor <- validate_idfactor(idfactor = idfactor)
# We trim the spectra to avoid unnecessary computations later
if (!is.null(range)) {
object <- photobiology::trim_wl(object,
@@ -1599,15 +1643,7 @@ autoplot.reflector_mspct <-
use.hinges = TRUE,
fill = NULL)
}
- # We apply the normalization to the collection if it is to be bound
- # otherwise normalization is applied to the "parallel-summary" spectrum
- if (plot.data == "as.is") {
- object <- photobiology::normalize(object,
- norm = norm,
- qty.out = plot.qty,
- na.rm = na.rm)
- norm <- "skip"
- }
+
# we convert the collection of spectra into a single spectrum object
# containing a summary spectrum or multiple spectra in long form.
z <- switch(plot.data,
@@ -1620,13 +1656,12 @@ autoplot.reflector_mspct <-
sd = photobiology::s_sd(object),
se = photobiology::s_se(object)
)
- if (is.reflector_spct(z) && "Rfr" %in% names(z)) {
+ if (photobiology::is.reflector_spct(z) && "Rfr" %in% names(z)) {
autoplot(object = z,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = norm,
plot.qty = plot.qty,
pc.out = pc.out,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
facets = facets,
object.label = object.label,
na.rm = na.rm,
@@ -1636,9 +1671,8 @@ autoplot.reflector_mspct <-
autoplot(object = z,
y.name = paste("Rfr", plot.data, sep = "."),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = norm,
pc.out = pc.out,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
facets = facets,
object.label = object.label,
na.rm = na.rm,
@@ -1708,7 +1742,7 @@ autoplot.object_spct <-
w.band = getOption("photobiology.plot.bands",
default = list(UVC(), UVB(), UVA(), PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = "skip",
+ norm = NA,
plot.qty = "all",
pc.out = getOption("ggspectra.pc.out",
default = FALSE),
@@ -1729,19 +1763,16 @@ autoplot.object_spct <-
object.label = deparse(substitute(object)),
na.rm = TRUE) {
- if (is.null(idfactor)) {
- idfactor <- getIdFactor(object)
- }
- if (is.na(idfactor) || !is.character(idfactor)) {
- idfactor <- getMultipleWl(object) > 1L
- }
+ force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor)
+ object <- rename_idfactor(object, idfactor)
if (plot.data != "as.is") {
return(
- autoplot(object = subset2mspct(object),
+ autoplot(object = photobiology::subset2mspct(object, idfactor = idfactor),
w.band = w.band,
range = range,
- norm = norm,
plot.qty = plot.qty,
pc.out = pc.out,
label.qty = label.qty,
@@ -1763,12 +1794,11 @@ autoplot.object_spct <-
)
}
- force(object.label)
if (is.null(plot.qty)) {
plot.qty <- "all"
}
if (is.null(facets)) {
- facets <- plot.qty == "all" && getMultipleWl(object) > 1L
+ facets <- plot.qty == "all" && photobiology::getMultipleWl(object) > 1L
}
if (plot.qty == "all") {
@@ -1829,7 +1859,6 @@ autoplot.object_spct <-
autoplot(object = object,
w.band = w.band,
range = range,
- norm = norm,
plot.qty = plot.qty,
pc.out = pc.out,
label.qty = label.qty,
@@ -1857,7 +1886,7 @@ autoplot.object_mspct <-
function(object,
...,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = "skip",
+ norm = NA,
plot.qty = getOption("photobiology.filter.qty",
default = "all"),
pc.out = getOption("ggspectra.pc.out",
@@ -1869,8 +1898,9 @@ autoplot.object_mspct <-
na.rm = TRUE) {
force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor = idfactor, default = TRUE)
- idfactor <- validate_idfactor(idfactor = idfactor)
# facets will be forced later for "all" with a warning
if (plot.qty == "reflectance") {
object <- photobiology::as.reflector_mspct(object)
@@ -1884,15 +1914,7 @@ autoplot.object_mspct <-
use.hinges = TRUE,
fill = NULL)
}
- # We apply the normalization to the collection if it is to be bound
- # otherwise normalization is applied to the "parallel-summary" spectrum
- if (plot.data == "as.is" && plot.qty != "all") {
- object <- photobiology::normalize(object,
- norm = norm,
- qty.out = plot.qty,
- na.rm = na.rm)
- norm <- "skip"
- }
+
# we convert the collection of spectra into a single spectrum object
# containing a summary spectrum or multiple spectra in long form.
z <- switch(plot.data,
@@ -1906,39 +1928,36 @@ autoplot.object_mspct <-
se = photobiology::s_se(object)
)
col.name <- c(transmittance = "Tfr", absorptance = "Afr", reflectance = "Rfr")
- if ((is.object_spct(z) && sum(col.name %in% names(z)) >= 2) ||
- (is.filter_spct(z) && any(c("Tfr", "Afr", "A")) %in% names(z)) ||
- (is.reflector_spct(z) && "Rfr" %in% names(z))) {
+ if ((photobiology::is.object_spct(z) && sum(col.name %in% names(z)) >= 2) ||
+ (photobiology::is.filter_spct(z) && any(c("Tfr", "Afr", "A")) %in% names(z)) ||
+ (photobiology::is.reflector_spct(z) && "Rfr" %in% names(z))) {
autoplot(object = z,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = norm,
plot.qty = plot.qty,
pc.out = pc.out,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
facets = facets,
object.label = object.label,
na.rm = na.rm,
...)
- } else if (is.filter_spct(z) && !any(col.name %in% names(z))) {
- z <- as.generic_spct(z)
+ } else if (photobiology::is.filter_spct(z) && !any(col.name %in% names(z))) {
+ z <- photobiology::as.generic_spct(z)
autoplot(object = z,
y.name = paste(col.name[plot.qty], plot.data, sep = "."),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = norm,
pc.out = pc.out,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
facets = facets,
object.label = object.label,
na.rm = na.rm,
...)
- } else if (is.reflector_spct(z) && !"Rfr" %in% names(z)) {
- z <- as.generic_spct(z)
+ } else if (photobiology::is.reflector_spct(z) && !"Rfr" %in% names(z)) {
+ z <- photobiology::as.generic_spct(z)
autoplot(object = z,
y.name = paste("Rfr", plot.data, sep = "."),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = norm,
pc.out = pc.out,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
facets = facets,
object.label = object.label,
na.rm = na.rm,
diff --git a/R/autoplot-generic-spct.R b/R/autoplot-generic-spct.R
index 94f27094..aa73d39b 100644
--- a/R/autoplot-generic-spct.R
+++ b/R/autoplot-generic-spct.R
@@ -203,6 +203,7 @@ generic_plot <- function(spct,
#'
#' sun.generic_spct <- as.generic_spct(sun.spct)
#' autoplot(sun.generic_spct, y.name = "s.q.irrad")
+#' autoplot(sun.generic_spct, y.name = "s.e.irrad")
#' autoplot(sun.generic_spct, y.name = "s.q.irrad",
#' annotations = "")
#' autoplot(sun.generic_spct, y.name = "s.q.irrad",
@@ -227,6 +228,7 @@ autoplot.generic_spct <-
w.band = getOption("photobiology.plot.bands",
default = list(UVC(), UVB(), UVA(), PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
+ norm = NA,
label.qty = "none",
span = NULL,
wls.target = "HM",
@@ -241,6 +243,8 @@ autoplot.generic_spct <-
na.rm = TRUE) {
force(object.label)
+ warn_norm_arg(norm)
+ check_idfactor_arg(object, idfactor = idfactor)
annotations.default <-
getOption("photobiology.plot.annotations",
@@ -285,6 +289,6 @@ autoplot.generic_spct <-
#' @export
#'
autoplot.generic_mspct <- function(object, ...) {
- warning("No specialized 'autoplot()' method exist for objects of class generic_mspct.")
+ warning("No specialized 'autoplot()' method exists for objects of class generic_mspct.")
ggplot()
}
diff --git a/R/autoplot-raw-spct.r b/R/autoplot-raw-spct.r
index 0ab5a5fd..1e20bf08 100644
--- a/R/autoplot-raw-spct.r
+++ b/R/autoplot-raw-spct.r
@@ -54,14 +54,13 @@ raw_plot <- function(spct,
wls.target,
annotations,
geom,
- relative,
text.size,
idfactor,
facets,
ylim,
na.rm) {
if (!is.raw_spct(spct)) {
- stop("raw_plot() can only plot response_spct objects.")
+ stop("raw_plot() can only plot 'raw_spct' objects.")
}
if (!is.null(geom) && !geom %in% c("area", "line", "spct")) {
warning("'geom = ", geom, "' not supported, using default instead.")
@@ -281,10 +280,12 @@ raw_plot <- function(spct,
#' @family autoplot methods
#'
autoplot.raw_spct <-
- function(object, ...,
+ function(object,
+ ...,
w.band = getOption("photobiology.plot.bands",
default = list(UVC(), UVB(), UVA(), PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
+ norm = NA,
unit.out = "counts",
pc.out = getOption("ggspectra.pc.out", default = FALSE),
label.qty = "mean",
@@ -294,7 +295,6 @@ autoplot.raw_spct <-
geom = "line",
time.format = "",
tz = "UTC",
- norm = "skip",
text.size = 2.5,
idfactor = NULL,
facets = FALSE,
@@ -303,19 +303,16 @@ autoplot.raw_spct <-
object.label = deparse(substitute(object)),
na.rm = TRUE) {
- if (is.null(idfactor)) {
- idfactor <- getIdFactor(object)
- }
- if (is.na(idfactor) || !is.character(idfactor)) {
- idfactor <- getMultipleWl(object) > 1L
- }
+ force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor)
+ object <- rename_idfactor(object, idfactor)
- if (plot.data != "as.is") {
+ if (photobiology::getMultipleWl(object) > 1L && plot.data != "as.is") {
return(
autoplot(object = subset2mspct(object),
w.band = w.band,
range = range,
- norm = norm,
unit.out = unit.out,
pc.out = pc.out,
label.qty = label.qty,
@@ -336,23 +333,13 @@ autoplot.raw_spct <-
)
}
- force(object.label)
-
annotations.default <-
getOption("photobiology.plot.annotations",
default = c("boxes", "labels", "colour.guide",
"peaks", "boundaries"))
annotations <- decode_annotations(annotations,
annotations.default)
- # avoid warning in 'photobiology' (== 0.10.10)
- if (is.character(norm) && norm == "update" && !is_normalized(object)) {
- norm <- "skip"
- }
- # normalization skipping is handled by normalize()
- object <- photobiology::normalize(x = object,
- range = range,
- norm = norm,
- na.rm = na.rm)
+
if (length(w.band) == 0) {
if (is.null(range)) {
w.band <- waveband(object)
@@ -392,8 +379,7 @@ autoplot.raw_mspct <-
function(object,
...,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.norm",
- default = "skip"),
+ norm = NA,
unit.out = "counts",
pc.out = getOption("ggspectra.pc.out", default = FALSE),
idfactor = TRUE,
@@ -403,8 +389,9 @@ autoplot.raw_mspct <-
na.rm = TRUE) {
force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor = idfactor, default = TRUE)
- idfactor <- validate_idfactor(idfactor = idfactor)
# We trim the spectra to avoid unnecesary computaions later
if (!is.null(range)) {
object <- photobiology::trim_wl(object,
@@ -412,15 +399,6 @@ autoplot.raw_mspct <-
use.hinges = TRUE,
fill = NULL)
}
- # We apply the normalization to the collection if it is to be bound
- # otherwise normalization is applied to the "parallel-summary" spectrum
- if (plot.data == "as.is") {
- object <- photobiology::normalize(object,
- range = getOption("ggspectra.wlrange", default = NULL),
- norm = norm,
- na.rm = na.rm)
- norm <- "skip"
- }
# we convert the collection of spectra into a single spectrum object
# containing a summary spectrum or multiple spectra in long form.
z <- switch(plot.data,
@@ -439,7 +417,7 @@ autoplot.raw_mspct <-
norm = norm,
unit.out = unit.out,
pc.out = pc.out,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
facets = facets,
object.label = object.label,
na.rm = na.rm,
@@ -451,7 +429,7 @@ autoplot.raw_mspct <-
range = getOption("ggspectra.wlrange", default = NULL),
norm = norm,
pc.out = pc.out,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
facets = facets,
object.label = object.label,
na.rm = na.rm,
diff --git a/R/autoplot-response-spct.r b/R/autoplot-response-spct.r
index b588b162..7d3e6172 100644
--- a/R/autoplot-response-spct.r
+++ b/R/autoplot-response-spct.r
@@ -56,7 +56,7 @@ e_rsp_plot <- function(spct,
facets,
ylim,
na.rm) {
- if (!is.response_spct(spct)) {
+ if (!photobiology::is.response_spct(spct)) {
stop("e_Rsp_plot() can only plot response_spct objects.")
}
spct[["s.q.response"]] <- NULL
@@ -68,15 +68,15 @@ e_rsp_plot <- function(spct,
ylim <- rep(NA_real_, 2L)
}
if (!is.null(range)) {
- spct <- trim_wl(spct, range = range)
+ spct <- photobiology::trim_wl(spct, range = range)
}
if (!is.null(w.band)) {
- w.band <- trim_wl(w.band, range = range(spct))
+ w.band <- photobiology::trim_wl(w.band, range = photobiology::wl_range(spct))
}
exposure.label <- NA
- if (is_scaled(spct)) {
+ if (photobiology::is_scaled(spct)) {
if (pc.out) {
warning("Percent scale supported only for normalized cps_spct objects.")
pc.out <- FALSE
@@ -84,7 +84,7 @@ e_rsp_plot <- function(spct,
s.rsp.label <- expression(Spectral~~energy~~response~~k %*% R[E~lambda]~~("rel."))
rsp.label.total <- "atop(k %*% R[E], (\"rel.\"))"
rsp.label.avg <- "atop(bar(k %*% R[E~lambda]), (\"rel.\"))"
- } else if (is_normalized(spct)) {
+ } else if (photobiology::is_normalized(spct)) {
if (!pc.out) {
multiplier.label <- "rel."
} else {
@@ -101,31 +101,31 @@ e_rsp_plot <- function(spct,
warning("Percent scale supported only for normalized cps_spct objects.")
pc.out <- FALSE
}
- time.unit <- getTimeUnit(spct)
+ time.unit <- photobiology::getTimeUnit(spct)
if (!length(time.unit)) {
time.unit <- "unkonwn"
}
time.unit.char <- duration2character(time.unit)
- if (time.unit.char=="second") {
+ if (time.unit.char == "second") {
s.rsp.label <- expression(Spectral~~energy~~response~~R[E~lambda]~~(resp.~~unit~~s^{-1}~nm^{-1}))
rsp.label.total <- "atop(R[E], (resp.~~unit~~s^{-1}))"
rsp.label.avg <- "atop(bar(R[E~lambda]), (resp.~~unit~~s^{-1}~nm^{-1}))"
- } else if (time.unit.char=="day") {
+ } else if (time.unit.char == "day") {
s.rsp.label <- expression(Spectral~~energy~~response~~R[E~lambda]~~(resp.~~unit~~d^{-1}~nm^{-1}))
rsp.label.total <- "atop(R[E], (resp.~~unit~~d^{-1}))"
rsp.label.avg <- "atop(bar(R[E~lambda]), (resp.~~unit~~d^{-1}~nm^{-1}))"
- } else if (time.unit.char=="hour") {
+ } else if (time.unit.char == "hour") {
s.rsp.label <- expression(Spectral~~energy~~response~~R[E~lambda]~~(resp.~~unit~~h^{-1}~nm^{-1}))
rsp.label.total <- "atop(R[E], (resp.~~unit~~h^{-1}))"
rsp.label.avg <- "atop(bar(R[E~lambda]), (resp.~~unit~~h^{-1}~nm^{-1}))"
- } else if (time.unit.char=="duration") {
+ } else if (time.unit.char == "duration") {
s.rsp.label <- expression(Spectral~~energy~~response~~R[E~lambda]~~(resp.~~unit~nm^{-1}))
rsp.label.total <- "atop(R[E], (resp.~~unit))"
rsp.label.avg <- "atop(bar(R[E~lambda]), (resp.~~unit~nm^{-1}))"
exposure.label <- paste("Length of time:",
ifelse(lubridate::is.duration(time.unit),
as.character(time.unit), "unknown"))
- } else if (time.unit.char=="exposure") {
+ } else if (time.unit.char == "exposure") {
s.rsp.label <- expression(Spectral~~energy~~response~~R[E~lambda]~~(resp.~~unit~nm^{-1}))
rsp.label.total <- "atop(R[E], (resp.~~unit))"
rsp.label.avg <- "atop(bar(R[E~lambda]), (resp.~~unit~nm^{-1}))"
@@ -139,8 +139,8 @@ e_rsp_plot <- function(spct,
if (!is.na(ylim[1])) {
y.min <- ylim[1]
spct[["s.e.response"]] <- ifelse(spct[["s.e.response"]] < y.min,
- NA_real_,
- spct[["s.e.response"]])
+ NA_real_,
+ spct[["s.e.response"]])
} else {
y.min <- min(spct[["s.e.response"]], 0, na.rm = TRUE)
}
@@ -148,8 +148,8 @@ e_rsp_plot <- function(spct,
if (!is.na(ylim[2])) {
y.max <- ylim[2]
spct[["s.e.response"]] <- ifelse(spct[["s.e.response"]] > y.max,
- NA_real_,
- spct[["s.e.response"]])
+ NA_real_,
+ spct[["s.e.response"]])
} else {
y.max <- max(spct[["s.e.response"]], y.min, 0, na.rm = TRUE)
}
@@ -170,7 +170,8 @@ e_rsp_plot <- function(spct,
rsp.label <- ""
}
- plot <- ggplot(spct, aes(x = .data[["w.length"]], y = .data[["s.e.response"]]))
+ plot <- ggplot2::ggplot(spct, aes(x = .data[["w.length"]],
+ y = .data[["s.e.response"]]))
temp <- find_idfactor(spct = spct,
idfactor = idfactor,
facets = facets,
@@ -181,26 +182,28 @@ e_rsp_plot <- function(spct,
# We want data plotted on top of the boundary lines
# Negative response is valid!
if ("boundaries" %in% annotations) {
- plot <- plot + geom_hline(yintercept = 0, linetype = "dashed", colour = "black")
+ plot <- plot +
+ ggplot2::geom_hline(yintercept = 0, linetype = "dashed", colour = "black")
}
if (!is.null(geom) && geom %in% c("area", "spct")) {
plot <- plot + geom_spct(fill = "black", colour = NA, alpha = 0.2)
}
- plot <- plot + geom_line(na.rm = na.rm)
+ plot <- plot + ggplot2::geom_line(na.rm = na.rm)
plot <- plot + labs(x = expression("Wavelength, "*lambda~(nm)), y = s.rsp.label)
if (length(annotations) == 1 && annotations == "") {
return(plot)
}
- plot <- plot + scale_fill_identity() + scale_color_identity()
+ plot <- plot +
+ ggplot2::scale_fill_identity() + ggplot2::scale_color_identity()
plot <- plot + decoration(w.band = w.band,
y.max = y.max,
y.min = y.min,
- x.max = max(spct),
- x.min = min(spct),
+ x.max = photobiology::wl_max(spct),
+ x.min = photobiology::wl_min(spct),
annotations = annotations,
label.qty = label.qty,
span = span,
@@ -210,33 +213,37 @@ e_rsp_plot <- function(spct,
na.rm = TRUE)
if (!is.na(exposure.label)) {
- plot <- plot + annotate("text",
- x = min(spct),
- y = y.max,
- label = exposure.label,
- vjust = -0.5,
- hjust = 0,
- size = rel(3),
- na.rm = TRUE )
+ plot <- plot + ggplot2::annotate("text",
+ x = photobiology::wl_min(spct),
+ y = y.max,
+ label = exposure.label,
+ vjust = -0.5,
+ hjust = 0,
+ size = rel(3),
+ na.rm = TRUE )
}
if (!is.null(annotations) &&
length(intersect(c("boxes", "segments", "labels", "summaries",
"colour.guide", "reserve.space"), annotations)) > 0L) {
y.limits <- c(y.min, y.min + (y.max - y.min) * 1.25)
- x.limits <- c(min(spct) - wl_expanse(spct) * 0.025, NA) # NA needed because of rounding errors
+ x.limits <-
+ c(min(spct) - photobiology::wl_expanse(spct) * 0.025, NA) # NA needed because of rounding errors
} else {
y.limits <- c(y.min, y.max)
- x.limits <- range(spct)
+ x.limits <- photobiology::wl_range(spct)
}
if (abs(y.min) < 5e-2 && (abs(y.max - 1) < 5.e-2)) {
plot <- plot +
- scale_y_continuous(breaks = c(0, 0.25, 0.5, 0.75, 1), limits = y.limits)
+ ggplot2::scale_y_continuous(breaks = c(0, 0.25, 0.5, 0.75, 1),
+ limits = y.limits)
} else {
- plot <- plot + scale_y_continuous(limits = y.limits)
+ plot <- plot + ggplot2::scale_y_continuous(limits = y.limits)
}
- plot + scale_x_continuous(limits = x.limits, breaks = scales::pretty_breaks(n = 7))
+ plot +
+ ggplot2::scale_x_continuous(limits = x.limits,
+ breaks = scales::pretty_breaks(n = 7))
}
#' Create a complete ggplot for response spectra.
@@ -297,7 +304,7 @@ q_rsp_plot <- function(spct,
facets,
ylim,
na.rm) {
- if (!is.response_spct(spct)) {
+ if (!photobiology::is.response_spct(spct)) {
stop("q_Rsp_plot() can only plot response_spct objects.")
}
spct[["s.e.response"]] <- NULL
@@ -309,15 +316,16 @@ q_rsp_plot <- function(spct,
ylim <- rep(NA_real_, 2L)
}
if (!is.null(range)) {
- spct <- trim_wl(spct, range = range)
+ spct <- photobiology::trim_wl(spct, range = range)
}
if (!is.null(w.band)) {
- w.band <- trim_wl(w.band, range = range(spct))
+ w.band <- photobiology::trim_wl(w.band,
+ range = photobiology::wl_range(spct))
}
exposure.label <- NA
- if (is_scaled(spct)) {
+ if (photobiology::is_scaled(spct)) {
if (pc.out) {
warning("Percent scale supported only for normalized response_spct objects.")
pc.out <- FALSE
@@ -325,7 +333,7 @@ q_rsp_plot <- function(spct,
s.rsp.label <- expression(Spectral~~photon~~response~~k %*% R[Q~lambda]~~("rel."))
rsp.label.total <- "atop(k %*% R[Q], (\"rel.\"))"
rsp.label.avg <- "atop(bar(k %*% R[Q~lambda]), (\"rel.\"))"
- } else if (is_normalized(spct)) {
+ } else if (photobiology::is_normalized(spct)) {
if (!pc.out) {
multiplier.label <- "rel."
} else {
@@ -342,31 +350,31 @@ q_rsp_plot <- function(spct,
warning("Percent scale supported only for normalized cps_spct objects.")
pc.out <- FALSE
}
- time.unit <- getTimeUnit(spct)
+ time.unit <- photobiology::getTimeUnit(spct)
if (!length(time.unit)) {
time.unit <- "unkonwn"
}
time.unit.char <- duration2character(time.unit)
- if (time.unit.char=="second") {
+ if (time.unit.char == "second") {
s.rsp.label <- expression(Spectral~~photon~~response~~R[Q~lambda]~~(resp.~~unit~~s^{-1}~nm^{-1}))
rsp.label.total <- "atop(R[Q], (resp.~~unit~~s^{-1}))"
rsp.label.avg <- "atop(bar(R[Q~lambda]), (resp.~~unit~~s^{-1}~nm^{-1}))"
- } else if (time.unit.char=="day") {
+ } else if (time.unit.char == "day") {
s.rsp.label <- expression(Spectral~~photon~~response~~R[Q~lambda]~~(resp.~~unit~~d^{-1}~nm^{-1}))
rsp.label.total <- "atop(R[Q], (resp.~~unit~~d^{-1}))"
rsp.label.avg <- "atop(bar(R[Q~lambda]), (resp.~~unit~~d^{-1}~nm^{-1}))"
- } else if (time.unit.char=="hour") {
+ } else if (time.unit.char == "hour") {
s.rsp.label <- expression(Spectral~~photon~~response~~R[Q~lambda]~~(resp.~~unit~~h^{-1}~nm^{-1}))
rsp.label.total <- "atop(R[Q], (resp.~~unit~~h^{-1}))"
rsp.label.avg <- "atop(bar(R[Q~lambda]), (resp.~~unit~~h^{-1}~nm^{-1}))"
- } else if (time.unit.char=="duration") {
+ } else if (time.unit.char == "duration") {
s.rsp.label <- expression(Spectral~~photon~~response~~R[Q~lambda]~~(resp.~~unit~nm^{-1}))
rsp.label.total <- "atop(R[Q], (resp.~~unit))"
rsp.label.avg <- "atop(bar(R[Q~lambda]), (resp.~~unit~nm^{-1}))"
exposure.label <- paste("Length of time:",
ifelse(lubridate::is.duration(time.unit),
as.character(time.unit), "unknown"))
- } else if (time.unit.char=="exposure") {
+ } else if (time.unit.char == "exposure") {
s.rsp.label <- expression(Spectral~~photon~~response~~R[Q~lambda]~~(resp.~~unit~nm^{-1}))
rsp.label.total <- "atop(R[Q], (resp.~~unit))"
rsp.label.avg <- "atop(bar(R[Q~lambda]), (resp.~~unit~nm^{-1}))"
@@ -411,7 +419,8 @@ q_rsp_plot <- function(spct,
rsp.label <- ""
}
- plot <- ggplot(spct, aes(x = .data[["w.length"]], y = .data[["s.q.response"]]))
+ plot <- ggplot2::ggplot(spct, aes(x = .data[["w.length"]],
+ y = .data[["s.q.response"]]))
temp <- find_idfactor(spct = spct,
idfactor = idfactor,
facets = facets,
@@ -422,26 +431,29 @@ q_rsp_plot <- function(spct,
# We want data plotted on top of the boundary lines
# Negative response is valid!
if ("boundaries" %in% annotations) {
- plot <- plot + geom_hline(yintercept = 0, linetype = "dashed", colour = "black")
+ plot <- plot +
+ ggplot2::geom_hline(yintercept = 0, linetype = "dashed", colour = "black")
}
if (!is.null(geom) && geom %in% c("area", "spct")) {
plot <- plot + geom_spct(fill = "black", colour = NA, alpha = 0.2)
}
- plot <- plot + geom_line(na.rm = na.rm)
- plot <- plot + labs(x = expression("Wavelength, "*lambda~(nm)), y = s.rsp.label)
+ plot <- plot + ggplot2::geom_line(na.rm = na.rm)
+ plot <- plot + ggplot2::labs(x = expression("Wavelength, "*lambda~(nm)),
+ y = s.rsp.label)
if (length(annotations) == 1 && annotations == "") {
return(plot)
}
- plot <- plot + scale_fill_identity() + scale_color_identity()
+ plot <- plot +
+ ggplot2::scale_fill_identity() + ggplot2::scale_color_identity()
plot <- plot + decoration(w.band = w.band,
y.max = y.max,
y.min = y.min,
- x.max = max(spct),
- x.min = min(spct),
+ x.max = photobiology::wl_max(spct),
+ x.min = photobiology::wl_min(spct),
annotations = annotations,
label.qty = label.qty,
span = span,
@@ -452,12 +464,12 @@ q_rsp_plot <- function(spct,
if (!is.na(exposure.label)) {
plot <- plot + annotate("text",
- x = min(spct),
+ x = photobiology::wl_min(spct),
y = y.max,
label = exposure.label,
vjust = -0.5,
hjust = 0,
- size = rel(3),
+ size = ggplot2::rel(3),
na.rm = TRUE )
}
@@ -471,23 +483,26 @@ q_rsp_plot <- function(spct,
length(intersect(c("boxes", "segments", "labels", "summaries",
"colour.guide", "reserve.space"), annotations)) > 0L) {
y.limits <- c(y.min, y.min + (y.max - y.min) * 1.25)
- x.limits <- c(min(spct) - wl_expanse(spct) * 0.025, NA) # NA needed because of rounding errors
+ x.limits <-
+ c(photobiology::wl_min(spct) - photobiology::wl_expanse(spct) * 0.025, NA) # NA needed because of rounding errors
} else {
y.limits <- c(y.min, y.max)
- x.limits <- range(spct)
+ x.limits <- photobiology::wl_range(spct)
}
if (pc.out) {
plot <- plot +
- scale_y_continuous(labels = scales::percent,
+ ggplot2::scale_y_continuous(labels = scales::percent,
breaks = y.breaks,
limits = y.limits)
} else {
plot <-
- plot + scale_y_continuous(breaks = y.breaks,
+ plot + ggplot2::scale_y_continuous(breaks = y.breaks,
limits = y.limits)
}
- plot + scale_x_continuous(limits = x.limits, breaks = scales::pretty_breaks(n = 7))
+ plot +
+ ggplot2::scale_x_continuous(limits = x.limits,
+ breaks = scales::pretty_breaks(n = 7))
}
#' Plot one or more response spectra.
@@ -517,25 +532,28 @@ q_rsp_plot <- function(spct,
#' autoplot(photodiode.spct, geom = "spct")
#' autoplot(photodiode.spct, unit.out = "photon")
#' autoplot(photodiode.spct, annotations = "")
-#' autoplot(photodiode.spct, norm = "skip")
-#' autoplot(photodiode.spct, norm = 400)
#'
#' two_sensors.mspct <-
#' response_mspct(list("Photodiode" = photodiode.spct,
-#' "Coupled charge device" = ccd.spct))
-#' autoplot(two_sensors.mspct, normalize = TRUE, unit.out = "photon")
-#' autoplot(two_sensors.mspct, normalize = TRUE, idfactor = "Spectra")
-#' autoplot(two_sensors.mspct, normalize = TRUE, facets = 2)
-#' autoplot(two_sensors.mspct, normalize = TRUE, geom = "spct")
+#' "Coupled charge device" = ccd.spct)) |>
+#' normalize()
+#'
+#' autoplot(two_sensors.mspct, unit.out = "photon")
+#' autoplot(two_sensors.mspct, idfactor = "Spectra")
+#' autoplot(two_sensors.mspct, facets = 2)
+#' autoplot(two_sensors.mspct, geom = "spct")
#'
#' @family autoplot methods
#'
autoplot.response_spct <-
function(object, ...,
w.band = getOption("photobiology.plot.bands",
- default = list(UVC(), UVB(), UVA(), PhR())),
+ default = list(photobiologyWavebands::UVC(),
+ photobiologyWavebands::UVB(),
+ photobiologyWavebands::UVA(),
+ photobiologyWavebands::PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.norm", default = "update"),
+ norm = NA,
unit.out = getOption("photobiology.radiation.unit",
default = "energy"),
pc.out = getOption("ggspectra.pc.out", default = FALSE),
@@ -554,13 +572,18 @@ autoplot.response_spct <-
object.label = deparse(substitute(object)),
na.rm = TRUE) {
- if (getMultipleWl(object) > 1L && plot.data != "as.is") {
+ force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor)
+ object <- rename_idfactor(object, idfactor)
+
+ if (photobiology::getMultipleWl(object) > 1L
+ && plot.data != "as.is") {
return(
- autoplot(object = subset2mspct(object),
+ autoplot(object = photobiology::subset2mspct(object),
w.band = w.band,
range = range,
norm = norm,
- unit.out = unit.out,
pc.out = pc.out,
label.qty = label.qty,
span = span,
@@ -580,20 +603,17 @@ autoplot.response_spct <-
)
}
- force(object.label)
- force(norm)
-
annotations.default <-
getOption("photobiology.plot.annotations",
default = c("boxes", "labels", "summaries", "colour.guide", "peaks"))
annotations <- decode_annotations(annotations,
annotations.default)
- # normalization updated and base of expression changed in one go
- object <- photobiology::normalize(x = object,
- range = range,
- norm = norm,
- unit.out = unit.out,
- na.rm = na.rm)
+
+ # Change units if needed, and update normalization
+ object <- switch(unit.out,
+ photon = photobiology::e2q(object, action = "replace"),
+ energy = photobiology::q2e(object, action = "replace"))
+
if (is.null(label.qty)) {
if (photobiology::is_normalized(object) ||
photobiology::is_scaled(object)) {
@@ -612,7 +632,7 @@ autoplot.response_spct <-
w.band <- photobiology::waveband(range, wb.name = "Total")
}
}
- if (is.waveband(w.band)) {
+ if (photobiology::is.waveband(w.band)) {
w.band <- list(w.band)
}
labels <- sapply(w.band, labels)[1, ]
@@ -674,8 +694,7 @@ autoplot.response_mspct <-
function(object,
...,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.norm",
- default = "update"),
+ norm = NA,
unit.out = getOption("photobiology.radiation.unit", default="energy"),
pc.out = getOption("ggspectra.pc.out", default = FALSE),
plot.data = "as.is",
@@ -685,8 +704,9 @@ autoplot.response_mspct <-
na.rm = TRUE) {
force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor = idfactor, default = TRUE)
- idfactor <- validate_idfactor(idfactor = idfactor)
# We trim the spectra to avoid unnecessary computations later
if (!is.null(range)) {
object <- photobiology::trim_wl(object,
@@ -694,19 +714,11 @@ autoplot.response_mspct <-
use.hinges = TRUE,
fill = NULL)
}
- # We apply the normalization to the collection if it is to be bound
- # otherwise normalization is applied to the "parallel-summary" spectrum
- if (plot.data == "as.is") {
- object <- photobiology::normalize(object,
- norm = norm,
- unit.out = unit.out,
- na.rm = na.rm)
- norm <- "skip"
- }
+
# we ensure the units are correct
object <- switch(unit.out,
- photon = e2q(object, action = "replace"),
- energy = q2e(object, action = "replace"))
+ photon = photobiology::e2q(object, action = "replace"),
+ energy = photobiology::q2e(object, action = "replace"))
# we convert the collection of spectra into a single spectrum object
# containing a summary spectrum or multiple spectra in long form.
z <- switch(plot.data,
@@ -720,26 +732,26 @@ autoplot.response_mspct <-
se = photobiology::s_se(object)
)
col.name <- c(photon = "s.q.response", energy = "s.e.response")
- if (is.response_spct(z) && any(col.name %in% names(z))) {
+ if (photobiology::is.response_spct(z) && any(col.name %in% names(z))) {
autoplot(object = z,
range = NULL,
norm = norm,
unit.out = unit.out,
pc.out = pc.out,
facets = facets,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
object.label = object.label,
na.rm = na.rm,
...)
} else {
- z <- as.generic_spct(z)
+ z <- photobiology::as.generic_spct(z)
autoplot(object = z,
y.name = paste(col.name[unit.out], plot.data, sep = "."),
range = NULL,
norm = norm,
pc.out = pc.out,
facets = facets,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
object.label = object.label,
na.rm = na.rm,
...)
diff --git a/R/autoplot-source-spct.r b/R/autoplot-source-spct.r
index 0a2f65b0..c6a67862 100644
--- a/R/autoplot-source-spct.r
+++ b/R/autoplot-source-spct.r
@@ -61,7 +61,7 @@ e_plot <- function(spct,
facets,
ylim,
na.rm) {
- if (!is.source_spct(spct)) {
+ if (!photobiology::is.source_spct(spct)) {
stop("e_plot() can only plot source_spct objects.")
}
spct[["s.q.irrad"]] <- NULL
@@ -73,13 +73,13 @@ e_plot <- function(spct,
ylim <- rep(NA_real_, 2L)
}
if (!is.null(range)) {
- spct <- trim_wl(spct, range = range)
+ spct <- photobiology::trim_wl(spct, range = range)
}
if (!is.null(w.band)) {
- w.band <- trim_wl(w.band, range = range(spct))
+ w.band <- photobiology::trim_wl(w.band, range = range(spct))
}
duration.label <- NA
- if (is_scaled(spct)) {
+ if (photobiology::is_scaled(spct)) {
if (pc.out) {
warning("Percent scale supported only for normalized source_spct objects.")
pc.out <- FALSE
@@ -88,13 +88,13 @@ e_plot <- function(spct,
irrad.label.total <- "atop(k %*% E, (\"rel.\"))"
irrad.label.avg <- "atop(bar(E[lambda]), (\"rel.\"))"
scale.factor <- 1
- } else if (is_normalized(spct)) {
+ } else if (photobiology::is_normalized(spct)) {
if (!pc.out) {
multiplier.label <- "rel."
} else {
multiplier.label <- "%"
}
- norm <- round(getNormalization(spct)[["norm.wl"]], digits = 1)
+ norm <- round(photobiology::getNormalization(spct)[["norm.wl"]], digits = 1)
s.irrad.label <- bquote(Spectral~~energy~~irradiance~~E[lambda]/E[lambda==.(norm)]~~(.(multiplier.label)))
irrad.label.total <- "atop(E, (\"rel.\"))"
irrad.label.avg <- bquote(atop(bar(E[lambda]), E[lambda==.(norm)]))
@@ -104,7 +104,7 @@ e_plot <- function(spct,
warning("Percent scale supported only for normalized source_spct objects.")
pc.out <- FALSE
}
- time.unit <- getTimeUnit(spct)
+ time.unit <- photobiology::getTimeUnit(spct)
if (!length(time.unit)) {
time.unit <- "unkonwn"
}
@@ -159,7 +159,7 @@ e_plot <- function(spct,
} else {
irrad.label <- ""
}
- if (is_effective(spct)) {
+ if (photobiology::is_effective(spct)) {
s.irrad.label <- sub("E[lambda]", "E[lambda]^{eff}", s.irrad.label, fixed = TRUE)
irrad.label <- sub("E", "E^{eff}", irrad.label, fixed = TRUE)
irrad.label.total <- sub("E", "E^{eff}", irrad.label.total, fixed = TRUE)
@@ -186,7 +186,9 @@ e_plot <- function(spct,
y.max <- max(spct[["s.e.irrad"]], y.min, 0, na.rm = TRUE)
}
- plot <- ggplot(spct, aes(x = .data[["w.length"]], y = .data[["s.e.irrad"]]))
+ plot <- ggplot2::ggplot(spct,
+ ggplot2::aes(x = .data[["w.length"]],
+ y = .data[["s.e.irrad"]]))
temp <- find_idfactor(spct = spct,
idfactor = idfactor,
facets = facets,
@@ -197,23 +199,25 @@ e_plot <- function(spct,
# We want data plotted on top of the boundary lines
if ("boundaries" %in% annotations) {
if (y.min < (-0.01 * y.max)) {
- plot <- plot + geom_hline(yintercept = 0, linetype = "dashed", colour = "red")
+ plot <- plot +
+ ggplot2::geom_hline(yintercept = 0, linetype = "dashed", colour = "red")
} else {
- plot <- plot + geom_hline(yintercept = 0, linetype = "dashed", colour = "black")
+ plot <- plot +
+ ggplot2::geom_hline(yintercept = 0, linetype = "dashed", colour = "black")
}
}
if (!is.null(geom) && geom %in% c("area", "spct")) {
plot <- plot + geom_spct(fill = "black", colour = NA, alpha = 0.2)
}
- plot <- plot + geom_line(na.rm = na.rm)
- plot <- plot + labs(x = expression("Wavelength, "*lambda~(nm)), y = s.irrad.label)
+ plot <- plot + ggplot2::geom_line(na.rm = na.rm)
+ plot <- plot + ggplot2::labs(x = expression("Wavelength, "*lambda~(nm)), y = s.irrad.label)
if (length(annotations) == 1 && annotations == "") {
return(plot)
}
- plot <- plot + scale_fill_identity() + scale_color_identity()
+ plot <- plot + ggplot2::scale_fill_identity() + ggplot2::scale_color_identity()
if (label.qty == "total") {
label.qty <- "irrad"
@@ -223,7 +227,7 @@ e_plot <- function(spct,
plot <- plot + decoration(w.band = w.band,
unit.out = "energy",
- time.unit = getTimeUnit(spct),
+ time.unit = photobiology::getTimeUnit(spct),
y.max = y.max,
y.min = y.min,
x.max = max(spct),
@@ -237,24 +241,26 @@ e_plot <- function(spct,
chroma.type = chroma.type,
na.rm = TRUE)
- if (is_effective(spct)) {
- plot <- plot + annotate("text",
- x = midpoint(spct),
- y = y.max,
- label = paste("BSWF:", getBSWFUsed(spct)),
- vjust = -0.5, size = rel(3),
- na.rm = TRUE)
+ if (photobiology::is_effective(spct)) {
+ plot <- plot +
+ ggplot2::annotate("text",
+ x = photobiology::midpoint(spct),
+ y = y.max,
+ label = paste("BSWF:", photobiology::getBSWFUsed(spct)),
+ vjust = -0.5, size = ggplot2::rel(3),
+ na.rm = TRUE)
}
if (!is.na(duration.label)) {
- plot <- plot + annotate("text",
- x = min(spct),
- y = y.max,
- label = duration.label,
- vjust = -0.5,
- hjust = 0,
- size = rel(3),
- na.rm = TRUE)
+ plot <- plot +
+ ggplot2::annotate("text",
+ x = min(spct),
+ y = y.max,
+ label = duration.label,
+ vjust = -0.5,
+ hjust = 0,
+ size = ggplot2::rel(3),
+ na.rm = TRUE)
}
if (abs(y.max - 1) < 0.02 && abs(y.min) < 0.02) {
@@ -267,7 +273,7 @@ e_plot <- function(spct,
length(intersect(c("boxes", "segments", "labels", "summaries",
"colour.guide", "reserve.space"), annotations)) > 0L) {
y.limits <- c(y.min, y.min + (y.max - y.min) * 1.25)
- x.limits <- c(min(spct) - wl_expanse(spct) * 0.025, NA) # NA needed because of rounding errors
+ x.limits <- c(min(spct) - photobiology::wl_expanse(spct) * 0.025, NA) # NA needed because of rounding errors
} else {
y.limits <- c(y.min, y.max * 1.05)
x.limits <- range(spct)
@@ -275,15 +281,15 @@ e_plot <- function(spct,
if (pc.out) {
plot <- plot +
- scale_y_continuous(labels = scales::percent,
+ ggplot2::scale_y_continuous(labels = scales::percent,
breaks = y.breaks,
limits = y.limits)
} else {
plot <-
- plot + scale_y_continuous(breaks = y.breaks,
+ plot + ggplot2::scale_y_continuous(breaks = y.breaks,
limits = y.limits)
}
- plot + scale_x_continuous(limits = x.limits, breaks = scales::pretty_breaks(n = 7))
+ plot + ggplot2::scale_x_continuous(limits = x.limits, breaks = scales::pretty_breaks(n = 7))
}
#' Create a complete ggplot for light-source spectra.
@@ -349,7 +355,7 @@ q_plot <- function(spct,
facets,
ylim,
na.rm) {
- if (!is.source_spct(spct)) {
+ if (!photobiology::is.source_spct(spct)) {
stop("q_plot() can only plot source_spct objects.")
}
spct[["s.e.irrad"]] <- NULL
@@ -361,14 +367,14 @@ q_plot <- function(spct,
ylim <- rep(NA_real_, 2L)
}
if (!is.null(range)) {
- spct <- trim_wl(spct, range = range)
+ spct <- photobiology::trim_wl(spct, range = range)
}
if (!is.null(w.band)) {
- w.band <- trim_wl(w.band, range = range(spct))
+ w.band <- photobiology::trim_wl(w.band, range = range(spct))
}
duration.label <- NA
- if (is_scaled(spct)) {
+ if (photobiology::is_scaled(spct)) {
if (pc.out) {
warning("Percent scale supported only for normalized source_spct objects.")
pc.out <- FALSE
@@ -377,13 +383,13 @@ q_plot <- function(spct,
irrad.label.total <- "atop(k %*% Q, (\"rel.\"))"
irrad.label.avg <- "atop(bar(Q[lambda]), (\"rel.\"))"
scale.factor <- 1
- } else if (is_normalized(spct)) {
+ } else if (photobiology::is_normalized(spct)) {
if (!pc.out) {
multiplier.label <- "rel."
} else {
multiplier.label <- "%"
}
- norm <- round(getNormalization(spct)[["norm.wl"]], digits = 1)
+ norm <- round(photobiology::getNormalization(spct)[["norm.wl"]], digits = 1)
s.irrad.label <- bquote(Spectral~~photon~~exposure~~Q[lambda]/Q[lambda==.(norm)]~~(.(multiplier.label)))
irrad.label.total <- "atop(Q, (\"rel.\"))"
irrad.label.avg <- bquote(atop(bar(Q[lambda]), Q[lambda==.(norm)]))
@@ -393,7 +399,7 @@ q_plot <- function(spct,
warning("Percent scale supported only for normalized source_spct objects.")
pc.out <- FALSE
}
- time.unit <- getTimeUnit(spct)
+ time.unit <- photobiology::getTimeUnit(spct)
if (!length(time.unit)) {
time.unit <- "unkonwn"
}
@@ -448,7 +454,7 @@ q_plot <- function(spct,
} else {
irrad.label <- ""
}
- if (is_effective(spct)) {
+ if (photobiology::is_effective(spct)) {
s.irrad.label <- sub("Q[lambda]", "Q[lambda]^{eff}", s.irrad.label, fixed = TRUE)
irrad.label <- sub("Q", "Q^{eff}", irrad.label, fixed = TRUE)
irrad.label.total <- sub("Q", "Q^{eff}", irrad.label.total, fixed = TRUE)
@@ -475,7 +481,10 @@ q_plot <- function(spct,
y.max <- max(spct[["s.q.irrad"]], y.min, 0, na.rm = TRUE)
}
- plot <- ggplot(spct, aes(x = .data[["w.length"]], y = .data[["s.q.irrad"]]))
+ plot <-
+ ggplot2::ggplot(spct,
+ ggplot2::aes(x = .data[["w.length"]],
+ y = .data[["s.q.irrad"]]))
temp <- find_idfactor(spct = spct,
idfactor = idfactor,
facets = facets,
@@ -486,23 +495,27 @@ q_plot <- function(spct,
# We want data plotted on top of the boundary lines
if ("boundaries" %in% annotations) {
if (y.min < (-0.01 * y.max)) {
- plot <- plot + geom_hline(yintercept = 0, linetype = "dashed", colour = "red")
+ plot <- plot +
+ ggplot2::geom_hline(yintercept = 0, linetype = "dashed", colour = "red")
} else {
- plot <- plot + geom_hline(yintercept = 0, linetype = "dashed", colour = "black")
+ plot <- plot +
+ ggplot2::geom_hline(yintercept = 0, linetype = "dashed", colour = "black")
}
}
if (!is.null(geom) && geom %in% c("area", "spct")) {
plot <- plot + geom_spct(fill = "black", colour = NA, alpha = 0.2)
}
- plot <- plot + geom_line(na.rm = na.rm)
- plot <- plot + labs(x = expression("Wavelength, "*lambda~(nm)), y = s.irrad.label)
+ plot <- plot + ggplot2::geom_line(na.rm = na.rm)
+ plot <- plot +
+ ggplot2::labs(x = expression("Wavelength, "*lambda~(nm)), y = s.irrad.label)
if (length(annotations) == 1 && annotations == "") {
return(plot)
}
- plot <- plot + scale_fill_identity() + scale_color_identity()
+ plot <-
+ plot + ggplot2::scale_fill_identity() + ggplot2::scale_color_identity()
if (label.qty == "total") {
label.qty <- "irrad"
@@ -512,7 +525,7 @@ q_plot <- function(spct,
plot <- plot + decoration(w.band = w.band,
unit.out = "photon",
- time.unit = getTimeUnit(spct),
+ time.unit = photobiology::getTimeUnit(spct),
y.max = y.max,
y.min = y.min,
x.max = max(spct),
@@ -526,24 +539,24 @@ q_plot <- function(spct,
chroma.type = chroma.type,
na.rm = TRUE)
- if (is_effective(spct)) {
- plot <- plot + annotate("text",
- x = midpoint(spct),
- y = y.max,
- label = paste("BSWF:", getBSWFUsed(spct)),
- vjust = -0.5, size = rel(3),
- na.rm = TRUE)
+ if (photobiology::is_effective(spct)) {
+ plot <- plot + ggplot2::annotate("text",
+ x = photobiology::midpoint(spct),
+ y = y.max,
+ label = paste("BSWF:", photobiology::getBSWFUsed(spct)),
+ vjust = -0.5, size = ggplot2::rel(3),
+ na.rm = TRUE)
}
if (!is.na(duration.label)) {
- plot <- plot + annotate("text",
- x = min(spct),
- y = y.max,
- label = duration.label,
- vjust = -0.5,
- hjust = 0,
- size = rel(3),
- na.rm = TRUE)
+ plot <- plot + ggplot2::annotate("text",
+ x = min(spct),
+ y = y.max,
+ label = duration.label,
+ vjust = -0.5,
+ hjust = 0,
+ size = ggplot2::rel(3),
+ na.rm = TRUE)
}
if (abs(y.max - 1) < 0.02 && abs(y.min) < 0.02) {
@@ -556,7 +569,7 @@ q_plot <- function(spct,
length(intersect(c("boxes", "segments", "labels", "summaries",
"colour.guide", "reserve.space"), annotations)) > 0L) {
y.limits <- c(y.min, y.min + (y.max - y.min) * 1.25)
- x.limits <- c(min(spct) - wl_expanse(spct) * 0.025, NA) # NA needed because of rounding errors
+ x.limits <- c(min(spct) - photobiology::wl_expanse(spct) * 0.025, NA) # NA needed because of rounding errors
} else {
y.limits <- c(y.min, y.max * 1.05)
x.limits <- range(spct)
@@ -564,15 +577,16 @@ q_plot <- function(spct,
if (pc.out) {
plot <- plot +
- scale_y_continuous(labels = scales::percent,
- breaks = y.breaks,
- limits = y.limits)
+ ggplot2::scale_y_continuous(labels = scales::percent,
+ breaks = y.breaks,
+ limits = y.limits)
} else {
plot <-
- plot + scale_y_continuous(breaks = y.breaks,
- limits = y.limits)
+ plot + ggplot2::scale_y_continuous(breaks = y.breaks,
+ limits = y.limits)
}
- plot + scale_x_continuous(limits = x.limits, breaks = scales::pretty_breaks(n = 7))
+ plot + ggplot2::scale_x_continuous(limits = x.limits,
+ breaks = scales::pretty_breaks(n = 7))
}
#' Plot one or more light-source spectra.
@@ -589,11 +603,8 @@ q_plot <- function(spct,
#' @param w.band a single waveband object or a list of waveband objects.
#' @param range an R object on which \code{range()} returns a vector of length
#' 2, with minimum and maximum wavelengths (nm).
-#' @param norm numeric Normalization wavelength (nm) or character string
-#' \code{"max"}, or \code{"min"} for normalization at the corresponding
-#' wavelength, \code{"update"} to update the normalization after modifying
-#' units of expression, quantity or range but respecting the previously used
-#' criterion, or \code{"skip"} to force return of \code{object} unchanged.
+#' @param norm numeric No longer supported, normalization is always updated if
+#' present and a unit conversion applied.
#' @param unit.out character string indicating type of radiation units to use
#' for plotting: \code{"photon"} or its synonym \code{"quantum"}, or
#' \code{"energy"}.
@@ -673,16 +684,15 @@ q_plot <- function(spct,
#' autoplot(sun.spct)
#' autoplot(sun.spct, geom = "spct")
#' autoplot(sun.spct, unit.out = "photon")
-#' autoplot(sun.spct, norm = "max")
-#' autoplot(sun.spct, norm = "max", pc.out = TRUE)
+#' autoplot(normalize(sun.spct))
+#' autoplot(normalize(sun.spct), pc.out = TRUE)
#'
#' # multiple spectra in long form
#' autoplot(sun_evening.spct)
#' autoplot(sun_evening.spct, facets = 1) # one column
#' autoplot(sun_evening.spct, facets = 2) # two columns
#' autoplot(sun_evening.spct, plot.data = "mean")
-#' # needs 'photobiology' (> 0.11.2)
-#' # autoplot(sun_evening.spct, idfactor = "Sequence")
+#' autoplot(sun_evening.spct, idfactor = "Sequence")
#'
#' # multiple spectra as a collection
#' autoplot(sun_evening.mspct)
@@ -701,8 +711,7 @@ autoplot.source_spct <-
photobiologyWavebands::UVA(),
photobiologyWavebands::PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.norm",
- default = "update"),
+ norm = NA,
unit.out = getOption("photobiology.radiation.unit",
default = "energy"),
pc.out = getOption("ggspectra.pc.out", default = FALSE),
@@ -722,58 +731,49 @@ autoplot.source_spct <-
object.label = deparse(substitute(object)),
na.rm = TRUE) {
- if (is.null(idfactor)) {
- idfactor <- getIdFactor(object)
- }
- if (is.na(idfactor) || !is.character(idfactor)) {
- idfactor <- getMultipleWl(object) > 1L
- }
+ force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor)
+ object <- rename_idfactor(object, idfactor)
- if (plot.data != "as.is") {
+ if (photobiology::getMultipleWl(object) > 1L && plot.data != "as.is") {
return(
- autoplot(object = subset2mspct(object),
- w.band = w.band,
- range = range,
- norm = norm,
- unit.out = unit.out,
- pc.out = pc.out,
- label.qty = label.qty,
- span = span,
- wls.target = wls.target,
- annotations = annotations,
- geom = geom,
- time.format = time.format,
- tz = tz,
- text.size = text.size,
- chroma.type = chroma.type,
- idfactor = idfactor,
- facets = facets,
- plot.data = plot.data,
- ylim = ylim,
- object.label = object.label,
- na.rm = na.rm)
+ ggplot2::autoplot(object = photobiology::subset2mspct(object),
+ w.band = w.band,
+ range = range,
+ unit.out = unit.out,
+ pc.out = pc.out,
+ label.qty = label.qty,
+ span = span,
+ wls.target = wls.target,
+ annotations = annotations,
+ geom = geom,
+ time.format = time.format,
+ tz = tz,
+ text.size = text.size,
+ chroma.type = chroma.type,
+ idfactor = idfactor,
+ facets = facets,
+ plot.data = plot.data,
+ ylim = ylim,
+ object.label = object.label,
+ na.rm = na.rm)
)
}
- # support renaming of the idfactor
- if (getMultipleWl(object) > 1L && is.character(idfactor) && length(idfactor)) {
- setIdFactor(object, idfactor)
- }
- force(object.label)
-
annotations.default <-
getOption("photobiology.plot.annotations",
default = c("boxes", "labels", "summaries", "colour.guide", "peaks"))
annotations <- decode_annotations(annotations,
annotations.default)
- # normalization updated and base of expression changed in one go
- object <- normalize(x = object,
- range = range,
- norm = norm,
- unit.out = unit.out,
- na.rm = na.rm)
+ # Change units if needed, and update normalization
+ object <- switch(unit.out,
+ photon = photobiology::e2q(object, action = "replace"),
+ energy = photobiology::q2e(object, action = "replace"))
+
if (is.null(label.qty)) {
- if (is_normalized(object) || is_scaled(object)) {
+ if (photobiology::is_normalized(object) ||
+ photobiology::is_scaled(object)) {
label.qty = "contribution"
} else {
label.qty = "total"
@@ -782,14 +782,14 @@ autoplot.source_spct <-
if (length(w.band) == 0) {
if (is.null(range)) {
- w.band <- waveband(object)
- } else if (is.waveband(range)) {
+ w.band <- photobiology::waveband(object)
+ } else if (photobiology::is.waveband(range)) {
w.band <- range
} else {
- w.band <- waveband(range, wb.name = "Total")
+ w.band <- photobiology::waveband(range, wb.name = "Total")
}
}
- if (is.waveband(w.band)) {
+ if (photobiology::is.waveband(w.band)) {
w.band <- list(w.band)
}
labels <- sapply(w.band, labels)[1, ]
@@ -853,8 +853,7 @@ autoplot.source_mspct <-
function(object,
...,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.normalize",
- default = "update"),
+ norm = NA,
unit.out = getOption("photobiology.radiation.unit",
default = "energy"),
pc.out = getOption("ggspectra.pc.out", default = FALSE),
@@ -865,8 +864,9 @@ autoplot.source_mspct <-
na.rm = TRUE) {
force(object.label)
+ warn_norm_arg(norm)
+ idfactor <- check_idfactor_arg(object, idfactor = idfactor, default = TRUE)
- idfactor <- validate_idfactor(idfactor = idfactor)
# We trim the spectra to avoid unnecessary computations later
if (!is.null(range)) {
object <- photobiology::trim_wl(object,
@@ -874,15 +874,6 @@ autoplot.source_mspct <-
use.hinges = TRUE,
fill = NULL)
}
- # We apply the normalization and change of unit to the collection if it is to be bound
- # otherwise normalization is applied to the "parallel-summary" spectrum
- if (plot.data == "as.is") {
- object <- photobiology::normalize(object,
- norm = norm,
- unit.out = unit.out,
- na.rm = na.rm)
- norm <- "skip"
- }
# we ensure the units are correct
object <- switch(unit.out,
photon = photobiology::e2q(object, action = "replace"),
@@ -890,10 +881,7 @@ autoplot.source_mspct <-
# we convert the collection of spectra into a single spectrum object
# containing a summary spectrum or multiple spectra in long form.
z <- switch(plot.data,
- as.is = photobiology::rbindspct(object,
- idfactor = ifelse(is.na(idfactor),
- "spct.idx",
- idfactor)),
+ as.is = photobiology::rbindspct(object, idfactor = idfactor),
mean = photobiology::s_mean(object),
median = photobiology::s_median(object),
sum = photobiology::s_sum(object),
@@ -904,13 +892,12 @@ autoplot.source_mspct <-
)
col.name <- c(photon = "s.q.irrad", energy = "s.e.irrad")
- if (is.source_spct(z) && any(col.name %in% names(z))) {
+ if (photobiology::is.source_spct(z) && any(col.name %in% names(z))) {
ggplot2::autoplot(object = z,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = norm,
unit.out = unit.out,
pc.out = pc.out,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
facets = facets,
object.label = object.label,
na.rm = na.rm,
@@ -920,9 +907,8 @@ autoplot.source_mspct <-
ggplot2::autoplot(object = z,
y.name = paste(col.name[unit.out], plot.data, sep = "."),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = norm,
pc.out = pc.out,
- idfactor = idfactor,
+ idfactor = NULL, # use idfactor already set in z
facets = facets,
object.label = object.label,
na.rm = na.rm,
@@ -930,19 +916,3 @@ autoplot.source_mspct <-
}
}
-## internal
-
-#' Convert lubridate duration objects to a string if possible
-#'
-#' @param time.unit lubridate::duration object or character
-#'
-#' @keywords internal
-#'
-duration2character <- function(time.unit) {
- if (is.character(time.unit)) return(time.unit)
- if (!lubridate::is.duration(time.unit)) return("unknown")
- if (time.unit == lubridate::duration(1, "seconds")) return("second")
- if (time.unit == lubridate::duration(1, "hours")) return("hour")
- if (time.unit == lubridate::duration(1, "days")) return("day")
- "duration"
-}
diff --git a/R/autoplot-utils.R b/R/autoplot-utils.R
deleted file mode 100644
index 0bf5871e..00000000
--- a/R/autoplot-utils.R
+++ /dev/null
@@ -1,22 +0,0 @@
-#' Validate idfactor
-#'
-#' @param idfactor character, logical, NULL or NA. If a \code{character} string,
-#' it is validated as an R name, while logical values, NULL and NA are
-#' returned unchanged.
-#'
-#' @keywords internal
-#'
-validate_idfactor <- function(idfactor) {
- if (length(idfactor) > 1L) {
- stop("'idfactor' must be of length one or NULL, but is longer")
- }
- if (!is.null(idfactor) & !is.na(idfactor) & !is.logical(idfactor)) {
- idfactor.user <- idfactor
- idfactor <- make.names(idfactor)
- if (idfactor != idfactor.user) {
- message("'idfactor' sanitized from \"", idfactor.user,
- "\" into \"", idfactor, "\"")
- }
- }
- idfactor
-}
diff --git a/R/autoplot-waveband.R b/R/autoplot-waveband.R
index 203e0c7a..41a654e2 100644
--- a/R/autoplot-waveband.R
+++ b/R/autoplot-waveband.R
@@ -23,8 +23,8 @@
#' \code{character} strings "half.maximum" and "half.range" are also accepted
#' as arguments. A list with \code{numeric} and/or \code{character} values is
#' also accepted.
-#' @param unit.in the type of unit we assume as reference "energy" or "photon"
-#' based.
+#' @param unit.in,unit.out the type of unit we assume as reference "energy" or
+#' "photon" based.
#' @param annotations a character vector. For details please see section Plot
#' Annotations.
#' @param geom character The name of a ggplot geometry, currently only
@@ -76,26 +76,25 @@ autoplot.waveband <-
span = NULL,
wls.target = "HM",
unit.in = getOption("photobiology.radiation.unit", default = "energy"),
+ unit.out = unit.in,
annotations = NULL,
geom = "line",
wb.trim = TRUE,
- norm = NULL,
+ norm = NA,
text.size = 2.5,
ylim = c(NA, NA),
object.label = deparse(substitute(object)),
na.rm = TRUE) {
force(object.label)
+ warn_norm_arg(norm)
+ w.band <- object
annotations.default <-
getOption("photobiology.plot.annotations",
default = c("boxes", "labels", "colour.guide"))
annotations <- c("=", decode_annotations(annotations,
annotations.default))
- w.band <- object
- if (!is.waveband(w.band)) {
- return(ggplot())
- }
if (!is.null(w.length)) {
w.length <- unique(sort(w.length, na.last = NA))
}
@@ -123,13 +122,6 @@ autoplot.waveband <-
unit.out = unit.in, unit.in = unit.in,
use.cached.mult = getOption("photobiology.use.cached.mult",
default = FALSE), fill = fill)
- if (is.null(norm)) {
- if (!is.null(w.band$norm)) {
- norm <- w.band$norm
- } else {
- norm <- "max"
- }
- }
if (unit.in == "energy") {
spct <- response_spct(w.length = w.length, s.e.response = s.response)
} else if (unit.in %in% c("photon", "quantum")) {
@@ -149,10 +141,10 @@ autoplot.waveband <-
wb.trim = wb.trim,
span = span,
wls.target = wls.target,
- norm = norm,
text.size = text.size,
ylim = ylim,
na.rm = na.rm,
+ unit.out = unit.out,
...) +
autotitle(object = object,
object.label = object.label,
diff --git a/R/autotitle.R b/R/autotitle.R
index 0f3352ba..d1e06d38 100644
--- a/R/autotitle.R
+++ b/R/autotitle.R
@@ -61,6 +61,7 @@ autotitle <- function(object,
tz = "",
default.title = "title:objt") {
+ force(object.label)
if (!is.character(object.label)) {
if (is.name(object.label)) {
object.label <- as.character(object.label)
diff --git a/R/axis-utils-calibration-spct.R b/R/axis-utils-calibration-spct.R
index 097f0ec3..3d4dadae 100644
--- a/R/axis-utils-calibration-spct.R
+++ b/R/axis-utils-calibration-spct.R
@@ -49,7 +49,10 @@ multipliers_label <- function(unit.exponent = 0,
} else if (format == "R.character") {
paste(label.text, "k(lambda) (rel. units)")
}
- } else if (normalized) {
+ } else if (is.character(normalized) || normalized) {
+ if (is.logical(normalized)) {
+ normalized <- "norm"
+ }
if (tolower(format) == "latex") {
paste(label.text, " $k_{\\lambda} / k_{", normalized, "}$ (/1)", sep = "")
} else if (format == "R.expression") {
@@ -125,7 +128,9 @@ scale_y_multipliers_continuous <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math",
@@ -136,7 +141,7 @@ scale_y_multipliers_continuous <-
axis.symbols = getOption("ggspectra.axis.symbols",
default = TRUE),
...) {
- scale_y_continuous(name = name,
- labels = labels,
- ...)
+ ggplot2::scale_y_continuous(name = name,
+ labels = labels,
+ ...)
}
diff --git a/R/axis-utils-cps-spct.R b/R/axis-utils-cps-spct.R
index 76b88337..d9890c8f 100644
--- a/R/axis-utils-cps-spct.R
+++ b/R/axis-utils-cps-spct.R
@@ -49,7 +49,10 @@ cps_label <- function(unit.exponent = 0,
} else if (format == "R.character") {
paste(label.text, "n(lambda) (rel. units)")
}
- } else if (normalized) {
+ } else if (is.character(normalized) || normalized) {
+ if (is.logical(normalized)) {
+ normalized <- "norm"
+ }
if (tolower(format) == "latex") {
paste(label.text, " rate $n_{\\lambda} / N_{", normalized, "}$ (/1)", sep = "")
} else if (format == "R.expression") {
@@ -137,16 +140,29 @@ cps_label <- function(unit.exponent = 0,
#'
#' ggplot(norm_led.cps_spct) +
#' geom_line() +
+#' scale_y_cps_continuous(normalized = is_normalized(norm_led.cps_spct)) +
+#' scale_x_wl_continuous()
+#'
+#' ggplot(norm_led.cps_spct) +
+#' geom_line() +
#' scale_y_cps_continuous(normalized = getNormalized(norm_led.cps_spct)) +
#' scale_x_wl_continuous()
#'
+#' ggplot(norm_led.cps_spct) +
+#' geom_line() +
+#' scale_y_cps_continuous(normalized =
+#' normalization(norm_led.cps_spct)$norm.type) +
+#' scale_x_wl_continuous()
+#'
scale_y_cps_continuous <-
function(unit.exponent = 0,
name = cps_label(unit.exponent = unit.exponent,
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math",
diff --git a/R/axis-utils-filter-spct.R b/R/axis-utils-filter-spct.R
index 9e8b9396..b9f621b9 100644
--- a/R/axis-utils-filter-spct.R
+++ b/R/axis-utils-filter-spct.R
@@ -62,7 +62,10 @@ A_label <- function(unit.exponent = 0,
} else if (format == "R.character") {
paste(label.text, " A(lambda) (rel. units)")
}
- } else if (normalized) {
+ } else if (is.character(normalized) || normalized) {
+ if (is.logical(normalized)) {
+ normalized <- "norm"
+ }
if (tolower(format) == "latex") {
paste(label.text, " $A_{\\lambda}/A_{", normalized, "}$ (/1)", sep = "")
} else if (format == "R.expression") {
@@ -217,13 +220,20 @@ A_total_label <- function(unit.exponent = 0,
#' scale_y_A_total_continuous(axis.symbols = FALSE) +
#' scale_x_wl_continuous(axis.symbols = FALSE)
#'
+#' ggplot(yellow_gel.spct, plot.qty = "absorbance") +
+#' geom_line() +
+#' scale_y_A_internal_continuous(normalized = "none") +
+#' scale_x_wl_continuous()
+#'
scale_y_A_continuous <-
function(unit.exponent = 0,
name = A_label(unit.exponent = unit.exponent,
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols,
Tfr.type = Tfr.type),
labels = SI_pl_format(exponent = unit.exponent),
@@ -251,7 +261,9 @@ scale_y_A_internal_continuous <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols,
Tfr.type = "internal"),
labels = SI_pl_format(exponent = unit.exponent),
@@ -278,7 +290,9 @@ scale_y_A_total_continuous <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols,
Tfr.type = "total"),
labels = SI_pl_format(exponent = unit.exponent),
@@ -378,7 +392,10 @@ Tfr_label <- function(unit.exponent = ifelse(pc.out, -2, 0),
} else if (format == "R.character") {
paste(label.text, " t(lambda) (rel. units)")
}
- } else if (normalized) {
+ } else if (is.character(normalized) || normalized) {
+ if (is.logical(normalized)) {
+ normalized <- "norm"
+ }
if (tolower(format) == "latex") {
paste(label.text, " $\\tau_{\\lambda}/\\tau_{", normalized, "}$ (/1)", sep = "")
} else if (format == "R.expression") {
@@ -530,29 +547,37 @@ Tfr_total_label <- function(unit.exponent = 0,
#' scale_y_Tfr_total_continuous(axis.symbols = FALSE) +
#' scale_x_wl_continuous(axis.symbols = FALSE)
#'
+#' ggplot(normalize(yellow_gel.spct)) +
+#' geom_line() +
+#' scale_y_Tfr_total_continuous(normalized = "max") +
+#' scale_x_wl_continuous()
+#'
#' unset_filter_qty_default()
#'
-scale_y_Tfr_continuous <- function(unit.exponent = ifelse(pc.out, -2, 0),
- name = Tfr_label(unit.exponent = unit.exponent,
- format = format,
- label.text = label.text,
- scaled = scaled,
- normalized = round(normalized, 1),
- axis.symbols = axis.symbols,
- Tfr.type = Tfr.type),
- labels = SI_pl_format(exponent = unit.exponent),
- limits = c(0, 1),
- format = getOption("photobiology.math",
- default = "R.expression"),
- label.text = NULL,
- scaled = FALSE,
- normalized = FALSE,
- axis.symbols = getOption("ggspectra.axis.symbols",
- default = TRUE),
- pc.out = getOption("ggspectra.pc.out",
- default = FALSE),
- Tfr.type,
- ...) {
+scale_y_Tfr_continuous <-
+ function(unit.exponent = ifelse(pc.out, -2, 0),
+ name = Tfr_label(unit.exponent = unit.exponent,
+ format = format,
+ label.text = label.text,
+ scaled = scaled,
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
+ axis.symbols = axis.symbols,
+ Tfr.type = Tfr.type),
+ labels = SI_pl_format(exponent = unit.exponent),
+ limits = c(0, 1),
+ format = getOption("photobiology.math",
+ default = "R.expression"),
+ label.text = NULL,
+ scaled = FALSE,
+ normalized = FALSE,
+ axis.symbols = getOption("ggspectra.axis.symbols",
+ default = TRUE),
+ pc.out = getOption("ggspectra.pc.out",
+ default = FALSE),
+ Tfr.type,
+ ...) {
scale_y_continuous(name = name,
labels = labels,
limits = limits,
@@ -569,7 +594,9 @@ scale_y_Tfr_internal_continuous <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols,
Tfr.type = "internal"),
labels = SI_pl_format(exponent = unit.exponent),
@@ -600,7 +627,9 @@ scale_y_Tfr_total_continuous <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols,
Tfr.type = "total"),
labels = SI_pl_format(exponent = unit.exponent),
@@ -888,7 +917,10 @@ Rfr_label <- function(unit.exponent = ifelse(pc.out, -2, 0),
} else if (format == "R.character") {
paste(label.text, " r (lambda) (rel. units)")
}
- } else if (normalized) {
+ } else if (is.character(normalized) || normalized) {
+ if (is.logical(normalized)) {
+ normalized <- "norm"
+ }
if (tolower(format) == "latex") {
paste(label.text, " $\\rho_{\\lambda}/\\rho_{", normalized, "}$ (/1)", sep = "")
} else if (format == "R.expression") {
@@ -1042,13 +1074,21 @@ Rfr_total_label <- function(unit.exponent = ifelse(pc.out, -2, 0),
#' scale_y_Rfr_specular_continuous(axis.symbols = FALSE) +
#' scale_x_wl_continuous(axis.symbols = FALSE)
#'
+#' ggplot(normalize(Ler_leaf_rflt.spct)) +
+#' geom_line() +
+#' scale_y_Rfr_continuous(Rfr.type = getRfrType(Ler_leaf_rflt.spct),
+#' normalized = "max") +
+#' scale_x_wl_continuous()
+#'
scale_y_Rfr_continuous <-
function(unit.exponent = ifelse(pc.out, -2, 0),
name = Rfr_label(unit.exponent = unit.exponent,
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols,
Rfr.type = Rfr.type),
labels = SI_pl_format(exponent = unit.exponent),
@@ -1080,7 +1120,9 @@ scale_y_Rfr_specular_continuous <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols,
Rfr.type = "specular"),
labels = SI_pl_format(exponent = unit.exponent),
@@ -1111,7 +1153,9 @@ scale_y_Rfr_total_continuous <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols,
Rfr.type = "total"),
labels = SI_pl_format(exponent = unit.exponent),
diff --git a/R/axis-utils-raw-spct.R b/R/axis-utils-raw-spct.R
index f1042162..77ec23f0 100644
--- a/R/axis-utils-raw-spct.R
+++ b/R/axis-utils-raw-spct.R
@@ -47,7 +47,10 @@ counts_label <- function(unit.exponent = 3,
} else if (format == "R.character") {
"Pixel response N(lambda) (rel. units)"
}
- } else if (normalized) {
+ } else if (is.character(normalized) || normalized) {
+ if (is.logical(normalized)) {
+ normalized <- "norm"
+ }
if (tolower(format) == "latex") {
paste(label.text, " $N_{\\lambda} / N_{", normalized, "}$ (/1)", sep = "")
} else if (format == "R.expression") {
@@ -137,16 +140,11 @@ counts_label <- function(unit.exponent = 3,
#' scale_y_counts_tg_continuous(unit.exponent = 0) +
#' scale_x_wl_continuous()
#'
-#' norm_led.raw_spct <- normalize(white_led.raw_spct[ , 1:2], norm = "max")
-#'
-#' ggplot(norm_led.raw_spct) +
-#' geom_line() +
-#' scale_y_counts_continuous(normalized = getNormalized(norm_led.raw_spct)) +
-#' scale_x_wl_continuous()
+#' norm_led.raw_spct <- normalize(white_led.raw_spct, norm = "max")
#'
#' ggplot(norm_led.raw_spct) +
#' geom_line() +
-#' scale_y_counts_tg_continuous(normalized = getNormalized(norm_led.raw_spct)) +
+#' scale_y_counts_continuous(unit.exponent = 0, normalized = "max") +
#' scale_x_wl_continuous()
#'
scale_y_counts_continuous <-
@@ -155,7 +153,9 @@ scale_y_counts_continuous <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math",
@@ -181,7 +181,9 @@ scale_y_counts_tg_continuous <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols),
labels = SI_tg_format(exponent = unit.exponent),
format = getOption("photobiology.math",
@@ -192,7 +194,7 @@ scale_y_counts_tg_continuous <-
axis.symbols = getOption("ggspectra.axis.symbols",
default = TRUE),
...) {
- scale_y_continuous(name = name,
- labels = labels,
- ...)
+ ggplot2::scale_y_continuous(name = name,
+ labels = labels,
+ ...)
}
diff --git a/R/axis-utils-response-spct.R b/R/axis-utils-response-spct.R
index 4d003f2c..6e8d5362 100644
--- a/R/axis-utils-response-spct.R
+++ b/R/axis-utils-response-spct.R
@@ -64,7 +64,10 @@ s.e.response_label <- function(unit.exponent = 0,
} else if (format == "R.character") {
paste(label.text, "R(lambda) (rel. units)")
}
- } else if (normalized) {
+ } else if (is.character(normalized) || normalized) {
+ if (is.logical(normalized)) {
+ normalized <- "norm"
+ }
if (tolower(format) == "latex") {
paste(label.text, " $R(E)_{\\lambda} / R(E)_{", normalized, "}$ (/1)", sep = "")
} else if (format == "R.expression") {
@@ -141,7 +144,10 @@ s.q.response_label <- function(unit.exponent = 0,
} else if (format == "R.character") {
paste(label.text, " (rel. units)")
}
- } else if (normalized) {
+ } else if (is.character(normalized) || normalized) {
+ if (is.logical(normalized)) {
+ normalized <- "norm"
+ }
if (tolower(format) == "latex") {
paste(label.text, " $R(Q)_{\\lambda} / R(Q)_{", normalized, "}$ (/1)", sep = "")
} else if (format == "R.expression") {
@@ -218,7 +224,10 @@ s.e.action_label <- function(unit.exponent = 0,
} else if (format == "R.character") {
paste(label.text, "A(E)(lambda) (rel. units)")
}
- } else if (normalized) {
+ } else if (is.character(normalized) || normalized) {
+ if (is.logical(normalized)) {
+ normalized <- "norm"
+ }
if (tolower(format) == "latex") {
paste(label.text, " $A(E)_{\\lambda} / A(E)_{", normalized, "}$ (/1)", sep = "")
} else if (format == "R.expression") {
@@ -295,7 +304,10 @@ s.q.action_label <- function(unit.exponent = 0,
} else if (format == "R.character") {
paste(label.text, "A(Q)(lambda) (rel. units)")
}
- } else if (normalized) {
+ } else if (is.character(normalized) || normalized) {
+ if (is.logical(normalized)) {
+ normalized <- "norm"
+ }
if (tolower(format) == "latex") {
paste(label.text, " $A(Q)_{\\lambda} / A(Q)_{", normalized, "}$ (/1)", sep = "")
} else if (format == "R.expression") {
@@ -400,6 +412,12 @@ s.q.action_label <- function(unit.exponent = 0,
#' scale_y_s.e.response_continuous(normalized = getNormalized(norm_ccd.spct)) +
#' scale_x_wl_continuous()
#'
+#' ggplot(norm_ccd.spct) +
+#' geom_line() +
+#' scale_y_s.e.response_continuous(normalized =
+#' normalization(norm_ccd.spct)$norm.type) +
+#' scale_x_wl_continuous()
+#'
#' photon_as_default()
#'
#' norm_ccd.spct <- normalize(ccd.spct, norm = "max")
@@ -422,7 +440,9 @@ scale_y_s.e.response_continuous <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = -unit.exponent), # per unit
format = getOption("photobiology.math",
@@ -448,7 +468,9 @@ scale_y_s.q.response_continuous <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = -unit.exponent), # per unit
format = getOption("photobiology.math",
@@ -474,7 +496,9 @@ scale_y_s.e.action_continuous <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = -unit.exponent), # per unit
format = getOption("photobiology.math",
@@ -500,7 +524,9 @@ scale_y_s.q.action_continuous <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = -unit.exponent), # per unit
format = getOption("photobiology.math",
diff --git a/R/axis-utils-source-spct.R b/R/axis-utils-source-spct.R
index 16eb723b..14ae6407 100644
--- a/R/axis-utils-source-spct.R
+++ b/R/axis-utils-source-spct.R
@@ -54,7 +54,10 @@ s.e.irrad_label <- function(unit.exponent = 0,
} else if (format == "R.character") {
paste(label.text, "E(lambda) (rel. units)")
}
- } else if (normalized) {
+ } else if (is.character(normalized) || normalized) {
+ if (is.logical(normalized)) {
+ normalized <- "norm"
+ }
if (tolower(format) == "latex") {
paste(label.text, " $E_{\\lambda} / E_{", normalized, "}$ (/1)", sep = "")
} else if (format == "R.expression") {
@@ -131,7 +134,10 @@ s.q.irrad_label <- function(unit.exponent = ifelse(normalized, 0, -6),
} else if (format == "R.character") {
paste(label.text, "Q(lambda) (rel. units)")
}
- } else if (normalized) {
+ } else if (is.character(normalized) || normalized) {
+ if (is.logical(normalized)) {
+ normalized <- "norm"
+ }
if (tolower(format) == "latex") {
paste(label.text, " $Q_{\\lambda} / Q_{", normalized, "}$ (/1)", sep = "")
} else if (format == "R.expression") {
@@ -238,11 +244,17 @@ s.q.irrad_label <- function(unit.exponent = ifelse(normalized, 0, -6),
#' scale_x_wl_continuous()
#'
#' photon_as_default()
-#' normalized_sun.spct <- normalize(sun.spct)
+#' normalized_sun.spct <- normalize(e2q(sun.spct, action = "replace"))
+#' ggplot(normalized_sun.spct) +
+#' geom_line(na.rm = TRUE) +
+#' scale_y_s.q.irrad_continuous(normalized =
+#' normalization(normalized_sun.spct)$norm.wl) +
+#' scale_x_wl_continuous()
+#'
#' ggplot(normalized_sun.spct) +
#' geom_line(na.rm = TRUE) +
#' scale_y_s.q.irrad_continuous(normalized =
-#' getNormalized(normalized_sun.spct)) +
+#' normalization(normalized_sun.spct)$norm.type) +
#' scale_x_wl_continuous()
#'
#' unset_radiation_unit_default()
@@ -253,7 +265,9 @@ scale_y_s.e.irrad_continuous <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math",
@@ -279,7 +293,9 @@ scale_y_s.q.irrad_continuous <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math",
@@ -305,7 +321,9 @@ scale_y_s.e.irrad_log10 <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math",
@@ -331,7 +349,9 @@ scale_y_s.q.irrad_log10 <-
format = format,
label.text = label.text,
scaled = scaled,
- normalized = round(normalized, 1),
+ normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1),
+ unique(normalized)),
axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math",
@@ -347,20 +367,3 @@ scale_y_s.q.irrad_log10 <-
...)
}
-## internal
-
-#' Convert lubridate duration objects to a string if possible
-#'
-#' @param time.unit lubridate::duration object or character
-#'
-#' @keywords internal
-#'
-duration2character <- function(time.unit) {
- if (is.character(time.unit)) return(time.unit)
- if (!lubridate::is.duration(time.unit)) return("unknown")
- if (time.unit == lubridate::duration(1, "seconds")) return("second")
- if (time.unit == lubridate::duration(1, "hours")) return("hour")
- if (time.unit == lubridate::duration(1, "days")) return("day")
- "duration"
-}
-
diff --git a/R/utils-internal.R b/R/utils-internal.R
new file mode 100644
index 00000000..4ef2f67e
--- /dev/null
+++ b/R/utils-internal.R
@@ -0,0 +1,69 @@
+## internal
+
+#' Check idfactor argument and retrieve if needed
+#'
+#' @param object generic_spct object.
+#' @param idfactor character, NULL or NA The name of the factor identifying
+#' spectra when stored in long form.
+#'
+#' @keywords internal
+#'
+check_idfactor_arg <- function(object, idfactor = NULL, default = FALSE) {
+ if (length(idfactor) > 1L) {
+ warning("Length of 'idfactor' > 1, using: '", idfactor[1], "',")
+ idfactor <- idfactor[1]
+ }
+ if (is.null(idfactor) || is.na(idfactor)) {
+ idfactor <- photobiology::getIdFactor(object)
+ }
+ if (is.na(idfactor) || !is.character(idfactor)) {
+ idfactor <- default || photobiology::getMultipleWl(object) > 1L
+ }
+ idfactor
+}
+
+#' Update idfactor name in object
+#'
+#' @param object generic_spct object.
+#' @param idfactor character The name of the factor identifying spectra when
+#' stored in long form.
+#'
+#' @keywords internal
+#'
+rename_idfactor <- function(object, idfactor) {
+ if (is.character(idfactor) &&
+ photobiology::getIdFactor(object) != idfactor) {
+ object <- photobiology::setIdFactor(object, idfactor = idfactor)
+ }
+ object
+}
+
+
+#' Convert lubridate duration objects to a string if possible
+#'
+#' @param time.unit lubridate::duration object or character
+#'
+#' @keywords internal
+#'
+duration2character <- function(time.unit) {
+ if (is.character(time.unit)) return(time.unit)
+ if (!lubridate::is.duration(time.unit)) return("unknown")
+ if (time.unit == lubridate::duration(1, "seconds")) return("second")
+ if (time.unit == lubridate::duration(1, "hours")) return("hour")
+ if (time.unit == lubridate::duration(1, "days")) return("day")
+ "duration"
+}
+
+#' Warn if norm argument passed in call
+#'
+#' @param norm numeric or character No longer supported, normalization is always
+#' updated in \code{autoplot()} if present and a unit conversion applied.
+#'
+#' @keywords internal
+#'
+warn_norm_arg <- function(norm) {
+ if (!is.na(norm)) {
+ warning("On-the-fly normalization no longer supported. Use 'normalize()' instead.")
+ }
+}
+
diff --git a/ggspectra.Rproj b/ggspectra.Rproj
index 9625dd1f..2a7d214c 100644
--- a/ggspectra.Rproj
+++ b/ggspectra.Rproj
@@ -1,4 +1,5 @@
Version: 1.0
+ProjectId: d28d46dd-d639-4847-aabb-b4b205390f38
RestoreWorkspace: No
SaveWorkspace: No
diff --git a/man/autoplot.calibration_spct.Rd b/man/autoplot.calibration_spct.Rd
index 3fbf98cc..e54f939d 100644
--- a/man/autoplot.calibration_spct.Rd
+++ b/man/autoplot.calibration_spct.Rd
@@ -20,7 +20,7 @@
geom = "line",
time.format = "",
tz = "UTC",
- norm = NULL,
+ norm = NA,
text.size = 2.5,
idfactor = NULL,
facets = FALSE,
@@ -35,7 +35,7 @@
...,
range = getOption("ggspectra.wlrange", default = NULL),
unit.out = "ignored",
- norm = getOption("ggspectra.normalize", default = "skip"),
+ norm = NA,
pc.out = getOption("ggspectra.pc.out", default = FALSE),
plot.data = "as.is",
idfactor = TRUE,
@@ -86,11 +86,8 @@ selects between them based on \code{stacked}.}
\item{tz}{character Time zone to use for title and/or subtitle.}
-\item{norm}{numeric Normalization wavelength (nm) or character string
-\code{"max"}, or \code{"min"} for normalization at the corresponding
-wavelength, \code{"update"} to update the normalization after modifying
-units of expression, quantity or range but respecting the previously used
-criterion, or \code{"skip"} to force return of \code{object} unchanged.}
+\item{norm}{numeric No longer supported, normalization is always updated if
+present and a unit conversion applied.}
\item{text.size}{numeric size of text in the plot decorations.}
diff --git a/man/autoplot.cps_spct.Rd b/man/autoplot.cps_spct.Rd
index a73aec9a..ef3adc3a 100644
--- a/man/autoplot.cps_spct.Rd
+++ b/man/autoplot.cps_spct.Rd
@@ -11,7 +11,7 @@
w.band = getOption("photobiology.plot.bands", default = list(UVC(), UVB(), UVA(),
PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = "skip",
+ norm = NA,
unit.out = NULL,
pc.out = getOption("ggspectra.pc.out", default = FALSE),
label.qty = "mean",
@@ -55,11 +55,8 @@ to the plot methods for individual spectra, otherwise currently ignored.}
\item{range}{an R object on which \code{range()} returns a vector of length
2, with minimum and maximum wavelengths (nm).}
-\item{norm}{numeric Normalization wavelength (nm) or character string
-\code{"max"}, or \code{"min"} for normalization at the corresponding
-wavelength, \code{"update"} to update the normalization after modifying
-units of expression, quantity or range but respecting the previously used
-criterion, or \code{"skip"} to force return of \code{object} unchanged.}
+\item{norm}{numeric No longer supported, normalization is always updated if
+present and a unit conversion applied.}
\item{unit.out}{character IGNORED.}
diff --git a/man/autoplot.filter_spct.Rd b/man/autoplot.filter_spct.Rd
index aa8a97f4..473d985e 100644
--- a/man/autoplot.filter_spct.Rd
+++ b/man/autoplot.filter_spct.Rd
@@ -11,7 +11,7 @@
w.band = getOption("photobiology.plot.bands", default = list(UVC(), UVB(), UVA(),
PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.norm", default = "update"),
+ norm = NA,
plot.qty = getOption("photobiology.filter.qty", default = "transmittance"),
pc.out = getOption("ggspectra.pc.out", default = FALSE),
label.qty = NULL,
@@ -35,7 +35,7 @@
object,
...,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.norm", default = "update"),
+ norm = NA,
plot.qty = getOption("photobiology.filter.qty", default = "transmittance"),
pc.out = getOption("ggspectra.pc.out", default = FALSE),
plot.data = "as.is",
@@ -56,11 +56,8 @@ to the plot methods for individual spectra, otherwise currently ignored.}
\item{range}{an R object on which \code{range()} returns a vector of length
2, with minimum and maximum wavelengths (nm).}
-\item{norm}{numeric Normalization wavelength (nm) or character string
-\code{"max"}, or \code{"min"} for normalization at the corresponding
-wavelength, \code{"update"} to update the normalization after modifying
-units of expression, quantity or range but respecting the previously used
-criterion, or \code{"skip"} to force return of \code{object} unchanged.}
+\item{norm}{numeric No longer supported, normalization is always updated if
+present and a unit conversion applied.}
\item{plot.qty}{character string one of "transmittance" or "absorbance".}
@@ -197,13 +194,13 @@ The plotting of absorbance is an exception to scale limits as the
autoplot(yellow_gel.spct)
autoplot(yellow_gel.spct, geom = "spct")
autoplot(yellow_gel.spct, plot.qty = "transmittance")
-autoplot(yellow_gel.spct, plot.qty = "absorptance")
autoplot(yellow_gel.spct, plot.qty = "absorbance")
autoplot(yellow_gel.spct, pc.out = TRUE)
autoplot(yellow_gel.spct, annotations = c("+", "wls"))
# spectra for two filters in long form
autoplot(two_filters.spct)
+autoplot(two_filters.spct, idfactor = TRUE)
autoplot(two_filters.spct, idfactor = "Spectra")
autoplot(two_filters.spct, facets = TRUE)
diff --git a/man/autoplot.generic_spct.Rd b/man/autoplot.generic_spct.Rd
index daa43bad..bdefd820 100644
--- a/man/autoplot.generic_spct.Rd
+++ b/man/autoplot.generic_spct.Rd
@@ -15,6 +15,7 @@
w.band = getOption("photobiology.plot.bands", default = list(UVC(), UVB(), UVA(),
PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
+ norm = NA,
label.qty = "none",
span = NULL,
wls.target = "HM",
@@ -47,6 +48,9 @@ to the y aesthetic.}
\item{range}{an R object on which \code{range()} returns a vector of length
2, with minimum and maximum wavelengths (nm).}
+\item{norm}{numeric No longer supported, normalization is always updated if
+present and a unit conversion applied.}
+
\item{label.qty}{character string giving the type of summary quantity to use
for labels, one of \code{"mean"}, \code{"total"}, \code{"contribution"},
and \code{"relative"}.}
@@ -155,6 +159,7 @@ If \code{idfactor = NULL}, the default for single spectra, the name of
sun.generic_spct <- as.generic_spct(sun.spct)
autoplot(sun.generic_spct, y.name = "s.q.irrad")
+autoplot(sun.generic_spct, y.name = "s.e.irrad")
autoplot(sun.generic_spct, y.name = "s.q.irrad",
annotations = "")
autoplot(sun.generic_spct, y.name = "s.q.irrad",
diff --git a/man/autoplot.object_spct.Rd b/man/autoplot.object_spct.Rd
index a80497be..11ddf325 100644
--- a/man/autoplot.object_spct.Rd
+++ b/man/autoplot.object_spct.Rd
@@ -11,7 +11,7 @@
w.band = getOption("photobiology.plot.bands", default = list(UVC(), UVB(), UVA(),
PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = "skip",
+ norm = NA,
plot.qty = "all",
pc.out = getOption("ggspectra.pc.out", default = FALSE),
label.qty = NULL,
@@ -36,7 +36,7 @@
object,
...,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = "skip",
+ norm = NA,
plot.qty = getOption("photobiology.filter.qty", default = "all"),
pc.out = getOption("ggspectra.pc.out", default = FALSE),
plot.data = "as.is",
@@ -57,11 +57,8 @@ to the plot methods for individual spectra, otherwise currently ignored.}
\item{range}{an R object on which \code{range()} returns a vector of length
2, with minimum and maximum wavelengths (nm).}
-\item{norm}{numeric Normalization wavelength (nm) or character string
-\code{"max"}, or \code{"min"} for normalization at the corresponding
-wavelength, \code{"update"} to update the normalization after modifying
-units of expression, quantity or range but respecting the previously used
-criterion, or \code{"skip"} to force return of \code{object} unchanged.}
+\item{norm}{numeric No longer supported, normalization is always updated if
+present and a unit conversion applied.}
\item{plot.qty}{character string, one of "all", "transmittance",
"absorbance", "absorptance", or "reflectance".}
diff --git a/man/autoplot.raw_spct.Rd b/man/autoplot.raw_spct.Rd
index 0c1d129b..3c5baab3 100644
--- a/man/autoplot.raw_spct.Rd
+++ b/man/autoplot.raw_spct.Rd
@@ -11,6 +11,7 @@
w.band = getOption("photobiology.plot.bands", default = list(UVC(), UVB(), UVA(),
PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
+ norm = NA,
unit.out = "counts",
pc.out = getOption("ggspectra.pc.out", default = FALSE),
label.qty = "mean",
@@ -20,7 +21,6 @@
geom = "line",
time.format = "",
tz = "UTC",
- norm = "skip",
text.size = 2.5,
idfactor = NULL,
facets = FALSE,
@@ -34,7 +34,7 @@
object,
...,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.norm", default = "skip"),
+ norm = NA,
unit.out = "counts",
pc.out = getOption("ggspectra.pc.out", default = FALSE),
idfactor = TRUE,
@@ -55,6 +55,9 @@ to the plot methods for individual spectra, otherwise currently ignored.}
\item{range}{an R object on which \code{range()} returns a vector of length
2, with minimum and maximum wavelengths (nm).}
+\item{norm}{numeric No longer supported, normalization is always updated if
+present and a unit conversion applied.}
+
\item{unit.out}{character IGNORED.}
\item{pc.out}{logical, if \code{TRUE} use percent instead of fraction of one
@@ -86,12 +89,6 @@ selects between them based on \code{stacked}.}
\item{tz}{character Time zone to use for title and/or subtitle.}
-\item{norm}{numeric Normalization wavelength (nm) or character string
-\code{"max"}, or \code{"min"} for normalization at the corresponding
-wavelength, \code{"update"} to update the normalization after modifying
-units of expression, quantity or range but respecting the previously used
-criterion, or \code{"skip"} to force return of \code{object} unchanged.}
-
\item{text.size}{numeric size of text in the plot decorations.}
\item{idfactor}{character Name of an index column in data holding a
diff --git a/man/autoplot.reflector_spct.Rd b/man/autoplot.reflector_spct.Rd
index e9382444..5454978b 100644
--- a/man/autoplot.reflector_spct.Rd
+++ b/man/autoplot.reflector_spct.Rd
@@ -11,7 +11,7 @@
w.band = getOption("photobiology.plot.bands", default = list(UVC(), UVB(), UVA(),
PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.norm", default = "update"),
+ norm = NA,
plot.qty = getOption("photobiology.reflector.qty", default = "reflectance"),
pc.out = getOption("ggspectra.pc.out", default = FALSE),
label.qty = NULL,
@@ -35,7 +35,7 @@
object,
...,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.normalize", default = "update"),
+ norm = NA,
plot.qty = getOption("photobiology.reflector.qty", default = "reflectance"),
pc.out = getOption("ggspectra.pc.out", default = FALSE),
plot.data = "as.is",
@@ -56,11 +56,8 @@ to the plot methods for individual spectra, otherwise currently ignored.}
\item{range}{an R object on which \code{range()} returns a vector of length
2, with minimum and maximum wavelengths (nm).}
-\item{norm}{numeric Normalization wavelength (nm) or character string
-\code{"max"}, or \code{"min"} for normalization at the corresponding
-wavelength, \code{"update"} to update the normalization after modifying
-units of expression, quantity or range but respecting the previously used
-criterion, or \code{"skip"} to force return of \code{object} unchanged.}
+\item{norm}{numeric No longer supported, normalization is always updated if
+present and a unit conversion applied.}
\item{plot.qty}{character string (currently ignored).}
diff --git a/man/autoplot.response_spct.Rd b/man/autoplot.response_spct.Rd
index 9bbabb16..26d6189b 100644
--- a/man/autoplot.response_spct.Rd
+++ b/man/autoplot.response_spct.Rd
@@ -8,10 +8,11 @@
\method{autoplot}{response_spct}(
object,
...,
- w.band = getOption("photobiology.plot.bands", default = list(UVC(), UVB(), UVA(),
- PhR())),
+ w.band = getOption("photobiology.plot.bands", default =
+ list(photobiologyWavebands::UVC(), photobiologyWavebands::UVB(),
+ photobiologyWavebands::UVA(), photobiologyWavebands::PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.norm", default = "update"),
+ norm = NA,
unit.out = getOption("photobiology.radiation.unit", default = "energy"),
pc.out = getOption("ggspectra.pc.out", default = FALSE),
label.qty = NULL,
@@ -34,7 +35,7 @@
object,
...,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.norm", default = "update"),
+ norm = NA,
unit.out = getOption("photobiology.radiation.unit", default = "energy"),
pc.out = getOption("ggspectra.pc.out", default = FALSE),
plot.data = "as.is",
@@ -55,11 +56,8 @@ to the plot methods for individual spectra, otherwise currently ignored.}
\item{range}{an R object on which \code{range()} returns a vector of length
2, with minimum and maximum wavelengths (nm).}
-\item{norm}{numeric Normalization wavelength (nm) or character string
-\code{"max"}, or \code{"min"} for normalization at the corresponding
-wavelength, \code{"update"} to update the normalization after modifying
-units of expression, quantity or range but respecting the previously used
-criterion, or \code{"skip"} to force return of \code{object} unchanged.}
+\item{norm}{numeric No longer supported, normalization is always updated if
+present and a unit conversion applied.}
\item{unit.out}{character string indicating type of radiation units to use
for plotting: \code{"photon"} or its synonym \code{"quantum"}, or
@@ -188,16 +186,16 @@ autoplot(photodiode.spct)
autoplot(photodiode.spct, geom = "spct")
autoplot(photodiode.spct, unit.out = "photon")
autoplot(photodiode.spct, annotations = "")
-autoplot(photodiode.spct, norm = "skip")
-autoplot(photodiode.spct, norm = 400)
two_sensors.mspct <-
response_mspct(list("Photodiode" = photodiode.spct,
- "Coupled charge device" = ccd.spct))
-autoplot(two_sensors.mspct, normalize = TRUE, unit.out = "photon")
-autoplot(two_sensors.mspct, normalize = TRUE, idfactor = "Spectra")
-autoplot(two_sensors.mspct, normalize = TRUE, facets = 2)
-autoplot(two_sensors.mspct, normalize = TRUE, geom = "spct")
+ "Coupled charge device" = ccd.spct)) |>
+ normalize()
+
+autoplot(two_sensors.mspct, unit.out = "photon")
+autoplot(two_sensors.mspct, idfactor = "Spectra")
+autoplot(two_sensors.mspct, facets = 2)
+autoplot(two_sensors.mspct, geom = "spct")
}
\seealso{
diff --git a/man/autoplot.source_spct.Rd b/man/autoplot.source_spct.Rd
index 188d6c10..0085f6cf 100644
--- a/man/autoplot.source_spct.Rd
+++ b/man/autoplot.source_spct.Rd
@@ -12,7 +12,7 @@
list(photobiologyWavebands::UVC(), photobiologyWavebands::UVB(),
photobiologyWavebands::UVA(), photobiologyWavebands::PhR())),
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.norm", default = "update"),
+ norm = NA,
unit.out = getOption("photobiology.radiation.unit", default = "energy"),
pc.out = getOption("ggspectra.pc.out", default = FALSE),
label.qty = NULL,
@@ -36,7 +36,7 @@
object,
...,
range = getOption("ggspectra.wlrange", default = NULL),
- norm = getOption("ggspectra.normalize", default = "update"),
+ norm = NA,
unit.out = getOption("photobiology.radiation.unit", default = "energy"),
pc.out = getOption("ggspectra.pc.out", default = FALSE),
idfactor = TRUE,
@@ -57,11 +57,8 @@ to the plot methods for individual spectra, otherwise currently ignored.}
\item{range}{an R object on which \code{range()} returns a vector of length
2, with minimum and maximum wavelengths (nm).}
-\item{norm}{numeric Normalization wavelength (nm) or character string
-\code{"max"}, or \code{"min"} for normalization at the corresponding
-wavelength, \code{"update"} to update the normalization after modifying
-units of expression, quantity or range but respecting the previously used
-criterion, or \code{"skip"} to force return of \code{object} unchanged.}
+\item{norm}{numeric No longer supported, normalization is always updated if
+present and a unit conversion applied.}
\item{unit.out}{character string indicating type of radiation units to use
for plotting: \code{"photon"} or its synonym \code{"quantum"}, or
@@ -191,16 +188,15 @@ If \code{idfactor = NULL}, the default for single spectra, the name of
autoplot(sun.spct)
autoplot(sun.spct, geom = "spct")
autoplot(sun.spct, unit.out = "photon")
-autoplot(sun.spct, norm = "max")
-autoplot(sun.spct, norm = "max", pc.out = TRUE)
+autoplot(normalize(sun.spct))
+autoplot(normalize(sun.spct), pc.out = TRUE)
# multiple spectra in long form
autoplot(sun_evening.spct)
autoplot(sun_evening.spct, facets = 1) # one column
autoplot(sun_evening.spct, facets = 2) # two columns
autoplot(sun_evening.spct, plot.data = "mean")
-# needs 'photobiology' (> 0.11.2)
-# autoplot(sun_evening.spct, idfactor = "Sequence")
+autoplot(sun_evening.spct, idfactor = "Sequence")
# multiple spectra as a collection
autoplot(sun_evening.mspct)
diff --git a/man/autoplot.waveband.Rd b/man/autoplot.waveband.Rd
index cab79e27..135c16cc 100644
--- a/man/autoplot.waveband.Rd
+++ b/man/autoplot.waveband.Rd
@@ -13,10 +13,11 @@
span = NULL,
wls.target = "HM",
unit.in = getOption("photobiology.radiation.unit", default = "energy"),
+ unit.out = unit.in,
annotations = NULL,
geom = "line",
wb.trim = TRUE,
- norm = NULL,
+ norm = NA,
text.size = 2.5,
ylim = c(NA, NA),
object.label = deparse(substitute(object)),
@@ -46,8 +47,8 @@ which wavelengths are to be searched and interpolated if need. The
as arguments. A list with \code{numeric} and/or \code{character} values is
also accepted.}
-\item{unit.in}{the type of unit we assume as reference "energy" or "photon"
-based.}
+\item{unit.in, unit.out}{the type of unit we assume as reference "energy" or
+"photon" based.}
\item{annotations}{a character vector. For details please see section Plot
Annotations.}
diff --git a/man/check_idfactor_arg.Rd b/man/check_idfactor_arg.Rd
new file mode 100644
index 00000000..1d548e9c
--- /dev/null
+++ b/man/check_idfactor_arg.Rd
@@ -0,0 +1,18 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/utils-internal.R
+\name{check_idfactor_arg}
+\alias{check_idfactor_arg}
+\title{Check idfactor argument and retrieve if needed}
+\usage{
+check_idfactor_arg(object, idfactor = NULL, default = FALSE)
+}
+\arguments{
+\item{object}{generic_spct object.}
+
+\item{idfactor}{character, NULL or NA The name of the factor identifying
+spectra when stored in long form.}
+}
+\description{
+Check idfactor argument and retrieve if needed
+}
+\keyword{internal}
diff --git a/man/duration2character.Rd b/man/duration2character.Rd
index e6270edb..f4144a84 100644
--- a/man/duration2character.Rd
+++ b/man/duration2character.Rd
@@ -1,20 +1,15 @@
% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/autoplot-source-spct.r,
-% R/axis-utils-source-spct.R
+% Please edit documentation in R/utils-internal.R
\name{duration2character}
\alias{duration2character}
\title{Convert lubridate duration objects to a string if possible}
\usage{
-duration2character(time.unit)
-
duration2character(time.unit)
}
\arguments{
\item{time.unit}{lubridate::duration object or character}
}
\description{
-Convert lubridate duration objects to a string if possible
-
Convert lubridate duration objects to a string if possible
}
\keyword{internal}
diff --git a/man/raw_plot.Rd b/man/raw_plot.Rd
index b45000ba..015701b9 100644
--- a/man/raw_plot.Rd
+++ b/man/raw_plot.Rd
@@ -14,7 +14,6 @@ raw_plot(
wls.target,
annotations,
geom,
- relative,
text.size,
idfactor,
facets,
diff --git a/man/rename_idfactor.Rd b/man/rename_idfactor.Rd
new file mode 100644
index 00000000..89a0e1d3
--- /dev/null
+++ b/man/rename_idfactor.Rd
@@ -0,0 +1,18 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/utils-internal.R
+\name{rename_idfactor}
+\alias{rename_idfactor}
+\title{Update idfactor name in object}
+\usage{
+rename_idfactor(object, idfactor)
+}
+\arguments{
+\item{object}{generic_spct object.}
+
+\item{idfactor}{character The name of the factor identifying spectra when
+stored in long form.}
+}
+\description{
+Update idfactor name in object
+}
+\keyword{internal}
diff --git a/man/scale_y_A_continuous.Rd b/man/scale_y_A_continuous.Rd
index 006fd7ee..2adffbd1 100644
--- a/man/scale_y_A_continuous.Rd
+++ b/man/scale_y_A_continuous.Rd
@@ -9,8 +9,8 @@
scale_y_A_continuous(
unit.exponent = 0,
name = A_label(unit.exponent = unit.exponent, format = format, label.text = label.text,
- scaled = scaled, normalized = round(normalized, 1), axis.symbols = axis.symbols,
- Tfr.type = Tfr.type),
+ scaled = scaled, normalized = ifelse(is.numeric(normalized), round(normalized, 1),
+ unique(normalized)), axis.symbols = axis.symbols, Tfr.type = Tfr.type),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = NULL,
@@ -24,8 +24,8 @@ scale_y_A_continuous(
scale_y_A_internal_continuous(
unit.exponent = 0,
name = A_label(unit.exponent = unit.exponent, format = format, label.text = label.text,
- scaled = scaled, normalized = round(normalized, 1), axis.symbols = axis.symbols,
- Tfr.type = "internal"),
+ scaled = scaled, normalized = ifelse(is.numeric(normalized), round(normalized, 1),
+ unique(normalized)), axis.symbols = axis.symbols, Tfr.type = "internal"),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = NULL,
@@ -38,8 +38,8 @@ scale_y_A_internal_continuous(
scale_y_A_total_continuous(
unit.exponent = 0,
name = A_label(unit.exponent = unit.exponent, format = format, label.text = label.text,
- scaled = scaled, normalized = round(normalized, 1), axis.symbols = axis.symbols,
- Tfr.type = "total"),
+ scaled = scaled, normalized = ifelse(is.numeric(normalized), round(normalized, 1),
+ unique(normalized)), axis.symbols = axis.symbols, Tfr.type = "total"),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = NULL,
@@ -102,4 +102,9 @@ ggplot(yellow_gel.spct, plot.qty = "absorbance") +
scale_y_A_total_continuous(axis.symbols = FALSE) +
scale_x_wl_continuous(axis.symbols = FALSE)
+ggplot(yellow_gel.spct, plot.qty = "absorbance") +
+ geom_line() +
+ scale_y_A_internal_continuous(normalized = "none") +
+ scale_x_wl_continuous()
+
}
diff --git a/man/scale_y_Rfr_continuous.Rd b/man/scale_y_Rfr_continuous.Rd
index fa371667..6d354cc3 100644
--- a/man/scale_y_Rfr_continuous.Rd
+++ b/man/scale_y_Rfr_continuous.Rd
@@ -9,8 +9,9 @@
scale_y_Rfr_continuous(
unit.exponent = ifelse(pc.out, -2, 0),
name = Rfr_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols, Rfr.type = Rfr.type),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols, Rfr.type =
+ Rfr.type),
labels = SI_pl_format(exponent = unit.exponent),
limits = c(0, 1),
format = getOption("photobiology.math", default = "R.expression"),
@@ -26,8 +27,9 @@ scale_y_Rfr_continuous(
scale_y_Rfr_specular_continuous(
unit.exponent = ifelse(pc.out, -2, 0),
name = Rfr_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols, Rfr.type = "specular"),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols, Rfr.type =
+ "specular"),
labels = SI_pl_format(exponent = unit.exponent),
limits = c(0, 1),
format = getOption("photobiology.math", default = "R.expression"),
@@ -42,8 +44,9 @@ scale_y_Rfr_specular_continuous(
scale_y_Rfr_total_continuous(
unit.exponent = ifelse(pc.out, -2, 0),
name = Rfr_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols, Rfr.type = "total"),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols, Rfr.type =
+ "total"),
labels = SI_pl_format(exponent = unit.exponent),
limits = c(0, 1),
format = getOption("photobiology.math", default = "R.expression"),
@@ -122,4 +125,10 @@ ggplot(Ler_leaf_rflt.spct) +
scale_y_Rfr_specular_continuous(axis.symbols = FALSE) +
scale_x_wl_continuous(axis.symbols = FALSE)
+ggplot(normalize(Ler_leaf_rflt.spct)) +
+ geom_line() +
+ scale_y_Rfr_continuous(Rfr.type = getRfrType(Ler_leaf_rflt.spct),
+ normalized = "max") +
+ scale_x_wl_continuous()
+
}
diff --git a/man/scale_y_Tfr_continuous.Rd b/man/scale_y_Tfr_continuous.Rd
index 836d863f..24291009 100644
--- a/man/scale_y_Tfr_continuous.Rd
+++ b/man/scale_y_Tfr_continuous.Rd
@@ -9,8 +9,9 @@
scale_y_Tfr_continuous(
unit.exponent = ifelse(pc.out, -2, 0),
name = Tfr_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols, Tfr.type = Tfr.type),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols, Tfr.type =
+ Tfr.type),
labels = SI_pl_format(exponent = unit.exponent),
limits = c(0, 1),
format = getOption("photobiology.math", default = "R.expression"),
@@ -26,8 +27,9 @@ scale_y_Tfr_continuous(
scale_y_Tfr_internal_continuous(
unit.exponent = ifelse(pc.out, -2, 0),
name = Tfr_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols, Tfr.type = "internal"),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols, Tfr.type =
+ "internal"),
labels = SI_pl_format(exponent = unit.exponent),
limits = c(0, 1),
format = getOption("photobiology.math", default = "R.expression"),
@@ -42,8 +44,9 @@ scale_y_Tfr_internal_continuous(
scale_y_Tfr_total_continuous(
unit.exponent = ifelse(pc.out, -2, 0),
name = Tfr_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols, Tfr.type = "total"),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols, Tfr.type =
+ "total"),
labels = SI_pl_format(exponent = unit.exponent),
limits = c(0, 1),
format = getOption("photobiology.math", default = "R.expression"),
@@ -124,6 +127,11 @@ ggplot(yellow_gel.spct) +
scale_y_Tfr_total_continuous(axis.symbols = FALSE) +
scale_x_wl_continuous(axis.symbols = FALSE)
+ggplot(normalize(yellow_gel.spct)) +
+ geom_line() +
+ scale_y_Tfr_total_continuous(normalized = "max") +
+ scale_x_wl_continuous()
+
unset_filter_qty_default()
}
diff --git a/man/scale_y_counts_continuous.Rd b/man/scale_y_counts_continuous.Rd
index 720c2cea..e4858beb 100644
--- a/man/scale_y_counts_continuous.Rd
+++ b/man/scale_y_counts_continuous.Rd
@@ -8,8 +8,8 @@
scale_y_counts_continuous(
unit.exponent = ifelse(normalized, 0, 3),
name = counts_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["counts"]],
@@ -22,7 +22,8 @@ scale_y_counts_continuous(
scale_y_counts_tg_continuous(
unit.exponent = ifelse(normalized, 0, 3),
name = counts_label(unit.exponent = 0, format = format, label.text = label.text, scaled
- = scaled, normalized = round(normalized, 1), axis.symbols = axis.symbols),
+ = scaled, normalized = ifelse(is.numeric(normalized), round(normalized, 1),
+ unique(normalized)), axis.symbols = axis.symbols),
labels = SI_tg_format(exponent = unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["counts"]],
@@ -84,16 +85,11 @@ ggplot(white_led.raw_spct) +
scale_y_counts_tg_continuous(unit.exponent = 0) +
scale_x_wl_continuous()
-norm_led.raw_spct <- normalize(white_led.raw_spct[ , 1:2], norm = "max")
+norm_led.raw_spct <- normalize(white_led.raw_spct, norm = "max")
ggplot(norm_led.raw_spct) +
geom_line() +
- scale_y_counts_continuous(normalized = getNormalized(norm_led.raw_spct)) +
- scale_x_wl_continuous()
-
-ggplot(norm_led.raw_spct) +
- geom_line() +
- scale_y_counts_tg_continuous(normalized = getNormalized(norm_led.raw_spct)) +
+ scale_y_counts_continuous(unit.exponent = 0, normalized = "max") +
scale_x_wl_continuous()
}
diff --git a/man/scale_y_cps_continuous.Rd b/man/scale_y_cps_continuous.Rd
index 8af69606..dd6298ff 100644
--- a/man/scale_y_cps_continuous.Rd
+++ b/man/scale_y_cps_continuous.Rd
@@ -7,8 +7,8 @@
scale_y_cps_continuous(
unit.exponent = 0,
name = cps_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["cps"]],
@@ -66,9 +66,20 @@ ggplot(white_led.cps_spct * 1e-4) +
norm_led.cps_spct <- normalize(white_led.cps_spct, norm = "max")
+ggplot(norm_led.cps_spct) +
+ geom_line() +
+ scale_y_cps_continuous(normalized = is_normalized(norm_led.cps_spct)) +
+ scale_x_wl_continuous()
+
ggplot(norm_led.cps_spct) +
geom_line() +
scale_y_cps_continuous(normalized = getNormalized(norm_led.cps_spct)) +
scale_x_wl_continuous()
+ggplot(norm_led.cps_spct) +
+ geom_line() +
+ scale_y_cps_continuous(normalized =
+ normalization(norm_led.cps_spct)$norm.type) +
+ scale_x_wl_continuous()
+
}
diff --git a/man/scale_y_multipliers_continuous.Rd b/man/scale_y_multipliers_continuous.Rd
index 015fcc46..665b5dbc 100644
--- a/man/scale_y_multipliers_continuous.Rd
+++ b/man/scale_y_multipliers_continuous.Rd
@@ -7,8 +7,8 @@
scale_y_multipliers_continuous(
unit.exponent = 0,
name = multipliers_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["e.mult"]],
diff --git a/man/scale_y_s.e.irrad_continuous.Rd b/man/scale_y_s.e.irrad_continuous.Rd
index e9a1520b..23f2787d 100644
--- a/man/scale_y_s.e.irrad_continuous.Rd
+++ b/man/scale_y_s.e.irrad_continuous.Rd
@@ -10,8 +10,8 @@
scale_y_s.e.irrad_continuous(
unit.exponent = 0,
name = s.e.irrad_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["s.e.irrad"]],
@@ -24,8 +24,8 @@ scale_y_s.e.irrad_continuous(
scale_y_s.q.irrad_continuous(
unit.exponent = ifelse(normalized, 0, -6),
name = s.q.irrad_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["s.q.irrad"]],
@@ -38,8 +38,8 @@ scale_y_s.q.irrad_continuous(
scale_y_s.e.irrad_log10(
unit.exponent = 0,
name = s.e.irrad_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["s.e.irrad"]],
@@ -52,8 +52,8 @@ scale_y_s.e.irrad_log10(
scale_y_s.q.irrad_log10(
unit.exponent = ifelse(normalized, 0, -6),
name = s.q.irrad_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["s.q.irrad"]],
@@ -131,11 +131,17 @@ ggplot(clip_wl(sun.spct, c(295, NA)),
scale_x_wl_continuous()
photon_as_default()
-normalized_sun.spct <- normalize(sun.spct)
+normalized_sun.spct <- normalize(e2q(sun.spct, action = "replace"))
ggplot(normalized_sun.spct) +
geom_line(na.rm = TRUE) +
scale_y_s.q.irrad_continuous(normalized =
- getNormalized(normalized_sun.spct)) +
+ normalization(normalized_sun.spct)$norm.wl) +
+ scale_x_wl_continuous()
+
+ggplot(normalized_sun.spct) +
+ geom_line(na.rm = TRUE) +
+ scale_y_s.q.irrad_continuous(normalized =
+ normalization(normalized_sun.spct)$norm.type) +
scale_x_wl_continuous()
unset_radiation_unit_default()
diff --git a/man/scale_y_s.e.response_continuous.Rd b/man/scale_y_s.e.response_continuous.Rd
index caed6a58..1cb7dec7 100644
--- a/man/scale_y_s.e.response_continuous.Rd
+++ b/man/scale_y_s.e.response_continuous.Rd
@@ -10,8 +10,8 @@
scale_y_s.e.response_continuous(
unit.exponent = 0,
name = s.e.response_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = -unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["s.e.response"]],
@@ -24,8 +24,8 @@ scale_y_s.e.response_continuous(
scale_y_s.q.response_continuous(
unit.exponent = 0,
name = s.q.response_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = -unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["s.q.response"]],
@@ -38,8 +38,8 @@ scale_y_s.q.response_continuous(
scale_y_s.e.action_continuous(
unit.exponent = 0,
name = s.e.action_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = -unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["s.e.action"]],
@@ -52,8 +52,8 @@ scale_y_s.e.action_continuous(
scale_y_s.q.action_continuous(
unit.exponent = 0,
name = s.q.action_label(unit.exponent = unit.exponent, format = format, label.text =
- label.text, scaled = scaled, normalized = round(normalized, 1), axis.symbols =
- axis.symbols),
+ label.text, scaled = scaled, normalized = ifelse(is.numeric(normalized),
+ round(normalized, 1), unique(normalized)), axis.symbols = axis.symbols),
labels = SI_pl_format(exponent = -unit.exponent),
format = getOption("photobiology.math", default = "R.expression"),
label.text = axis_labels()[["s.q.action"]],
@@ -125,6 +125,12 @@ ggplot(norm_ccd.spct) +
scale_y_s.e.response_continuous(normalized = getNormalized(norm_ccd.spct)) +
scale_x_wl_continuous()
+ggplot(norm_ccd.spct) +
+ geom_line() +
+ scale_y_s.e.response_continuous(normalized =
+ normalization(norm_ccd.spct)$norm.type) +
+ scale_x_wl_continuous()
+
photon_as_default()
norm_ccd.spct <- normalize(ccd.spct, norm = "max")
diff --git a/man/validate_idfactor.Rd b/man/validate_idfactor.Rd
deleted file mode 100644
index dd9c6fba..00000000
--- a/man/validate_idfactor.Rd
+++ /dev/null
@@ -1,17 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/autoplot-utils.R
-\name{validate_idfactor}
-\alias{validate_idfactor}
-\title{Validate idfactor}
-\usage{
-validate_idfactor(idfactor)
-}
-\arguments{
-\item{idfactor}{character, logical, NULL or NA. If a \code{character} string,
-it is validated as an R name, while logical values, NULL and NA are
-returned unchanged.}
-}
-\description{
-Validate idfactor
-}
-\keyword{internal}
diff --git a/man/warn_norm_arg.Rd b/man/warn_norm_arg.Rd
new file mode 100644
index 00000000..2c921910
--- /dev/null
+++ b/man/warn_norm_arg.Rd
@@ -0,0 +1,16 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/utils-internal.R
+\name{warn_norm_arg}
+\alias{warn_norm_arg}
+\title{Warn if norm argument passed in call}
+\usage{
+warn_norm_arg(norm)
+}
+\arguments{
+\item{norm}{numeric or character No longer supported, normalization is always
+updated in \code{autoplot()} if present and a unit conversion applied.}
+}
+\description{
+Warn if norm argument passed in call
+}
+\keyword{internal}
diff --git a/tests/testthat/_snaps/plot-methods/cps-default.svg b/tests/testthat/_snaps/autoplot-cps-spct/cps-default.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/cps-default.svg
rename to tests/testthat/_snaps/autoplot-cps-spct/cps-default.svg
diff --git a/tests/testthat/_snaps/plot-methods/cps-minus-annotations.svg b/tests/testthat/_snaps/autoplot-cps-spct/cps-minus-annotations.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/cps-minus-annotations.svg
rename to tests/testthat/_snaps/autoplot-cps-spct/cps-minus-annotations.svg
diff --git a/tests/testthat/_snaps/plot-methods/cps-no-annotations.svg b/tests/testthat/_snaps/autoplot-cps-spct/cps-no-annotations.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/cps-no-annotations.svg
rename to tests/testthat/_snaps/autoplot-cps-spct/cps-no-annotations.svg
diff --git a/tests/testthat/_snaps/plot-methods/cps-plus-annotations.svg b/tests/testthat/_snaps/autoplot-cps-spct/cps-plus-annotations.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/cps-plus-annotations.svg
rename to tests/testthat/_snaps/autoplot-cps-spct/cps-plus-annotations.svg
diff --git a/tests/testthat/_snaps/plot-methods/cps-range-num.svg b/tests/testthat/_snaps/autoplot-cps-spct/cps-range-num.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/cps-range-num.svg
rename to tests/testthat/_snaps/autoplot-cps-spct/cps-range-num.svg
diff --git a/tests/testthat/_snaps/plot-methods/cps-range-wb.svg b/tests/testthat/_snaps/autoplot-cps-spct/cps-range-wb.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/cps-range-wb.svg
rename to tests/testthat/_snaps/autoplot-cps-spct/cps-range-wb.svg
diff --git a/tests/testthat/_snaps/plot-methods/cps-reserve-space.svg b/tests/testthat/_snaps/autoplot-cps-spct/cps-reserve-space.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/cps-reserve-space.svg
rename to tests/testthat/_snaps/autoplot-cps-spct/cps-reserve-space.svg
diff --git a/tests/testthat/_snaps/plot-methods/cps-ylim1.svg b/tests/testthat/_snaps/autoplot-cps-spct/cps-ylim1.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/cps-ylim1.svg
rename to tests/testthat/_snaps/autoplot-cps-spct/cps-ylim1.svg
diff --git a/tests/testthat/_snaps/plot-methods/cps-ylim2.svg b/tests/testthat/_snaps/autoplot-cps-spct/cps-ylim2.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/cps-ylim2.svg
rename to tests/testthat/_snaps/autoplot-cps-spct/cps-ylim2.svg
diff --git a/tests/testthat/_snaps/autoplot-filter-spct/filter-default-a-normalized.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-a-normalized.svg
new file mode 100644
index 00000000..9fad2a2a
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-a-normalized.svg
@@ -0,0 +1,215 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+300
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVB
+0.06
+UVA
+0.29
+PhR
+0.62
+C
+o
+n
+t
+r
+i
+b
+u
+t
+i
+o
+n
+
+
+t
+o
+
+
+t
+o
+t
+a
+l
+A
+
+
+(
+/1
+)
+
+
+
+0.0
+0.2
+0.4
+0.6
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+Internal
+
+
+s
+p
+e
+c
+t
+r
+a
+l
+
+
+a
+b
+s
+o
+r
+b
+a
+n
+c
+e
+
+
+A
+Îğ
+int
+
+A
+Îğ
+=
+250
+int
+
+
+(
+rel.
+)
+filter-default-a-normalized
+
+
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-a-scaled.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-a-scaled.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-a-scaled.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-a-scaled.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-a-ylim.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-a-ylim.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-a-ylim.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-a-ylim.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-a.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-a.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-a.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-a.svg
diff --git a/tests/testthat/_snaps/autoplot-filter-spct/filter-default-a2t.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-a2t.svg
new file mode 100644
index 00000000..b8c49722
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-a2t.svg
@@ -0,0 +1,192 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVB
+0.00204
+UVA
+0.00753
+PhR
+0.0703
+T
+Îğ
+i
+n
+t
+
+(
+/1
+)
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+Internal
+
+
+s
+p
+e
+c
+t
+r
+a
+l
+
+
+t
+r
+a
+n
+s
+m
+i
+t
+t
+a
+n
+c
+e
+
+
+T
+Îğ
+int
+
+
+(
+/1
+)
+filter-default-a2t
+
+
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-apt-ylim.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-apt-ylim.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-apt-ylim.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-apt-ylim.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-apt.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-apt.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-apt.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-apt.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-mean-a.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-apt2a.svg
similarity index 91%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-mean-a.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-apt2a.svg
index a96baf58..a2284062 100644
--- a/tests/testthat/_snaps/plot-methods/filter-mspct-mean-a.svg
+++ b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-apt2a.svg
@@ -27,7 +27,7 @@
-
+
@@ -100,13 +100,13 @@
]UVC
-5
+4.85
UVB
-3
+2.85
UVA
-2.34
+2.19
PhR
-1.48
+1.33
A
Îğ
i
@@ -121,13 +121,13 @@
0
-2
-4
-6
+2
+4
+6
-
-
-
+
+
+
@@ -181,6 +181,6 @@
A
U
)
-filter-mspct-mean-A
+filter-default-apt2a
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-norm-max.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-apt2t.svg
similarity index 73%
rename from tests/testthat/_snaps/plot-methods/filter-default-norm-max.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-apt2t.svg
index 5e8df3e8..f1188a3f 100644
--- a/tests/testthat/_snaps/plot-methods/filter-default-norm-max.svg
+++ b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-apt2t.svg
@@ -27,7 +27,7 @@
-
+
@@ -100,42 +100,22 @@
]UVC
-0.00
+4.91e-05
UVB
-0.00
+0.00156
UVA
-0.00
+0.00753
PhR
-0.14
-C
-o
-n
-t
-r
-i
-b
-u
-t
-i
-o
-n
-
-
-t
-o
-
-
-t
-o
-t
-a
-l
-T
-
-
-(
-/1
-)
+0.0703
+T
+Îğ
+i
+n
+t
+
+(
+/1
+)
@@ -168,48 +148,42 @@
n
m
)
-Internal
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-t
-r
-a
-n
-s
-m
-i
-t
-t
-a
-n
-c
-e
-
-
-T
-Îğ
-int
-
-T
-Îğ
-=
-765.2
-int
-
-
-(
-rel.
-)
-filter-default-norm-max
+Internal
+
+
+s
+p
+e
+c
+t
+r
+a
+l
+
+
+t
+r
+a
+n
+s
+m
+i
+t
+t
+a
+n
+c
+e
+
+
+T
+Îğ
+int
+
+
+(
+/1
+)
+filter-default-apt2t
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-normalized.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-normalized.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-normalized.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-normalized.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-pc-out-apt.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-pc-out-apt.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-pc-out-apt.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-pc-out-apt.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-pc-out-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-pc-out-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-pc-out-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-pc-out-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-pc-out-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-pc-out-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-pc-out-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-pc-out-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-pc-out.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-pc-out.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-pc-out.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-pc-out.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-scaled.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-scaled.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-scaled.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-scaled.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-tfr-ylim.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-tfr-ylim.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-tfr-ylim.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-tfr-ylim.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-tot-normalized.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-tot-normalized.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-tot-normalized.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-tot-normalized.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-tot-scaled.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-tot-scaled.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-tot-scaled.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-tot-scaled.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-tot-ylim.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-tot-ylim.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-tot-ylim.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-tot-ylim.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-a-default-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-tot2a.svg
similarity index 96%
rename from tests/testthat/_snaps/plot-methods/object-as-filter-a-default-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-tot2a.svg
index ed73296e..8b968e3e 100644
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-a-default-tot.svg
+++ b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-tot2a.svg
@@ -27,7 +27,7 @@
-
+
@@ -181,6 +181,6 @@
A
U
)
-object-as-filter-a-default-tot
+filter-default-tot2a
diff --git a/tests/testthat/_snaps/plot-methods/filter-default-ylim.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default-ylim.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default-ylim.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default-ylim.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-default.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-default.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-default.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-default.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-label-average-a.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-label-average-a.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-label-average-a.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-label-average-a.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-label-average-apt.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-label-average-apt.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-label-average-apt.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-label-average-apt.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-label-average-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-label-average-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-label-average-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-label-average-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-label-average-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-label-average-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-label-average-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-label-average-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-label-average.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-label-average.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-label-average.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-label-average.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-label-mean-a.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-label-mean-a.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-label-mean-a.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-label-mean-a.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-label-mean-apt.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-label-mean-apt.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-label-mean-apt.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-label-mean-apt.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-label-mean-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-label-mean-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-label-mean-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-label-mean-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-label-mean-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-label-mean-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-label-mean-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-label-mean-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-label-mean.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-label-mean.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-label-mean.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-label-mean.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-minus-annotations-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-minus-annotations-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-minus-annotations-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-minus-annotations-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-minus-boxes-a.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-minus-boxes-a.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-minus-boxes-a.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-minus-boxes-a.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-minus-boxes-apt.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-minus-boxes-apt.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-minus-boxes-apt.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-minus-boxes-apt.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-minus-boxes-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-minus-boxes-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-minus-boxes-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-minus-boxes-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-minus-boxes.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-minus-boxes.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-minus-boxes.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-minus-boxes.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-minus-summaries-a.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-minus-summaries-a.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-minus-summaries-a.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-minus-summaries-a.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-minus-summaries-q.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-minus-summaries-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-minus-summaries-q.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-minus-summaries-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-minus-summaries-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-minus-summaries-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-minus-summaries-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-minus-summaries-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-minus-summaries.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-minus-summaries.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-minus-summaries.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-minus-summaries.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-default-a.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-default-a.svg
similarity index 51%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-default-a.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-default-a.svg
index ea17a9d1..9bf19d81 100644
--- a/tests/testthat/_snaps/plot-methods/filter-mspct-default-a.svg
+++ b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-default-a.svg
@@ -21,212 +21,220 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-431.8
-431.8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-PhR
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+750
+750
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+PhR
-0
-1
-2
-3
-
-
-
-
-
-
-
-
-
-
-
-
-400
-450
-500
-550
-600
-650
-700
-750
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Internal
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-b
-a
-n
-c
-e
-
-
-A
-Îğ
-int
-
-
-(
-A
-U
-)
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+
+
+
+
+
+
+
+
+400
+450
+500
+550
+600
+650
+700
+750
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+Internal
+
+
+s
+p
+e
+c
+t
+r
+a
+l
+
+
+t
+r
+a
+n
+s
+m
+i
+t
+t
+a
+n
+c
+e
+
+
+T
+Îğ
+int
+
+
+(
+/1
+)
spct.idx
@@ -235,6 +243,6 @@
one
half
-filter-mspct-default-A
+filter-mspct-default-A
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-default-afr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-default-afr.svg
similarity index 53%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-default-afr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-default-afr.svg
index 81d23442..5a994141 100644
--- a/tests/testthat/_snaps/plot-methods/filter-mspct-default-afr.svg
+++ b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-default-afr.svg
@@ -18,217 +18,223 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-431.8
-431.8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-PhR
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+750
+750
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+PhR
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-
-
-400
-450
-500
-550
-600
-650
-700
-750
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-p
-t
-a
-n
-c
-e
-
-
-A
-Îğ
-
-
-(
-/1
-)
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+
+
+
+
+
+
+
+
+400
+450
+500
+550
+600
+650
+700
+750
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+Internal
+
+
+s
+p
+e
+c
+t
+r
+a
+l
+
+
+t
+r
+a
+n
+s
+m
+i
+t
+t
+a
+n
+c
+e
+
+
+T
+Îğ
+int
+
+
+(
+/1
+)
spct.idx
@@ -237,6 +243,6 @@
one
half
-filter-mspct-default-Afr
+filter-mspct-default-Afr
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-default-range.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-default-range.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-default-range.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-default-range.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-default-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-default-tfr.svg
similarity index 61%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-default-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-default-tfr.svg
index a80addb2..b2ecb4a4 100644
--- a/tests/testthat/_snaps/plot-methods/filter-mspct-default-tfr.svg
+++ b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-default-tfr.svg
@@ -33,101 +33,137 @@
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-UVB
-UVA
-PhR
+
+
+
+
+
+
+
+
+
+
+750
+750
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+PhR
0.00
@@ -140,18 +176,22 @@
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
+
+
+
+
+
+
+
+
+400
+450
+500
+550
+600
+650
+700
+750
Wavelength,
Îğ
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-default-ylim.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-default-ylim.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-default-ylim.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-default-ylim.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-default.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-default.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-default.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-default.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-filter-tfr-default-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-mean-a.svg
similarity index 54%
rename from tests/testthat/_snaps/plot-methods/object-filter-tfr-default-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-mean-a.svg
index 8cd37a58..1421ca5a 100644
--- a/tests/testthat/_snaps/plot-methods/object-filter-tfr-default-tot.svg
+++ b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-mean-a.svg
@@ -18,174 +18,172 @@
-
+
-
-
+
+
-
-
-
-850
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-4.73e-05
-UVB
-0.0015
-UVA
-0.00724
-PhR
-0.0623
-T
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+3.68e-05
+UVB
+0.00117
+UVA
+0.00565
+PhR
+0.0527
+T
+Îğ
+i
+n
+t
+
+(
+/1
+)
+
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-t
-r
-a
-n
-s
-m
-i
-t
-t
-a
-n
-c
-e
-
-
-T
-Îğ
-tot
-
-
-(
-/1
-)
-object-filter-tfr-default-tot
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+Internal
+
+
+s
+p
+e
+c
+t
+r
+a
+l
+
+
+t
+r
+a
+n
+s
+m
+i
+t
+t
+a
+n
+c
+e
+
+
+T
+Îğ
+int
+
+
+(
+/1
+)
+filter-mspct-mean-A
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-text-size-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-mean-afr.svg
similarity index 52%
rename from tests/testthat/_snaps/plot-methods/object-as-filter-tfr-text-size-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-mean-afr.svg
index 6cd85469..326dd60a 100644
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-text-size-tot.svg
+++ b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-mean-afr.svg
@@ -18,174 +18,172 @@
-
+
-
-
+
+
-
-
-
-850
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-4.73e-05
-UVB
-0.0015
-UVA
-0.00724
-PhR
-0.0623
-T
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+3.68e-05
+UVB
+0.00117
+UVA
+0.00565
+PhR
+0.0527
+T
+Îğ
+i
+n
+t
+
+(
+/1
+)
+
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-t
-r
-a
-n
-s
-m
-i
-t
-t
-a
-n
-c
-e
-
-
-T
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-filter-tfr-text-size-tot
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+Internal
+
+
+s
+p
+e
+c
+t
+r
+a
+l
+
+
+t
+r
+a
+n
+s
+m
+i
+t
+t
+a
+n
+c
+e
+
+
+T
+Îğ
+int
+
+
+(
+/1
+)
+filter-mspct-mean-Afr
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-mean-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-mean-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-mean-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-mean-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-mean.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-mean.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-mean.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-mean.svg
diff --git a/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-median-a.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-median-a.svg
new file mode 100644
index 00000000..9ffe7367
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-median-a.svg
@@ -0,0 +1,189 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+3.68e-05
+UVB
+0.00117
+UVA
+0.00565
+PhR
+0.0527
+T
+Îğ
+i
+n
+t
+
+(
+/1
+)
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+Internal
+
+
+s
+p
+e
+c
+t
+r
+a
+l
+
+
+t
+r
+a
+n
+s
+m
+i
+t
+t
+a
+n
+c
+e
+
+
+T
+Îğ
+int
+
+
+(
+/1
+)
+filter-mspct-median-A
+
+
diff --git a/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-median-afr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-median-afr.svg
new file mode 100644
index 00000000..e6e999c2
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-median-afr.svg
@@ -0,0 +1,189 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+3.68e-05
+UVB
+0.00117
+UVA
+0.00565
+PhR
+0.0527
+T
+Îğ
+i
+n
+t
+
+(
+/1
+)
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+Internal
+
+
+s
+p
+e
+c
+t
+r
+a
+l
+
+
+t
+r
+a
+n
+s
+m
+i
+t
+t
+a
+n
+c
+e
+
+
+T
+Îğ
+int
+
+
+(
+/1
+)
+filter-mspct-median-Afr
+
+
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-median-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-median-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-median-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-median-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-median.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-median.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-median.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-median.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-no-annotations.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-no-annotations.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-no-annotations.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-no-annotations.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-reserve-space.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-reserve-space.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-reserve-space.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-reserve-space.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-se-ylab.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-se-ylab.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-se-ylab.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-se-ylab.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-se.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-se.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-se.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-se.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-sum.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-sum.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-sum.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-sum.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-var-ylab.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-var-ylab.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-var-ylab.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-var-ylab.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-var.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-var.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-mspct-var.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-mspct-var.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-no-annotations-a.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-no-annotations-a.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-no-annotations-a.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-no-annotations-a.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-no-annotations-apt.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-no-annotations-apt.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-no-annotations-apt.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-no-annotations-apt.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-no-annotations-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-no-annotations-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-no-annotations-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-no-annotations-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-no-annotations-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-no-annotations-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-no-annotations-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-no-annotations-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-no-annotations.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-no-annotations.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-no-annotations.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-no-annotations.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-plus-annotations-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-plus-annotations-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-plus-annotations-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-plus-annotations-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-plus-boundaries-a.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-plus-boundaries-a.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-plus-boundaries-a.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-plus-boundaries-a.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-plus-boundaries-apt.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-plus-boundaries-apt.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-plus-boundaries-apt.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-plus-boundaries-apt.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-plus-boundaries-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-plus-boundaries-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-plus-boundaries-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-plus-boundaries-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-plus-boundaries.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-plus-boundaries.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-plus-boundaries.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-plus-boundaries.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-plus-segments-a.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-plus-segments-a.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-plus-segments-a.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-plus-segments-a.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-plus-segments-apt.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-plus-segments-apt.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-plus-segments-apt.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-plus-segments-apt.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-plus-segments-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-plus-segments-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-plus-segments-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-plus-segments-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-plus-segments.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-plus-segments.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-plus-segments.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-plus-segments.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-range-num-apt.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-range-num-apt.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-range-num-apt.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-range-num-apt.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-range-num-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-range-num-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-range-num-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-range-num-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-range-num-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-range-num-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-range-num-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-range-num-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-range-num.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-range-num.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-range-num.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-range-num.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-range-wb-a.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-range-wb-a.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-range-wb-a.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-range-wb-a.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-range-wb-apt.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-range-wb-apt.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-range-wb-apt.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-range-wb-apt.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-range-wb-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-range-wb-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-range-wb-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-range-wb-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-range-wb-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-range-wb-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-range-wb-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-range-wb-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-range-wb.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-range-wb.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-range-wb.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-range-wb.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-reserve-space.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-reserve-space.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-reserve-space.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-reserve-space.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-span-31-a.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-span-31-a.svg
similarity index 98%
rename from tests/testthat/_snaps/plot-methods/filter-span-31-a.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-span-31-a.svg
index f3e45ee7..47480f71 100644
--- a/tests/testthat/_snaps/plot-methods/filter-span-31-a.svg
+++ b/tests/testthat/_snaps/autoplot-filter-spct/filter-span-31-a.svg
@@ -28,7 +28,9 @@
+431.8
674.2
+
diff --git a/tests/testthat/_snaps/plot-methods/filter-span-31-apt.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-span-31-apt.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-span-31-apt.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-span-31-apt.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-span-31-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-span-31-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-span-31-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-span-31-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-span-31-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-span-31-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-span-31-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-span-31-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-span-31.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-span-31.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-span-31.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-span-31.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-text-size-a.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-text-size-a.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-text-size-a.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-text-size-a.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-text-size-apt.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-text-size-apt.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-text-size-apt.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-text-size-apt.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-text-size-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-text-size-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-text-size-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-text-size-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-text-size-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-text-size-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-text-size-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-text-size-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-text-size.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-text-size.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-text-size.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-text-size.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-wb-vis-a.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-wb-vis-a.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-wb-vis-a.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-wb-vis-a.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-wb-vis-apt.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-wb-vis-apt.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-wb-vis-apt.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-wb-vis-apt.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-wb-vis-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-wb-vis-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-wb-vis-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-wb-vis-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-wb-vis-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-wb-vis-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-wb-vis-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-wb-vis-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/filter-wb-vis.svg b/tests/testthat/_snaps/autoplot-filter-spct/filter-wb-vis.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/filter-wb-vis.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/filter-wb-vis.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-default-pc-out-stk.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-default-pc-out-stk.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-default-pc-out-stk.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-default-pc-out-stk.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-default-pc-out-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-default-pc-out-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-default-pc-out-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-default-pc-out-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-default-stk-ylim.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-default-stk-ylim.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-default-stk-ylim.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-default-stk-ylim.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-default-stk.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-default-stk.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-default-stk.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-default-stk.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-default-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-default-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-default-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-default-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-minus-guide-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-minus-guide-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-minus-guide-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-minus-guide-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-minus-labels-stk.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-minus-labels-stk.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-minus-labels-stk.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-minus-labels-stk.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-minus-peaks-stk.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-minus-peaks-stk.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-minus-peaks-stk.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-minus-peaks-stk.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-no-annotations-stk.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-no-annotations-stk.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-no-annotations-stk.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-no-annotations-stk.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-no-annotations-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-no-annotations-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-no-annotations-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-no-annotations-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-peaks-valleys-stk.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-peaks-valleys-stk.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-peaks-valleys-stk.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-peaks-valleys-stk.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-plus-segments-stk.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-plus-segments-stk.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-plus-segments-stk.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-plus-segments-stk.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-plus-segments-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-plus-segments-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-plus-segments-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-plus-segments-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-plus-valleys-stk.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-plus-valleys-stk.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-plus-valleys-stk.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-plus-valleys-stk.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-range-num-stk.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-range-num-stk.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-range-num-stk.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-range-num-stk.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-range-num-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-range-num-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-range-num-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-range-num-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-range-wb-stk.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-range-wb-stk.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-range-wb-stk.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-range-wb-stk.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-range-wb-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-range-wb-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-range-wb-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-range-wb-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-reserve-space-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-reserve-space-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-reserve-space-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-reserve-space-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-text-size-stk.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-text-size-stk.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-text-size-stk.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-text-size-stk.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-text-size-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-text-size-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-text-size-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-text-size-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-wb-vis-stk.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-wb-vis-stk.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-wb-vis-stk.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-wb-vis-stk.svg
diff --git a/tests/testthat/_snaps/plot-methods/object-wb-vis-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/object-wb-vis-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/object-wb-vis-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/object-wb-vis-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-default-pc-out-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-default-pc-out-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-default-pc-out-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-default-pc-out-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-default-tot-norm-max.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-default-tot-normalized-759.svg
similarity index 98%
rename from tests/testthat/_snaps/plot-methods/reflector-default-tot-norm-max.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-default-tot-normalized-759.svg
index e2632c91..9d6d9271 100644
--- a/tests/testthat/_snaps/plot-methods/reflector-default-tot-norm-max.svg
+++ b/tests/testthat/_snaps/autoplot-filter-spct/reflector-default-tot-normalized-759.svg
@@ -27,7 +27,7 @@
-
+
759.1
@@ -210,6 +210,6 @@
(
rel.
)
-reflector-default-tot-norm-max
+reflector-default-tot-normalized-759
diff --git a/tests/testthat/_snaps/plot-methods/reflector-default-tot-normalized.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-default-tot-normalized.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-default-tot-normalized.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-default-tot-normalized.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-default-tot-scaled.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-default-tot-scaled.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-default-tot-scaled.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-default-tot-scaled.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-default-tot-ylim.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-default-tot-ylim.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-default-tot-ylim.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-default-tot-ylim.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-default-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-default-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-default-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-default-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-label-average-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-label-average-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-label-average-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-label-average-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-label-mean-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-label-mean-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-label-mean-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-label-mean-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-minus-annotations-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-minus-annotations-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-minus-annotations-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-minus-annotations-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-mspct-default-range.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-default-range.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-mspct-default-range.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-default-range.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-mspct-default.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-default.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-mspct-default.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-default.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-mspct-mean-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-mean-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-mspct-mean-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-mean-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-mspct-mean.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-mean.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-mspct-mean.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-mean.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-mspct-median-tfr.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-median-tfr.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-mspct-median-tfr.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-median-tfr.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-mspct-median.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-median.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-mspct-median.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-median.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-mspct-no-annotations.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-no-annotations.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-mspct-no-annotations.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-no-annotations.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-mspct-reserve-space.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-reserve-space.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-mspct-reserve-space.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-reserve-space.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-mspct-se-ylab.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-se-ylab.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-mspct-se-ylab.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-se-ylab.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-mspct-se.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-se.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-mspct-se.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-se.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-mspct-sum.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-sum.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-mspct-sum.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-sum.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-mspct-var-ylab.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-var-ylab.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-mspct-var-ylab.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-var-ylab.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-mspct-var.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-var.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-mspct-var.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-mspct-var.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-no-annotations-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-no-annotations-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-no-annotations-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-no-annotations-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-plus-annotations-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-plus-annotations-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-plus-annotations-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-plus-annotations-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-range-num-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-range-num-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-range-num-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-range-num-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-range-wb-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-range-wb-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-range-wb-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-range-wb-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-span-31-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-span-31-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-span-31-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-span-31-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-text-size-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-text-size-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-text-size-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-text-size-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/reflector-wb-vis-tot.svg b/tests/testthat/_snaps/autoplot-filter-spct/reflector-wb-vis-tot.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/reflector-wb-vis-tot.svg
rename to tests/testthat/_snaps/autoplot-filter-spct/reflector-wb-vis-tot.svg
diff --git a/tests/testthat/_snaps/plot-methods/raw-default.svg b/tests/testthat/_snaps/autoplot-raw-spct/raw-default.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/raw-default.svg
rename to tests/testthat/_snaps/autoplot-raw-spct/raw-default.svg
diff --git a/tests/testthat/_snaps/plot-methods/raw-minus-annotations.svg b/tests/testthat/_snaps/autoplot-raw-spct/raw-minus-annotations.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/raw-minus-annotations.svg
rename to tests/testthat/_snaps/autoplot-raw-spct/raw-minus-annotations.svg
diff --git a/tests/testthat/_snaps/plot-methods/raw-no-annotations.svg b/tests/testthat/_snaps/autoplot-raw-spct/raw-no-annotations.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/raw-no-annotations.svg
rename to tests/testthat/_snaps/autoplot-raw-spct/raw-no-annotations.svg
diff --git a/tests/testthat/_snaps/plot-methods/raw-plus-annotations.svg b/tests/testthat/_snaps/autoplot-raw-spct/raw-plus-annotations.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/raw-plus-annotations.svg
rename to tests/testthat/_snaps/autoplot-raw-spct/raw-plus-annotations.svg
diff --git a/tests/testthat/_snaps/plot-methods/raw-range-num.svg b/tests/testthat/_snaps/autoplot-raw-spct/raw-range-num.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/raw-range-num.svg
rename to tests/testthat/_snaps/autoplot-raw-spct/raw-range-num.svg
diff --git a/tests/testthat/_snaps/plot-methods/raw-range-wb.svg b/tests/testthat/_snaps/autoplot-raw-spct/raw-range-wb.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/raw-range-wb.svg
rename to tests/testthat/_snaps/autoplot-raw-spct/raw-range-wb.svg
diff --git a/tests/testthat/_snaps/plot-methods/raw-reserve-space.svg b/tests/testthat/_snaps/autoplot-raw-spct/raw-reserve-space.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/raw-reserve-space.svg
rename to tests/testthat/_snaps/autoplot-raw-spct/raw-reserve-space.svg
diff --git a/tests/testthat/_snaps/plot-methods/raw-ylim1.svg b/tests/testthat/_snaps/autoplot-raw-spct/raw-ylim1.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/raw-ylim1.svg
rename to tests/testthat/_snaps/autoplot-raw-spct/raw-ylim1.svg
diff --git a/tests/testthat/_snaps/plot-methods/raw-ylim2.svg b/tests/testthat/_snaps/autoplot-raw-spct/raw-ylim2.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/raw-ylim2.svg
rename to tests/testthat/_snaps/autoplot-raw-spct/raw-ylim2.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-day-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-day-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-day-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-day-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-day.svg b/tests/testthat/_snaps/autoplot-response-spct/response-day.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-day.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-day.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-days-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-days-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-days-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-days-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-days.svg b/tests/testthat/_snaps/autoplot-response-spct/response-days.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-days.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-days.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-default-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-default-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-default-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-default-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-default-scaled.svg b/tests/testthat/_snaps/autoplot-response-spct/response-default-scaled.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-default-scaled.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-default-scaled.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-default-ylim-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-default-ylim-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-default-ylim-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-default-ylim-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-default-ylim.svg b/tests/testthat/_snaps/autoplot-response-spct/response-default-ylim.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-default-ylim.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-default-ylim.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-default.svg b/tests/testthat/_snaps/autoplot-response-spct/response-default.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-default.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-default.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-duration-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-duration-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-duration-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-duration-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-duration.svg b/tests/testthat/_snaps/autoplot-response-spct/response-duration.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-duration.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-duration.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-exposure-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-exposure-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-exposure-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-exposure-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-exposure.svg b/tests/testthat/_snaps/autoplot-response-spct/response-exposure.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-exposure.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-exposure.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-hour-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-hour-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-hour-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-hour-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-hour.svg b/tests/testthat/_snaps/autoplot-response-spct/response-hour.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-hour.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-hour.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-hours-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-hours-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-hours-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-hours-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-hours.svg b/tests/testthat/_snaps/autoplot-response-spct/response-hours.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-hours.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-hours.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-label-average-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-label-average-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-label-average-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-label-average-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-label-average.svg b/tests/testthat/_snaps/autoplot-response-spct/response-label-average.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-label-average.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-label-average.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-label-contrib-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-label-contrib-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-label-contrib-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-label-contrib-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-label-contrib.svg b/tests/testthat/_snaps/autoplot-response-spct/response-label-contrib.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-label-contrib.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-label-contrib.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-label-mean-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-label-mean-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-label-mean-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-label-mean-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-label-mean.svg b/tests/testthat/_snaps/autoplot-response-spct/response-label-mean.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-label-mean.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-label-mean.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-label-relative-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-label-relative-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-label-relative-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-label-relative-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-label-relative.svg b/tests/testthat/_snaps/autoplot-response-spct/response-label-relative.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-label-relative.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-label-relative.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-label-total-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-label-total-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-label-total-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-label-total-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-label-total.svg b/tests/testthat/_snaps/autoplot-response-spct/response-label-total.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-label-total.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-label-total.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-minus-annotations.svg b/tests/testthat/_snaps/autoplot-response-spct/response-minus-annotations.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-minus-annotations.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-minus-annotations.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-minus-boxes-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-minus-boxes-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-minus-boxes-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-minus-boxes-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-minus-summaries-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-minus-summaries-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-minus-summaries-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-minus-summaries-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-default-e.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-default-e.svg
similarity index 87%
rename from tests/testthat/_snaps/plot-methods/response-mspct-default-e.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-default-e.svg
index e2e57a3f..a916d8a1 100644
--- a/tests/testthat/_snaps/plot-methods/response-mspct-default-e.svg
+++ b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-default-e.svg
@@ -128,63 +128,63 @@
n
m
)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-
-(
-r
-e
-s
-p
-.
-
-
-u
-n
-i
-t
-
-
-d
-â
-1
-
-n
-m
-â
-1
-)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
spct.idx
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-default-p.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-default-p.svg
similarity index 87%
rename from tests/testthat/_snaps/plot-methods/response-mspct-default-p.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-default-p.svg
index 5f338814..23b1531f 100644
--- a/tests/testthat/_snaps/plot-methods/response-mspct-default-p.svg
+++ b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-default-p.svg
@@ -139,63 +139,63 @@
n
m
)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-p
-h
-o
-t
-o
-n
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-Q
-
-Îğ
-
-
-(
-r
-e
-s
-p
-.
-
-
-u
-n
-i
-t
-
-
-d
-â
-1
-
-n
-m
-â
-1
-)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+p
+h
+o
+t
+o
+n
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+Q
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
spct.idx
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-default-range.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-default-range.svg
similarity index 88%
rename from tests/testthat/_snaps/plot-methods/response-mspct-default-range.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-default-range.svg
index 1d63f410..ac05eb76 100644
--- a/tests/testthat/_snaps/plot-methods/response-mspct-default-range.svg
+++ b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-default-range.svg
@@ -166,63 +166,63 @@
n
m
)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-
-(
-r
-e
-s
-p
-.
-
-
-u
-n
-i
-t
-
-
-d
-â
-1
-
-n
-m
-â
-1
-)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
spct.idx
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-default.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-default.svg
similarity index 87%
rename from tests/testthat/_snaps/plot-methods/response-mspct-default.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-default.svg
index 7d021a0e..00639ea3 100644
--- a/tests/testthat/_snaps/plot-methods/response-mspct-default.svg
+++ b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-default.svg
@@ -128,63 +128,63 @@
n
m
)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-
-(
-r
-e
-s
-p
-.
-
-
-u
-n
-i
-t
-
-
-d
-â
-1
-
-n
-m
-â
-1
-)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
spct.idx
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-mean-e.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-mean-e.svg
similarity index 86%
rename from tests/testthat/_snaps/plot-methods/response-mspct-mean-e.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-mean-e.svg
index 1f7f02a8..64ef7fc7 100644
--- a/tests/testthat/_snaps/plot-methods/response-mspct-mean-e.svg
+++ b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-mean-e.svg
@@ -125,63 +125,63 @@
n
m
)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-
-(
-r
-e
-s
-p
-.
-
-
-u
-n
-i
-t
-
-
-d
-â
-1
-
-n
-m
-â
-1
-)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
response-mspct-mean-e
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-mean-p.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-mean-p.svg
similarity index 85%
rename from tests/testthat/_snaps/plot-methods/response-mspct-mean-p.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-mean-p.svg
index 97935aaf..ad9cff8a 100644
--- a/tests/testthat/_snaps/plot-methods/response-mspct-mean-p.svg
+++ b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-mean-p.svg
@@ -123,63 +123,63 @@
n
m
)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-p
-h
-o
-t
-o
-n
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-Q
-
-Îğ
-
-
-(
-r
-e
-s
-p
-.
-
-
-u
-n
-i
-t
-
-
-d
-â
-1
-
-n
-m
-â
-1
-)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+p
+h
+o
+t
+o
+n
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+Q
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
response-mspct-mean-p
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-mean.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-mean.svg
similarity index 86%
rename from tests/testthat/_snaps/plot-methods/response-mspct-mean.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-mean.svg
index 394be119..35860218 100644
--- a/tests/testthat/_snaps/plot-methods/response-mspct-mean.svg
+++ b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-mean.svg
@@ -125,63 +125,63 @@
n
m
)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-
-(
-r
-e
-s
-p
-.
-
-
-u
-n
-i
-t
-
-
-d
-â
-1
-
-n
-m
-â
-1
-)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
response-mspct-mean
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-median-e.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-median-e.svg
similarity index 86%
rename from tests/testthat/_snaps/plot-methods/response-mspct-median-e.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-median-e.svg
index b9e0ddde..8d522cc0 100644
--- a/tests/testthat/_snaps/plot-methods/response-mspct-median-e.svg
+++ b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-median-e.svg
@@ -125,63 +125,63 @@
n
m
)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-
-(
-r
-e
-s
-p
-.
-
-
-u
-n
-i
-t
-
-
-d
-â
-1
-
-n
-m
-â
-1
-)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
response-mspct-median-e
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-median-p.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-median-p.svg
similarity index 85%
rename from tests/testthat/_snaps/plot-methods/response-mspct-median-p.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-median-p.svg
index 50e5b8db..9dde873b 100644
--- a/tests/testthat/_snaps/plot-methods/response-mspct-median-p.svg
+++ b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-median-p.svg
@@ -123,63 +123,63 @@
n
m
)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-p
-h
-o
-t
-o
-n
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-Q
-
-Îğ
-
-
-(
-r
-e
-s
-p
-.
-
-
-u
-n
-i
-t
-
-
-d
-â
-1
-
-n
-m
-â
-1
-)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+p
+h
+o
+t
+o
+n
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+Q
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
response-mspct-median-p
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-median.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-median.svg
similarity index 86%
rename from tests/testthat/_snaps/plot-methods/response-mspct-median.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-median.svg
index 8632b33f..309a3720 100644
--- a/tests/testthat/_snaps/plot-methods/response-mspct-median.svg
+++ b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-median.svg
@@ -125,63 +125,63 @@
n
m
)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-
-(
-r
-e
-s
-p
-.
-
-
-u
-n
-i
-t
-
-
-d
-â
-1
-
-n
-m
-â
-1
-)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
response-mspct-median
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-no-annotations.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-no-annotations.svg
similarity index 82%
rename from tests/testthat/_snaps/plot-methods/response-mspct-no-annotations.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-no-annotations.svg
index 31fdc884..c34299c6 100644
--- a/tests/testthat/_snaps/plot-methods/response-mspct-no-annotations.svg
+++ b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-no-annotations.svg
@@ -78,63 +78,63 @@
n
m
)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-
-(
-r
-e
-s
-p
-.
-
-
-u
-n
-i
-t
-
-
-d
-â
-1
-
-n
-m
-â
-1
-)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
spct.idx
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-reserve-space.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-reserve-space.svg
similarity index 81%
rename from tests/testthat/_snaps/plot-methods/response-mspct-reserve-space.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-reserve-space.svg
index cf595aaf..fb7b91a3 100644
--- a/tests/testthat/_snaps/plot-methods/response-mspct-reserve-space.svg
+++ b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-reserve-space.svg
@@ -70,63 +70,63 @@
n
m
)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-
-(
-r
-e
-s
-p
-.
-
-
-u
-n
-i
-t
-
-
-d
-â
-1
-
-n
-m
-â
-1
-)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
spct.idx
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-se-ylab.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-se-ylab.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-mspct-se-ylab.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-se-ylab.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-se.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-se.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-mspct-se.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-se.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-sum.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-sum.svg
similarity index 86%
rename from tests/testthat/_snaps/plot-methods/response-mspct-sum.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-sum.svg
index 767b1e9d..1483c60c 100644
--- a/tests/testthat/_snaps/plot-methods/response-mspct-sum.svg
+++ b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-sum.svg
@@ -125,63 +125,63 @@
n
m
)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-
-(
-r
-e
-s
-p
-.
-
-
-u
-n
-i
-t
-
-
-d
-â
-1
-
-n
-m
-â
-1
-)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
response-mspct-sum
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-var-ylab.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-var-ylab.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-mspct-var-ylab.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-var-ylab.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-var.svg b/tests/testthat/_snaps/autoplot-response-spct/response-mspct-var.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-mspct-var.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-mspct-var.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-no-annotations-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-no-annotations-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-no-annotations-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-no-annotations-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-no-annotations.svg b/tests/testthat/_snaps/autoplot-response-spct/response-no-annotations.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-no-annotations.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-no-annotations.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-none-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-none-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-none-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-none-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-none.svg b/tests/testthat/_snaps/autoplot-response-spct/response-none.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-none.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-none.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-plus-annotations.svg b/tests/testthat/_snaps/autoplot-response-spct/response-plus-annotations.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-plus-annotations.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-plus-annotations.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-plus-boundaries-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-plus-boundaries-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-plus-boundaries-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-plus-boundaries-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-plus-segments-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-plus-segments-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-plus-segments-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-plus-segments-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-range-num-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-range-num-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-range-num-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-range-num-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-range-num.svg b/tests/testthat/_snaps/autoplot-response-spct/response-range-num.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-range-num.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-range-num.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-range-wb-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-range-wb-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-range-wb-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-range-wb-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-range-wb.svg b/tests/testthat/_snaps/autoplot-response-spct/response-range-wb.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-range-wb.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-range-wb.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-reserve-space.svg b/tests/testthat/_snaps/autoplot-response-spct/response-reserve-space.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-reserve-space.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-reserve-space.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-second-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-second-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-second-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-second-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-second.svg b/tests/testthat/_snaps/autoplot-response-spct/response-second.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-second.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-second.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-seconds-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-seconds-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-seconds-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-seconds-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-seconds.svg b/tests/testthat/_snaps/autoplot-response-spct/response-seconds.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-seconds.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-seconds.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-span-31-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-span-31-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-span-31-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-span-31-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-span-31.svg b/tests/testthat/_snaps/autoplot-response-spct/response-span-31.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-span-31.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-span-31.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-text-size-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-text-size-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-text-size-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-text-size-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-text-size.svg b/tests/testthat/_snaps/autoplot-response-spct/response-text-size.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-text-size.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-text-size.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-wb-vis-q.svg b/tests/testthat/_snaps/autoplot-response-spct/response-wb-vis-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-wb-vis-q.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-wb-vis-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/response-wb-vis.svg b/tests/testthat/_snaps/autoplot-response-spct/response-wb-vis.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/response-wb-vis.svg
rename to tests/testthat/_snaps/autoplot-response-spct/response-wb-vis.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-day-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-day-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-day-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-day-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-day.svg b/tests/testthat/_snaps/autoplot-source-spct/source-day.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-day.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-day.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-days-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-days-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-days-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-days-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-days.svg b/tests/testthat/_snaps/autoplot-source-spct/source-days.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-days.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-days.svg
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-default-geom-spct.svg b/tests/testthat/_snaps/autoplot-source-spct/source-default-geom-spct.svg
new file mode 100644
index 00000000..2de763e9
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-default-geom-spct.svg
@@ -0,0 +1,200 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PhR
+90
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+source-default-geom-spct
+
+
diff --git a/tests/testthat/_snaps/plot-methods/source-default-norm-550.svg b/tests/testthat/_snaps/autoplot-source-spct/source-default-norm-550.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-default-norm-550.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-default-norm-550.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-default-normalized.svg b/tests/testthat/_snaps/autoplot-source-spct/source-default-normalized.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-default-normalized.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-default-normalized.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-default-q-normalized.svg b/tests/testthat/_snaps/autoplot-source-spct/source-default-q-normalized.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-default-q-normalized.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-default-q-normalized.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-default-q-scaled.svg b/tests/testthat/_snaps/autoplot-source-spct/source-default-q-scaled.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-default-q-scaled.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-default-q-scaled.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-default-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-default-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-default-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-default-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-default-scaled.svg b/tests/testthat/_snaps/autoplot-source-spct/source-default-scaled.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-default-scaled.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-default-scaled.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-default.svg b/tests/testthat/_snaps/autoplot-source-spct/source-default.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-default.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-default.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-duration-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-duration-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-duration-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-duration-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-duration.svg b/tests/testthat/_snaps/autoplot-source-spct/source-duration.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-duration.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-duration.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-exposure-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-exposure-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-exposure-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-exposure-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-exposure.svg b/tests/testthat/_snaps/autoplot-source-spct/source-exposure.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-exposure.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-exposure.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-hour-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-hour-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-hour-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-hour-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-hour.svg b/tests/testthat/_snaps/autoplot-source-spct/source-hour.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-hour.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-hour.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-hours-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-hours-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-hours-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-hours-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-hours.svg b/tests/testthat/_snaps/autoplot-source-spct/source-hours.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-hours.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-hours.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-label-average-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-label-average-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-label-average-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-label-average-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-label-average.svg b/tests/testthat/_snaps/autoplot-source-spct/source-label-average.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-label-average.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-label-average.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-label-contrib.svg b/tests/testthat/_snaps/autoplot-source-spct/source-label-contrib.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-label-contrib.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-label-contrib.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-label-mean-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-label-mean-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-label-mean-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-label-mean-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-label-mean.svg b/tests/testthat/_snaps/autoplot-source-spct/source-label-mean.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-label-mean.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-label-mean.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-label-relative.svg b/tests/testthat/_snaps/autoplot-source-spct/source-label-relative.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-label-relative.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-label-relative.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-label-total.svg b/tests/testthat/_snaps/autoplot-source-spct/source-label-total.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-label-total.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-label-total.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-minus-annotations.svg b/tests/testthat/_snaps/autoplot-source-spct/source-minus-annotations.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-minus-annotations.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-minus-annotations.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-minus-boxes-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-minus-boxes-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-minus-boxes-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-minus-boxes-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-minus-summaries-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-minus-summaries-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-minus-summaries-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-minus-summaries-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-default-e.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-e.svg
similarity index 50%
rename from tests/testthat/_snaps/plot-methods/source-mspct-default-e.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-e.svg
index 2de7741e..590c63e6 100644
--- a/tests/testthat/_snaps/plot-methods/source-mspct-default-e.svg
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-e.svg
@@ -21,193 +21,190 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-604.4
-604.4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-UVB
-UVA
-PhR
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+UVB
+UVA
+PhR
-0e+00
-2e-07
-4e-07
-6e-07
-8e-07
-
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-900
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-e
-x
-p
-o
-s
-u
-r
-e
-
-
-E
-Îğ
-
-
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-
-n
-m
-â
-1
-)
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
spct.idx
@@ -216,6 +213,6 @@
one
half
-source-mspct-default-e
+source-mspct-default-e
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-geom-spct.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-geom-spct.svg
new file mode 100644
index 00000000..79f49c15
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-geom-spct.svg
@@ -0,0 +1,226 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+UVB
+UVA
+PhR
+
+
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+
+spct.idx
+
+
+
+
+
+
+one
+half
+source-mspct-default-geom-spct
+
+
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-idfactor.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-idfactor.svg
new file mode 100644
index 00000000..0f892695
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-idfactor.svg
@@ -0,0 +1,218 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+UVB
+UVA
+PhR
+
+
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+
+spectrum
+
+
+
+
+one
+half
+source-mspct-default-idfactor
+
+
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-default-p.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-p.svg
similarity index 50%
rename from tests/testthat/_snaps/plot-methods/source-mspct-default-p.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-p.svg
index 95a8e11d..e687eaac 100644
--- a/tests/testthat/_snaps/plot-methods/source-mspct-default-p.svg
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-p.svg
@@ -18,197 +18,200 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-611
-611
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-UVB
-UVA
-PAR
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+611
+611
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+UVB
+UVA
+PAR
-0e+00
-1e-06
-2e-06
-3e-06
-4e-06
-
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-900
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-p
-h
-o
-t
-o
-n
-
-
-e
-x
-p
-o
-s
-u
-r
-e
-
-
-Q
-Îğ
-
-
-(
-m
-o
-l
-
-d
-â
-1
-
-m
-â
-2
-
-n
-m
-â
-1
-)
+0
+1
+2
+3
+4
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+p
+h
+o
+t
+o
+n
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+Q
+Îğ
+
+
+(
+Îĵ
+m
+o
+l
+
+s
+â
+1
+
+m
+â
+2
+
+n
+m
+â
+1
+)
spct.idx
@@ -217,6 +220,6 @@
one
half
-source-mspct-default-p
+source-mspct-default-p
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-default-range.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-range.svg
similarity index 54%
rename from tests/testthat/_snaps/plot-methods/source-mspct-default-range.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-range.svg
index 85e07a25..99195485 100644
--- a/tests/testthat/_snaps/plot-methods/source-mspct-default-range.svg
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-range.svg
@@ -21,207 +21,204 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-604.4
-604.4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]PhR[
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]PhR[
-0e+00
-2e-07
-4e-07
-6e-07
-8e-07
-
-
-
-
-
-
-
-
-
-
-500
-550
-600
-650
-700
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-e
-x
-p
-o
-s
-u
-r
-e
-
-
-E
-Îğ
-
-
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-
-n
-m
-â
-1
-)
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+
+
+
+
+
+500
+550
+600
+650
+700
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
spct.idx
@@ -230,6 +227,6 @@
one
half
-source-mspct-default-range
+source-mspct-default-range
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-wband-null.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-wband-null.svg
new file mode 100644
index 00000000..5c9e98e0
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-wband-null.svg
@@ -0,0 +1,212 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Total
+
+
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+
+spct.idx
+
+
+
+
+one
+half
+source-mspct-default-wband-null
+
+
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-wband-wb.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-wband-wb.svg
new file mode 100644
index 00000000..993dce85
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-wband-wb.svg
@@ -0,0 +1,212 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+VIS
+
+
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+
+spct.idx
+
+
+
+
+one
+half
+source-mspct-default-wband-wb
+
+
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-wband-wbls.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-wband-wbls.svg
new file mode 100644
index 00000000..2a24458a
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default-wband-wbls.svg
@@ -0,0 +1,222 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Purple
+Blue
+Green
+Yellow
+Orange
+Red
+
+
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+
+spct.idx
+
+
+
+
+one
+half
+source-mspct-default-wband-wbls
+
+
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-default.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default.svg
similarity index 50%
rename from tests/testthat/_snaps/plot-methods/source-mspct-default.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-mspct-default.svg
index 597ce74d..d2556849 100644
--- a/tests/testthat/_snaps/plot-methods/source-mspct-default.svg
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-default.svg
@@ -21,193 +21,190 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-604.4
-604.4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-UVB
-UVA
-PhR
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+UVB
+UVA
+PhR
-0e+00
-2e-07
-4e-07
-6e-07
-8e-07
-
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-900
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-e
-x
-p
-o
-s
-u
-r
-e
-
-
-E
-Îğ
-
-
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-
-n
-m
-â
-1
-)
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
spct.idx
@@ -216,6 +213,6 @@
one
half
-source-mspct-default
+source-mspct-default
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-facets1.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-facets1.svg
new file mode 100644
index 00000000..30c9d15d
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-facets1.svg
@@ -0,0 +1,325 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PhR
+90
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PhR
+45
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+
+
+
+
+
+
+
+
+half
+
+
+
+
+
+
+
+
+
+
+one
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+source-mspct-facets1
+
+
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-facets2.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-facets2.svg
new file mode 100644
index 00000000..2560a54e
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-facets2.svg
@@ -0,0 +1,329 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PhR
+90
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PhR
+45
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+
+
+
+
+
+
+
+
+one
+
+
+
+
+
+
+
+
+
+
+half
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+source-mspct-facets2
+
+
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-facetst-geom-spct.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-facetst-geom-spct.svg
new file mode 100644
index 00000000..84d4161f
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-facetst-geom-spct.svg
@@ -0,0 +1,335 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PhR
+90
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PhR
+45
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+
+
+
+
+
+
+
+
+one
+
+
+
+
+
+
+
+
+
+
+half
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+source-mspct-facetsT-geom-spct
+
+
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-facetst.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-facetst.svg
new file mode 100644
index 00000000..14f1b3b2
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-facetst.svg
@@ -0,0 +1,329 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PhR
+90
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PhR
+45
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+
+
+
+
+
+
+
+
+one
+
+
+
+
+
+
+
+
+
+
+half
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+source-mspct-facetsT
+
+
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-mean-e.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-mean-e.svg
new file mode 100644
index 00000000..b7cfdeff
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-mean-e.svg
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PhR
+67.5
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+0.0
+0.1
+0.2
+0.3
+0.4
+0.5
+0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+source-mspct-mean-e
+
+
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-mean-p.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-mean-p.svg
similarity index 51%
rename from tests/testthat/_snaps/plot-methods/source-mspct-mean-p.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-mspct-mean-p.svg
index c44332a2..1411cbf0 100644
--- a/tests/testthat/_snaps/plot-methods/source-mspct-mean-p.svg
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-mean-p.svg
@@ -21,191 +21,195 @@
-
-
+
+
-
-
-
-611
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0
-UVB
-0
-UVA
-0
-PAR
-0.00033
-Q
-(
-m
-o
-l
-
-d
-â
-1
-
-m
-â
-2
-)
-
+
+
+
+611
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PAR
+330
+Q
+(
+Îĵ
+m
+o
+l
+
+s
+â
+1
+
+m
+â
+2
+)
+
-0.0e+00
-5.0e-07
-1.0e-06
-1.5e-06
-2.0e-06
-2.5e-06
-3.0e-06
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-900
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-p
-h
-o
-t
-o
-n
-
-
-e
-x
-p
-o
-s
-u
-r
-e
-
-
-Q
-Îğ
-
-
-(
-m
-o
-l
-
-d
-â
-1
-
-m
-â
-2
-
-n
-m
-â
-1
-)
-source-mspct-mean-p
+0.0
+0.5
+1.0
+1.5
+2.0
+2.5
+3.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+p
+h
+o
+t
+o
+n
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+Q
+Îğ
+
+
+(
+Îĵ
+m
+o
+l
+
+s
+â
+1
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+source-mspct-mean-p
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-mean.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-mean.svg
new file mode 100644
index 00000000..b5640bda
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-mean.svg
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PhR
+67.5
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+0.0
+0.1
+0.2
+0.3
+0.4
+0.5
+0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+source-mspct-mean
+
+
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-median-e.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-median-e.svg
new file mode 100644
index 00000000..c3cc6a1a
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-median-e.svg
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PhR
+67.5
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+0.0
+0.1
+0.2
+0.3
+0.4
+0.5
+0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+source-mspct-median-e
+
+
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-median-p.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-median-p.svg
similarity index 51%
rename from tests/testthat/_snaps/plot-methods/source-mspct-median-p.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-mspct-median-p.svg
index 2eab5a17..86044de3 100644
--- a/tests/testthat/_snaps/plot-methods/source-mspct-median-p.svg
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-median-p.svg
@@ -21,191 +21,195 @@
-
-
+
+
-
-
-
-611
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0
-UVB
-0
-UVA
-0
-PAR
-0.00033
-Q
-(
-m
-o
-l
-
-d
-â
-1
-
-m
-â
-2
-)
-
+
+
+
+611
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PAR
+330
+Q
+(
+Îĵ
+m
+o
+l
+
+s
+â
+1
+
+m
+â
+2
+)
+
-0.0e+00
-5.0e-07
-1.0e-06
-1.5e-06
-2.0e-06
-2.5e-06
-3.0e-06
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-900
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-p
-h
-o
-t
-o
-n
-
-
-e
-x
-p
-o
-s
-u
-r
-e
-
-
-Q
-Îğ
-
-
-(
-m
-o
-l
-
-d
-â
-1
-
-m
-â
-2
-
-n
-m
-â
-1
-)
-source-mspct-median-p
+0.0
+0.5
+1.0
+1.5
+2.0
+2.5
+3.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+p
+h
+o
+t
+o
+n
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+Q
+Îğ
+
+
+(
+Îĵ
+m
+o
+l
+
+s
+â
+1
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+source-mspct-median-p
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-median.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-median.svg
new file mode 100644
index 00000000..93afd0fb
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-median.svg
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PhR
+67.5
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+0.0
+0.1
+0.2
+0.3
+0.4
+0.5
+0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+source-mspct-median
+
+
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-no-annotations.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-no-annotations.svg
new file mode 100644
index 00000000..de5cab6e
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-no-annotations.svg
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0.0
+0.2
+0.4
+0.6
+
+
+
+
+
+
+
+400
+600
+800
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+
+spct.idx
+
+
+
+
+one
+half
+source-mspct-no-annotations
+
+
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-reserve-space.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-reserve-space.svg
new file mode 100644
index 00000000..f873b1c8
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-reserve-space.svg
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+
+spct.idx
+
+
+
+
+one
+half
+source-mspct-reserve-space
+
+
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-se-ylab.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-se-ylab.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-mspct-se-ylab.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-mspct-se-ylab.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-se.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-se.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-mspct-se.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-mspct-se.svg
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-mspct-sum.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-sum.svg
new file mode 100644
index 00000000..5e526f13
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-sum.svg
@@ -0,0 +1,197 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0
+UVB
+0
+UVA
+0
+PhR
+135
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+source-mspct-sum
+
+
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-var-ylab.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-var-ylab.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-mspct-var-ylab.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-mspct-var-ylab.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-var.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-var.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-mspct-var.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-mspct-var.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-ylim.svg b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-ylim.svg
similarity index 80%
rename from tests/testthat/_snaps/plot-methods/source-mspct-ylim.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-mspct-ylim.svg
index 97ae0f46..3ddce484 100644
--- a/tests/testthat/_snaps/plot-methods/source-mspct-ylim.svg
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-mspct-ylim.svg
@@ -48,12 +48,12 @@
-
-
-604.4
-604.4
-
-
+
+
+604.4
+604.4
+
+
@@ -155,55 +155,52 @@
n
m
)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-e
-x
-p
-o
-s
-u
-r
-e
-
-
-E
-Îğ
-
-
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-
-n
-m
-â
-1
-)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
spct.idx
diff --git a/tests/testthat/_snaps/plot-methods/source-no-annotations-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-no-annotations-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-no-annotations-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-no-annotations-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-no-annotations.svg b/tests/testthat/_snaps/autoplot-source-spct/source-no-annotations.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-no-annotations.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-no-annotations.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-none-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-none-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-none-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-none-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-none.svg b/tests/testthat/_snaps/autoplot-source-spct/source-none.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-none.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-none.svg
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-normalized-pcout.svg b/tests/testthat/_snaps/autoplot-source-spct/source-normalized-pcout.svg
new file mode 100644
index 00000000..9460cd9d
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-normalized-pcout.svg
@@ -0,0 +1,210 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0.00
+UVB
+0.00
+UVA
+0.00
+PhR
+0.96
+C
+o
+n
+t
+r
+i
+b
+u
+t
+i
+o
+n
+
+
+t
+o
+
+
+t
+o
+t
+a
+l
+E
+
+
+(
+/1
+)
+
+
+
+0%
+25%
+50%
+75%
+100%
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+E
+Îğ
+=
+604.4
+source-normalized-pcout
+
+
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-normalized-wl-pcout.svg b/tests/testthat/_snaps/autoplot-source-spct/source-normalized-wl-pcout.svg
new file mode 100644
index 00000000..988ecc9e
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-normalized-wl-pcout.svg
@@ -0,0 +1,210 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]UVC
+0.00
+UVB
+0.00
+UVA
+0.00
+PhR
+0.96
+C
+o
+n
+t
+r
+i
+b
+u
+t
+i
+o
+n
+
+
+t
+o
+
+
+t
+o
+t
+a
+l
+E
+
+
+(
+/1
+)
+
+
+
+0%
+50%
+100%
+150%
+200%
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+E
+Îğ
+=
+550
+source-normalized-wl-pcout
+
+
diff --git a/tests/testthat/_snaps/plot-methods/source-normalized-wl.svg b/tests/testthat/_snaps/autoplot-source-spct/source-normalized-wl.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-normalized-wl.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-normalized-wl.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-normalized-ylim.svg b/tests/testthat/_snaps/autoplot-source-spct/source-normalized-ylim.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-normalized-ylim.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-normalized-ylim.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-normalized.svg b/tests/testthat/_snaps/autoplot-source-spct/source-normalized.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-normalized.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-normalized.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-plus-annotations.svg b/tests/testthat/_snaps/autoplot-source-spct/source-plus-annotations.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-plus-annotations.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-plus-annotations.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-plus-boundaries-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-plus-boundaries-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-plus-boundaries-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-plus-boundaries-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-plus-segments-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-plus-segments-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-plus-segments-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-plus-segments-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-product-bswf-wl.svg b/tests/testthat/_snaps/autoplot-source-spct/source-product-bswf-wl.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-product-bswf-wl.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-product-bswf-wl.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-product-bswf.svg b/tests/testthat/_snaps/autoplot-source-spct/source-product-bswf.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-product-bswf.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-product-bswf.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-product-wb.svg b/tests/testthat/_snaps/autoplot-source-spct/source-product-wb.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-product-wb.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-product-wb.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-range-num-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-range-num-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-range-num-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-range-num-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-range-num.svg b/tests/testthat/_snaps/autoplot-source-spct/source-range-num.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-range-num.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-range-num.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-range-wb-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-range-wb-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-range-wb-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-range-wb-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-range-wb.svg b/tests/testthat/_snaps/autoplot-source-spct/source-range-wb.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-range-wb.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-range-wb.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-reserve-space.svg b/tests/testthat/_snaps/autoplot-source-spct/source-reserve-space.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-reserve-space.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-reserve-space.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-scaled-irrad-200-par.svg b/tests/testthat/_snaps/autoplot-source-spct/source-scaled-irrad-200-par.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-scaled-irrad-200-par.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-scaled-irrad-200-par.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-scaled-irrad-200.svg b/tests/testthat/_snaps/autoplot-source-spct/source-scaled-irrad-200.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-scaled-irrad-200.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-scaled-irrad-200.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-scaled-mean-2-par.svg b/tests/testthat/_snaps/autoplot-source-spct/source-scaled-mean-2-par.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-scaled-mean-2-par.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-scaled-mean-2-par.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-scaled-mean-2.svg b/tests/testthat/_snaps/autoplot-source-spct/source-scaled-mean-2.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-scaled-mean-2.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-scaled-mean-2.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-scaled-mean.svg b/tests/testthat/_snaps/autoplot-source-spct/source-scaled-mean.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-scaled-mean.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-scaled-mean.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-scaled-total-200-par.svg b/tests/testthat/_snaps/autoplot-source-spct/source-scaled-total-200-par.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-scaled-total-200-par.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-scaled-total-200-par.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-scaled-total-200.svg b/tests/testthat/_snaps/autoplot-source-spct/source-scaled-total-200.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-scaled-total-200.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-scaled-total-200.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-scaled-total.svg b/tests/testthat/_snaps/autoplot-source-spct/source-scaled-total.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-scaled-total.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-scaled-total.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-scaled.svg b/tests/testthat/_snaps/autoplot-source-spct/source-scaled.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-scaled.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-scaled.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-second-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-second-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-second-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-second-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-second.svg b/tests/testthat/_snaps/autoplot-source-spct/source-second.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-second.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-second.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-seconds-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-seconds-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-seconds-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-seconds-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-seconds.svg b/tests/testthat/_snaps/autoplot-source-spct/source-seconds.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-seconds.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-seconds.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-span-31-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-span-11-q.svg
similarity index 99%
rename from tests/testthat/_snaps/plot-methods/source-span-31-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-span-11-q.svg
index c62a7a96..00216121 100644
--- a/tests/testthat/_snaps/plot-methods/source-span-31-q.svg
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-span-11-q.svg
@@ -28,7 +28,9 @@
+454
611
+
@@ -206,6 +208,6 @@
â
1
)
-source-span-31-q
+source-span-11-q
diff --git a/tests/testthat/_snaps/plot-methods/source-span-31.svg b/tests/testthat/_snaps/autoplot-source-spct/source-span-11.svg
similarity index 98%
rename from tests/testthat/_snaps/plot-methods/source-span-31.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-span-11.svg
index e24f756a..f3541411 100644
--- a/tests/testthat/_snaps/plot-methods/source-span-31.svg
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-span-11.svg
@@ -28,7 +28,9 @@
+454
604.4
+
@@ -192,6 +194,6 @@
â
1
)
-source-span-31
+source-span-11
diff --git a/tests/testthat/_snaps/plot-methods/source-text-size-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-text-size-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-text-size-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-text-size-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-text-size.svg b/tests/testthat/_snaps/autoplot-source-spct/source-text-size.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-text-size.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-text-size.svg
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-wb-null.svg b/tests/testthat/_snaps/autoplot-source-spct/source-wb-null.svg
new file mode 100644
index 00000000..cd2b25f7
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-wb-null.svg
@@ -0,0 +1,188 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Total
+93.7
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+source-wb-null
+
+
diff --git a/tests/testthat/_snaps/autoplot-source-spct/source-wb-vis-1.svg b/tests/testthat/_snaps/autoplot-source-spct/source-wb-vis-1.svg
new file mode 100644
index 00000000..1572f105
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-source-spct/source-wb-vis-1.svg
@@ -0,0 +1,188 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+604.4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+VIS
+93.3
+E
+(
+W
+
+m
+â
+2
+)
+
+
+
+0.0
+0.2
+0.4
+0.6
+0.8
+
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+900
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+i
+r
+r
+a
+d
+i
+a
+n
+c
+e
+
+
+E
+Îğ
+
+
+(
+W
+
+m
+â
+2
+
+n
+m
+â
+1
+)
+source-wb-vis-1
+
+
diff --git a/tests/testthat/_snaps/plot-methods/source-wb-vis-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-wb-vis-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-wb-vis-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-wb-vis-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-wb-vis.svg b/tests/testthat/_snaps/autoplot-source-spct/source-wb-vis.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-wb-vis.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-wb-vis.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-ylim1-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-ylim1-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-ylim1-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-ylim1-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-ylim1.svg b/tests/testthat/_snaps/autoplot-source-spct/source-ylim1.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-ylim1.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-ylim1.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-ylim2-q.svg b/tests/testthat/_snaps/autoplot-source-spct/source-ylim2-q.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-ylim2-q.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-ylim2-q.svg
diff --git a/tests/testthat/_snaps/plot-methods/source-ylim2.svg b/tests/testthat/_snaps/autoplot-source-spct/source-ylim2.svg
similarity index 100%
rename from tests/testthat/_snaps/plot-methods/source-ylim2.svg
rename to tests/testthat/_snaps/autoplot-source-spct/source-ylim2.svg
diff --git a/tests/testthat/_snaps/autoplot-waveband/waveband-default-cie.svg b/tests/testthat/_snaps/autoplot-waveband/waveband-default-cie.svg
new file mode 100644
index 00000000..ad42a7c6
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-waveband/waveband-default-cie.svg
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Range of CIE98
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+
+
+
+
+250
+300
+350
+400
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
+waveband-default-cie
+
+
diff --git a/tests/testthat/_snaps/autoplot-waveband/waveband-default-red.svg b/tests/testthat/_snaps/autoplot-waveband/waveband-default-red.svg
new file mode 100644
index 00000000..93e77b33
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-waveband/waveband-default-red.svg
@@ -0,0 +1,200 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Red
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
+waveband-default-red
+
+
diff --git a/tests/testthat/_snaps/autoplot-waveband/waveband-default-ylim.svg b/tests/testthat/_snaps/autoplot-waveband/waveband-default-ylim.svg
new file mode 100644
index 00000000..c71a3054
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-waveband/waveband-default-ylim.svg
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Red
+
+
+
+0.0
+0.5
+1.0
+1.5
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
+waveband-default-ylim
+
+
diff --git a/tests/testthat/_snaps/autoplot-waveband/waveband-minus-boxes.svg b/tests/testthat/_snaps/autoplot-waveband/waveband-minus-boxes.svg
new file mode 100644
index 00000000..1dd9bd81
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-waveband/waveband-minus-boxes.svg
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Red
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
+waveband-minus-boxes
+
+
diff --git a/tests/testthat/_snaps/autoplot-waveband/waveband-no-annotations.svg b/tests/testthat/_snaps/autoplot-waveband/waveband-no-annotations.svg
new file mode 100644
index 00000000..b09b0117
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-waveband/waveband-no-annotations.svg
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
+waveband-no-annotations
+
+
diff --git a/tests/testthat/_snaps/autoplot-waveband/waveband-plus-segments.svg b/tests/testthat/_snaps/autoplot-waveband/waveband-plus-segments.svg
new file mode 100644
index 00000000..80988c5e
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-waveband/waveband-plus-segments.svg
@@ -0,0 +1,200 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Red
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
+waveband-plus-segments
+
+
diff --git a/tests/testthat/_snaps/autoplot-waveband/waveband-reserve-space.svg b/tests/testthat/_snaps/autoplot-waveband/waveband-reserve-space.svg
new file mode 100644
index 00000000..f29c7de7
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-waveband/waveband-reserve-space.svg
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
+waveband-reserve-space
+
+
diff --git a/tests/testthat/_snaps/autoplot-waveband/waveband-text-size.svg b/tests/testthat/_snaps/autoplot-waveband/waveband-text-size.svg
new file mode 100644
index 00000000..c13c520f
--- /dev/null
+++ b/tests/testthat/_snaps/autoplot-waveband/waveband-text-size.svg
@@ -0,0 +1,200 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Red
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+
+
+
+
+
+
+300
+400
+500
+600
+700
+800
+Wavelength,
+Îğ
+
+(
+n
+m
+)
+S
+p
+e
+c
+t
+r
+a
+l
+
+
+e
+n
+e
+r
+g
+y
+
+
+r
+e
+s
+p
+o
+n
+s
+e
+
+
+R
+E
+
+Îğ
+
+
+(
+r
+e
+s
+p
+.
+
+
+u
+n
+i
+t
+
+
+s
+â
+1
+
+n
+m
+â
+1
+)
+waveband-text-size
+
+
diff --git a/tests/testthat/_snaps/plot-methods/filter-mspct-median-a.svg b/tests/testthat/_snaps/plot-methods/filter-mspct-median-a.svg
deleted file mode 100644
index a1ec54c6..00000000
--- a/tests/testthat/_snaps/plot-methods/filter-mspct-median-a.svg
+++ /dev/null
@@ -1,186 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-5
-UVB
-3
-UVA
-2.34
-PhR
-1.48
-A
-Îğ
-i
-n
-t
-
-(
-A
-U
-)
-
-
-
-0
-2
-4
-6
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Internal
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-b
-a
-n
-c
-e
-
-
-A
-Îğ
-int
-
-
-(
-A
-U
-)
-filter-mspct-median-A
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-a-default-pc-out-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-a-default-pc-out-tot.svg
deleted file mode 100644
index a1eed533..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-a-default-pc-out-tot.svg
+++ /dev/null
@@ -1,186 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-4.85
-UVB
-2.86
-UVA
-2.21
-PhR
-1.37
-A
-Îğ
-t
-o
-t
-
-(
-A
-U
-)
-
-
-
-0
-2
-4
-6
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-b
-a
-n
-c
-e
-
-
-A
-Îğ
-tot
-
-
-(
-A
-U
-)
-object-as-filter-a-default-pc-out-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-a-minus-guide-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-a-minus-guide-tot.svg
deleted file mode 100644
index d4329552..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-a-minus-guide-tot.svg
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-4.85
-UVB
-2.86
-UVA
-2.21
-PhR
-1.37
-A
-Îğ
-t
-o
-t
-
-(
-A
-U
-)
-
-
-
-0
-2
-4
-6
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-b
-a
-n
-c
-e
-
-
-A
-Îğ
-tot
-
-
-(
-A
-U
-)
-object-as-filter-a-minus-guide-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-a-no-annotations-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-a-no-annotations-tot.svg
deleted file mode 100644
index c524d10f..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-a-no-annotations-tot.svg
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-1
-2
-3
-4
-5
-
-
-
-
-
-
-
-
-400
-600
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-b
-a
-n
-c
-e
-
-
-A
-Îğ
-tot
-
-
-(
-A
-U
-)
-object-as-filter-a-no-annotations-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-a-plus-segments-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-a-plus-segments-tot.svg
deleted file mode 100644
index 63a2e03e..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-a-plus-segments-tot.svg
+++ /dev/null
@@ -1,186 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-4.85
-UVB
-2.86
-UVA
-2.21
-PhR
-1.37
-A
-Îğ
-t
-o
-t
-
-(
-A
-U
-)
-
-
-
-0
-2
-4
-6
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-b
-a
-n
-c
-e
-
-
-A
-Îğ
-tot
-
-
-(
-A
-U
-)
-object-as-filter-a-plus-segments-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-a-range-num-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-a-range-num-tot.svg
deleted file mode 100644
index fddc6321..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-a-range-num-tot.svg
+++ /dev/null
@@ -1,203 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-674.2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]PhR[
-1.11
-A
-Îğ
-t
-o
-t
-
-(
-A
-U
-)
-
-
-
-0.0
-0.5
-1.0
-1.5
-2.0
-
-
-
-
-
-
-
-
-
-
-500
-550
-600
-650
-700
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-b
-a
-n
-c
-e
-
-
-A
-Îğ
-tot
-
-
-(
-A
-U
-)
-object-as-filter-a-range-num-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-a-range-wb-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-a-range-wb-tot.svg
deleted file mode 100644
index d6dbb301..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-a-range-wb-tot.svg
+++ /dev/null
@@ -1,203 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-674.2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]PhR[
-1.11
-A
-Îğ
-t
-o
-t
-
-(
-A
-U
-)
-
-
-
-0.0
-0.5
-1.0
-1.5
-2.0
-
-
-
-
-
-
-
-
-
-
-500
-550
-600
-650
-700
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-b
-a
-n
-c
-e
-
-
-A
-Îğ
-tot
-
-
-(
-A
-U
-)
-object-as-filter-a-range-wb-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-a-reserve-space-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-a-reserve-space-tot.svg
deleted file mode 100644
index 816c4e82..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-a-reserve-space-tot.svg
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0
-2
-4
-6
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-b
-a
-n
-c
-e
-
-
-A
-Îğ
-tot
-
-
-(
-A
-U
-)
-object-as-filter-a-reserve-space-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-a-text-size-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-a-text-size-tot.svg
deleted file mode 100644
index e7c107c6..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-a-text-size-tot.svg
+++ /dev/null
@@ -1,186 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-4.85
-UVB
-2.86
-UVA
-2.21
-PhR
-1.37
-A
-Îğ
-t
-o
-t
-
-(
-A
-U
-)
-
-
-
-0
-2
-4
-6
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-b
-a
-n
-c
-e
-
-
-A
-Îğ
-tot
-
-
-(
-A
-U
-)
-object-as-filter-a-text-size-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-a-wb-vis-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-a-wb-vis-tot.svg
deleted file mode 100644
index 54d93980..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-a-wb-vis-tot.svg
+++ /dev/null
@@ -1,192 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Purple
-2.01
-Blue
-1.77
-Green
-0.997
-Yellow
-0.949
-Orange
-1.02
-Red
-0.945
-A
-Îğ
-t
-o
-t
-
-(
-A
-U
-)
-
-
-
-0
-2
-4
-6
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-b
-a
-n
-c
-e
-
-
-A
-Îğ
-tot
-
-
-(
-A
-U
-)
-object-as-filter-a-wb-vis-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-default-pc-out-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-afr-default-pc-out-tot.svg
deleted file mode 100644
index 2ac9c022..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-default-pc-out-tot.svg
+++ /dev/null
@@ -1,182 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-334.8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-95.4
-UVB
-95.7
-UVA
-95.5
-PhR
-85.2
-A
-Îğ
-
-(
-%
-)
-
-
-
-0%
-25%
-50%
-75%
-100%
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-p
-t
-a
-n
-c
-e
-
-
-A
-Îğ
-
-
-(
-%
-)
-object-as-filter-afr-default-pc-out-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-default-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-afr-default-tot.svg
deleted file mode 100644
index 7ebf2a77..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-default-tot.svg
+++ /dev/null
@@ -1,182 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-334.8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0.954
-UVB
-0.957
-UVA
-0.955
-PhR
-0.852
-A
-Îğ
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-p
-t
-a
-n
-c
-e
-
-
-A
-Îğ
-
-
-(
-/1
-)
-object-as-filter-afr-default-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-minus-guide-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-afr-minus-guide-tot.svg
deleted file mode 100644
index 9cf3e539..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-minus-guide-tot.svg
+++ /dev/null
@@ -1,115 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-334.8
-
-
-
-
-
-]UVC
-0.954
-UVB
-0.957
-UVA
-0.955
-PhR
-0.852
-A
-Îğ
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-p
-t
-a
-n
-c
-e
-
-
-A
-Îğ
-
-
-(
-/1
-)
-object-as-filter-afr-minus-guide-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-no-annotations-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-afr-no-annotations-tot.svg
deleted file mode 100644
index 7563c41c..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-no-annotations-tot.svg
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-400
-600
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-p
-t
-a
-n
-c
-e
-
-
-A
-Îğ
-
-
-(
-/1
-)
-object-as-filter-afr-no-annotations-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-plus-segments-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-afr-plus-segments-tot.svg
deleted file mode 100644
index 8c128753..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-plus-segments-tot.svg
+++ /dev/null
@@ -1,182 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-334.8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0.954
-UVB
-0.957
-UVA
-0.955
-PhR
-0.852
-A
-Îğ
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-p
-t
-a
-n
-c
-e
-
-
-A
-Îğ
-
-
-(
-/1
-)
-object-as-filter-afr-plus-segments-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-range-num-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-afr-range-num-tot.svg
deleted file mode 100644
index c8c2972f..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-range-num-tot.svg
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-668.2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]PhR[
-0.81
-A
-Îğ
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-500
-550
-600
-650
-700
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-p
-t
-a
-n
-c
-e
-
-
-A
-Îğ
-
-
-(
-/1
-)
-object-as-filter-afr-range-num-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-range-wb-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-afr-range-wb-tot.svg
deleted file mode 100644
index 5d3471e1..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-range-wb-tot.svg
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-668.2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]PhR[
-0.81
-A
-Îğ
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-500
-550
-600
-650
-700
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-p
-t
-a
-n
-c
-e
-
-
-A
-Îğ
-
-
-(
-/1
-)
-object-as-filter-afr-range-wb-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-reserve-space-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-afr-reserve-space-tot.svg
deleted file mode 100644
index 527a3087..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-reserve-space-tot.svg
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-p
-t
-a
-n
-c
-e
-
-
-A
-Îğ
-
-
-(
-/1
-)
-object-as-filter-afr-reserve-space-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-text-size-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-afr-text-size-tot.svg
deleted file mode 100644
index d27425f8..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-text-size-tot.svg
+++ /dev/null
@@ -1,182 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-334.8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0.954
-UVB
-0.957
-UVA
-0.955
-PhR
-0.852
-A
-Îğ
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-p
-t
-a
-n
-c
-e
-
-
-A
-Îğ
-
-
-(
-/1
-)
-object-as-filter-afr-text-size-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-wb-vis-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-afr-wb-vis-tot.svg
deleted file mode 100644
index 30ff3193..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-afr-wb-vis-tot.svg
+++ /dev/null
@@ -1,188 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-334.8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Purple
-0.946
-Blue
-0.93
-Green
-0.761
-Yellow
-0.761
-Orange
-0.804
-Red
-0.608
-A
-Îğ
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-a
-b
-s
-o
-r
-p
-t
-a
-n
-c
-e
-
-
-A
-Îğ
-
-
-(
-/1
-)
-object-as-filter-afr-wb-vis-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-default-pc-out-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-default-pc-out-tot.svg
deleted file mode 100644
index 12138490..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-default-pc-out-tot.svg
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-850
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0.00473
-UVB
-0.15
-UVA
-0.724
-PhR
-6.23
-T
-Îğ
-t
-o
-t
-
-(
-%
-)
-
-
-
-0%
-25%
-50%
-75%
-100%
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-t
-r
-a
-n
-s
-m
-i
-t
-t
-a
-n
-c
-e
-
-
-T
-Îğ
-tot
-
-
-(
-%
-)
-object-as-filter-tfr-default-pc-out-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-minus-guide-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-minus-guide-tot.svg
deleted file mode 100644
index 3170d330..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-minus-guide-tot.svg
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-850
-
-
-
-
-
-]UVC
-4.73e-05
-UVB
-0.0015
-UVA
-0.00724
-PhR
-0.0623
-T
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-t
-r
-a
-n
-s
-m
-i
-t
-t
-a
-n
-c
-e
-
-
-T
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-filter-tfr-minus-guide-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-no-annotations-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-no-annotations-tot.svg
deleted file mode 100644
index beb0c9f5..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-no-annotations-tot.svg
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.0
-0.1
-0.2
-0.3
-0.4
-
-
-
-
-
-
-
-
-400
-600
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-t
-r
-a
-n
-s
-m
-i
-t
-t
-a
-n
-c
-e
-
-
-T
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-filter-tfr-no-annotations-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-plus-segments-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-plus-segments-tot.svg
deleted file mode 100644
index d126b8f8..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-plus-segments-tot.svg
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-850
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-4.73e-05
-UVB
-0.0015
-UVA
-0.00724
-PhR
-0.0623
-T
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-t
-r
-a
-n
-s
-m
-i
-t
-t
-a
-n
-c
-e
-
-
-T
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-filter-tfr-plus-segments-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-range-num-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-range-num-tot.svg
deleted file mode 100644
index 7fa5244f..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-range-num-tot.svg
+++ /dev/null
@@ -1,204 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-700
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]PhR[
-0.0866
-T
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-500
-550
-600
-650
-700
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-t
-r
-a
-n
-s
-m
-i
-t
-t
-a
-n
-c
-e
-
-
-T
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-filter-tfr-range-num-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-range-wb-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-range-wb-tot.svg
deleted file mode 100644
index e8cd65e3..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-range-wb-tot.svg
+++ /dev/null
@@ -1,204 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-700
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]PhR[
-0.0866
-T
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-500
-550
-600
-650
-700
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-t
-r
-a
-n
-s
-m
-i
-t
-t
-a
-n
-c
-e
-
-
-T
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-filter-tfr-range-wb-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-reserve-space-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-reserve-space-tot.svg
deleted file mode 100644
index 816ca134..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-reserve-space-tot.svg
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-t
-r
-a
-n
-s
-m
-i
-t
-t
-a
-n
-c
-e
-
-
-T
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-filter-tfr-reserve-space-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-wb-vis-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-wb-vis-tot.svg
deleted file mode 100644
index 680ca4af..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-filter-tfr-wb-vis-tot.svg
+++ /dev/null
@@ -1,197 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-850
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Purple
-0.0099
-Blue
-0.0181
-Green
-0.107
-Yellow
-0.113
-Orange
-0.0952
-Red
-0.171
-T
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-t
-r
-a
-n
-s
-m
-i
-t
-t
-a
-n
-c
-e
-
-
-T
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-filter-tfr-wb-vis-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-reflector-default-pc-out-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-reflector-default-pc-out-tot.svg
deleted file mode 100644
index 9c927988..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-reflector-default-pc-out-tot.svg
+++ /dev/null
@@ -1,189 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-759.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0.0462
-UVB
-0.0412
-UVA
-0.0374
-PhR
-0.0853
-R
-Îğ
-t
-o
-t
-
-(
-%
-)
-
-
-
-0%
-25%
-50%
-75%
-100%
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-r
-e
-f
-l
-e
-c
-t
-a
-n
-c
-e
-
-
-R
-Îğ
-tot
-
-
-(
-%
-)
-object-as-reflector-default-pc-out-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-reflector-default-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-reflector-default-tot.svg
deleted file mode 100644
index 459a9430..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-reflector-default-tot.svg
+++ /dev/null
@@ -1,189 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-759.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0.0462
-UVB
-0.0412
-UVA
-0.0374
-PhR
-0.0853
-R
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-r
-e
-f
-l
-e
-c
-t
-a
-n
-c
-e
-
-
-R
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-reflector-default-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-reflector-minus-guide-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-reflector-minus-guide-tot.svg
deleted file mode 100644
index 2a564178..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-reflector-minus-guide-tot.svg
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-759.1
-
-
-
-
-
-]UVC
-0.0462
-UVB
-0.0412
-UVA
-0.0374
-PhR
-0.0853
-R
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-r
-e
-f
-l
-e
-c
-t
-a
-n
-c
-e
-
-
-R
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-reflector-minus-guide-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-reflector-no-annotations-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-reflector-no-annotations-tot.svg
deleted file mode 100644
index 7e7e1797..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-reflector-no-annotations-tot.svg
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.1
-0.2
-0.3
-0.4
-0.5
-
-
-
-
-
-
-
-
-400
-600
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-r
-e
-f
-l
-e
-c
-t
-a
-n
-c
-e
-
-
-R
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-reflector-no-annotations-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-reflector-plus-segments-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-reflector-plus-segments-tot.svg
deleted file mode 100644
index 82cb4428..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-reflector-plus-segments-tot.svg
+++ /dev/null
@@ -1,189 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-759.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0.0462
-UVB
-0.0412
-UVA
-0.0374
-PhR
-0.0853
-R
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-r
-e
-f
-l
-e
-c
-t
-a
-n
-c
-e
-
-
-R
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-reflector-plus-segments-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-reflector-range-num-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-reflector-range-num-tot.svg
deleted file mode 100644
index 36fd5b05..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-reflector-range-num-tot.svg
+++ /dev/null
@@ -1,202 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-700
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]PhR[
-0.103
-R
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-500
-550
-600
-650
-700
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-r
-e
-f
-l
-e
-c
-t
-a
-n
-c
-e
-
-
-R
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-reflector-range-num-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-reflector-range-wb-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-reflector-range-wb-tot.svg
deleted file mode 100644
index 7165329d..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-reflector-range-wb-tot.svg
+++ /dev/null
@@ -1,202 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-700
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]PhR[
-0.103
-R
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-500
-550
-600
-650
-700
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-r
-e
-f
-l
-e
-c
-t
-a
-n
-c
-e
-
-
-R
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-reflector-range-wb-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-reflector-reserve-space-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-reflector-reserve-space-tot.svg
deleted file mode 100644
index ec1885a7..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-reflector-reserve-space-tot.svg
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-r
-e
-f
-l
-e
-c
-t
-a
-n
-c
-e
-
-
-R
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-reflector-reserve-space-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-reflector-text-size-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-reflector-text-size-tot.svg
deleted file mode 100644
index ac2b6da3..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-reflector-text-size-tot.svg
+++ /dev/null
@@ -1,189 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-759.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0.0462
-UVB
-0.0412
-UVA
-0.0374
-PhR
-0.0853
-R
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-r
-e
-f
-l
-e
-c
-t
-a
-n
-c
-e
-
-
-R
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-reflector-text-size-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/object-as-reflector-wb-vis-tot.svg b/tests/testthat/_snaps/plot-methods/object-as-reflector-wb-vis-tot.svg
deleted file mode 100644
index 4d508b58..00000000
--- a/tests/testthat/_snaps/plot-methods/object-as-reflector-wb-vis-tot.svg
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-759.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Purple
-0.0445
-Blue
-0.0517
-Green
-0.131
-Yellow
-0.126
-Orange
-0.101
-Red
-0.221
-R
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-r
-e
-f
-l
-e
-c
-t
-a
-n
-c
-e
-
-
-R
-Îğ
-tot
-
-
-(
-/1
-)
-object-as-reflector-wb-vis-tot
-
-
diff --git a/tests/testthat/_snaps/plot-methods/reflector-default-tot-norm-skip.svg b/tests/testthat/_snaps/plot-methods/reflector-default-tot-norm-skip.svg
deleted file mode 100644
index 63089509..00000000
--- a/tests/testthat/_snaps/plot-methods/reflector-default-tot-norm-skip.svg
+++ /dev/null
@@ -1,189 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-759.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0.0462
-UVB
-0.0412
-UVA
-0.0374
-PhR
-0.0853
-R
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-r
-e
-f
-l
-e
-c
-t
-a
-n
-c
-e
-
-
-R
-Îğ
-tot
-
-
-(
-/1
-)
-reflector-default-tot-norm-skip
-
-
diff --git a/tests/testthat/_snaps/plot-methods/reflector-default-tot-norm-update.svg b/tests/testthat/_snaps/plot-methods/reflector-default-tot-norm-update.svg
deleted file mode 100644
index d8759d2a..00000000
--- a/tests/testthat/_snaps/plot-methods/reflector-default-tot-norm-update.svg
+++ /dev/null
@@ -1,189 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-759.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0.0462
-UVB
-0.0412
-UVA
-0.0374
-PhR
-0.0853
-R
-Îğ
-t
-o
-t
-
-(
-/1
-)
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-Total
-
-
-s
-p
-e
-c
-t
-r
-a
-l
-
-
-r
-e
-f
-l
-e
-c
-t
-a
-n
-c
-e
-
-
-R
-Îğ
-tot
-
-
-(
-/1
-)
-reflector-default-tot-norm-update
-
-
diff --git a/tests/testthat/_snaps/plot-methods/response-default-normalized.svg b/tests/testthat/_snaps/plot-methods/response-default-normalized.svg
deleted file mode 100644
index 347ca9ba..00000000
--- a/tests/testthat/_snaps/plot-methods/response-default-normalized.svg
+++ /dev/null
@@ -1,193 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-747.7
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0.03
-UVB
-0.02
-UVA
-0.06
-PhR
-0.41
-C
-o
-n
-t
-r
-i
-b
-u
-t
-i
-o
-n
-
-
-t
-o
-
-
-t
-o
-t
-a
-l
-R
-E
-
-
-(
-/1
-)
-
-
-
-0.0
-0.5
-1.0
-
-
-
-
-
-
-
-
-200
-400
-600
-800
-1000
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-R
-E
-
-Îğ
-=
-600
-
-
-(
-rel.
-)
-response-default-normalized
-
-
diff --git a/tests/testthat/_snaps/plot-methods/response-mspct-default-autop.svg b/tests/testthat/_snaps/plot-methods/response-mspct-default-autop.svg
deleted file mode 100644
index 88dd962d..00000000
--- a/tests/testthat/_snaps/plot-methods/response-mspct-default-autop.svg
+++ /dev/null
@@ -1,198 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-747.7
-747.7
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-UVB
-UVA
-PhR
-
-
-0e+00
-2e-06
-4e-06
-
-
-
-
-
-
-
-
-200
-400
-600
-800
-1000
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-
-(
-r
-e
-s
-p
-.
-
-
-u
-n
-i
-t
-
-
-d
-â
-1
-
-n
-m
-â
-1
-)
-
-spct.idx
-
-
-
-
-one
-half
-response-mspct-default-autop
-
-
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-mean-e.svg b/tests/testthat/_snaps/plot-methods/source-mspct-mean-e.svg
deleted file mode 100644
index 9de91ede..00000000
--- a/tests/testthat/_snaps/plot-methods/source-mspct-mean-e.svg
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-604.4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0
-UVB
-0
-UVA
-0
-PhR
-6.75e-05
-E
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-)
-
-
-
-0e+00
-1e-07
-2e-07
-3e-07
-4e-07
-5e-07
-6e-07
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-900
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-e
-x
-p
-o
-s
-u
-r
-e
-
-
-E
-Îğ
-
-
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-
-n
-m
-â
-1
-)
-source-mspct-mean-e
-
-
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-mean.svg b/tests/testthat/_snaps/plot-methods/source-mspct-mean.svg
deleted file mode 100644
index d8ccef4a..00000000
--- a/tests/testthat/_snaps/plot-methods/source-mspct-mean.svg
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-604.4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0
-UVB
-0
-UVA
-0
-PhR
-6.75e-05
-E
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-)
-
-
-
-0e+00
-1e-07
-2e-07
-3e-07
-4e-07
-5e-07
-6e-07
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-900
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-e
-x
-p
-o
-s
-u
-r
-e
-
-
-E
-Îğ
-
-
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-
-n
-m
-â
-1
-)
-source-mspct-mean
-
-
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-median-e.svg b/tests/testthat/_snaps/plot-methods/source-mspct-median-e.svg
deleted file mode 100644
index 5d0c077a..00000000
--- a/tests/testthat/_snaps/plot-methods/source-mspct-median-e.svg
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-604.4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0
-UVB
-0
-UVA
-0
-PhR
-6.75e-05
-E
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-)
-
-
-
-0e+00
-1e-07
-2e-07
-3e-07
-4e-07
-5e-07
-6e-07
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-900
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-e
-x
-p
-o
-s
-u
-r
-e
-
-
-E
-Îğ
-
-
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-
-n
-m
-â
-1
-)
-source-mspct-median-e
-
-
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-median.svg b/tests/testthat/_snaps/plot-methods/source-mspct-median.svg
deleted file mode 100644
index c8e42479..00000000
--- a/tests/testthat/_snaps/plot-methods/source-mspct-median.svg
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-604.4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0
-UVB
-0
-UVA
-0
-PhR
-6.75e-05
-E
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-)
-
-
-
-0e+00
-1e-07
-2e-07
-3e-07
-4e-07
-5e-07
-6e-07
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-900
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-e
-x
-p
-o
-s
-u
-r
-e
-
-
-E
-Îğ
-
-
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-
-n
-m
-â
-1
-)
-source-mspct-median
-
-
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-no-annotations.svg b/tests/testthat/_snaps/plot-methods/source-mspct-no-annotations.svg
deleted file mode 100644
index 25e5d9e1..00000000
--- a/tests/testthat/_snaps/plot-methods/source-mspct-no-annotations.svg
+++ /dev/null
@@ -1,128 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0e+00
-2e-07
-4e-07
-6e-07
-
-
-
-
-
-
-
-400
-600
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-e
-x
-p
-o
-s
-u
-r
-e
-
-
-E
-Îğ
-
-
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-
-n
-m
-â
-1
-)
-
-spct.idx
-
-
-
-
-one
-half
-source-mspct-no-annotations
-
-
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-reserve-space.svg b/tests/testthat/_snaps/plot-methods/source-mspct-reserve-space.svg
deleted file mode 100644
index 6d1c3301..00000000
--- a/tests/testthat/_snaps/plot-methods/source-mspct-reserve-space.svg
+++ /dev/null
@@ -1,147 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0e+00
-2e-07
-4e-07
-6e-07
-8e-07
-
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-900
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-e
-x
-p
-o
-s
-u
-r
-e
-
-
-E
-Îğ
-
-
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-
-n
-m
-â
-1
-)
-
-spct.idx
-
-
-
-
-one
-half
-source-mspct-reserve-space
-
-
diff --git a/tests/testthat/_snaps/plot-methods/source-mspct-sum.svg b/tests/testthat/_snaps/plot-methods/source-mspct-sum.svg
deleted file mode 100644
index 40e73c66..00000000
--- a/tests/testthat/_snaps/plot-methods/source-mspct-sum.svg
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-604.4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]UVC
-0
-UVB
-0
-UVA
-0
-PhR
-0.000135
-E
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-)
-
-
-
-0.0e+00
-2.0e-07
-4.0e-07
-6.0e-07
-8.0e-07
-1.0e-06
-1.2e-06
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-900
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-e
-x
-p
-o
-s
-u
-r
-e
-
-
-E
-Îğ
-
-
-(
-M
-J
-
-d
-â
-1
-
-m
-â
-2
-
-n
-m
-â
-1
-)
-source-mspct-sum
-
-
diff --git a/tests/testthat/_snaps/plot-methods/waveband-default-cie-autop.svg b/tests/testthat/_snaps/plot-methods/waveband-default-cie-autop.svg
deleted file mode 100644
index 03323395..00000000
--- a/tests/testthat/_snaps/plot-methods/waveband-default-cie-autop.svg
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Range of CIE98
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-250
-300
-350
-400
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-R
-E
-
-Îğ
-=
-298
-
-
-(
-rel.
-)
-waveband-default-cie-autop
-
-
diff --git a/tests/testthat/_snaps/plot-methods/waveband-default-cie.svg b/tests/testthat/_snaps/plot-methods/waveband-default-cie.svg
deleted file mode 100644
index f57b0ce3..00000000
--- a/tests/testthat/_snaps/plot-methods/waveband-default-cie.svg
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Range of CIE98
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-250
-300
-350
-400
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-R
-E
-
-Îğ
-=
-298
-
-
-(
-rel.
-)
-waveband-default-cie
-
-
diff --git a/tests/testthat/_snaps/plot-methods/waveband-default-red.svg b/tests/testthat/_snaps/plot-methods/waveband-default-red.svg
deleted file mode 100644
index f609f07a..00000000
--- a/tests/testthat/_snaps/plot-methods/waveband-default-red.svg
+++ /dev/null
@@ -1,187 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Red
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-R
-E
-
-Îğ
-=
-610
-
-
-(
-rel.
-)
-waveband-default-red
-
-
diff --git a/tests/testthat/_snaps/plot-methods/waveband-default-ylim.svg b/tests/testthat/_snaps/plot-methods/waveband-default-ylim.svg
deleted file mode 100644
index 5a34bb4b..00000000
--- a/tests/testthat/_snaps/plot-methods/waveband-default-ylim.svg
+++ /dev/null
@@ -1,185 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Red
-
-
-
-0.0
-0.5
-1.0
-1.5
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-R
-E
-
-Îğ
-=
-610
-
-
-(
-rel.
-)
-waveband-default-ylim
-
-
diff --git a/tests/testthat/_snaps/plot-methods/waveband-minus-boxes.svg b/tests/testthat/_snaps/plot-methods/waveband-minus-boxes.svg
deleted file mode 100644
index 81fc94e3..00000000
--- a/tests/testthat/_snaps/plot-methods/waveband-minus-boxes.svg
+++ /dev/null
@@ -1,186 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Red
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-R
-E
-
-Îğ
-=
-610
-
-
-(
-rel.
-)
-waveband-minus-boxes
-
-
diff --git a/tests/testthat/_snaps/plot-methods/waveband-no-annotations.svg b/tests/testthat/_snaps/plot-methods/waveband-no-annotations.svg
deleted file mode 100644
index 10d14dbe..00000000
--- a/tests/testthat/_snaps/plot-methods/waveband-no-annotations.svg
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-R
-E
-
-Îğ
-=
-610
-
-
-(
-rel.
-)
-waveband-no-annotations
-
-
diff --git a/tests/testthat/_snaps/plot-methods/waveband-plus-segments.svg b/tests/testthat/_snaps/plot-methods/waveband-plus-segments.svg
deleted file mode 100644
index b7322708..00000000
--- a/tests/testthat/_snaps/plot-methods/waveband-plus-segments.svg
+++ /dev/null
@@ -1,187 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Red
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-R
-E
-
-Îğ
-=
-610
-
-
-(
-rel.
-)
-waveband-plus-segments
-
-
diff --git a/tests/testthat/_snaps/plot-methods/waveband-reserve-space.svg b/tests/testthat/_snaps/plot-methods/waveband-reserve-space.svg
deleted file mode 100644
index 84c7b042..00000000
--- a/tests/testthat/_snaps/plot-methods/waveband-reserve-space.svg
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-R
-E
-
-Îğ
-=
-610
-
-
-(
-rel.
-)
-waveband-reserve-space
-
-
diff --git a/tests/testthat/_snaps/plot-methods/waveband-text-size.svg b/tests/testthat/_snaps/plot-methods/waveband-text-size.svg
deleted file mode 100644
index cb933186..00000000
--- a/tests/testthat/_snaps/plot-methods/waveband-text-size.svg
+++ /dev/null
@@ -1,187 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Red
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-
-
-
-
-
-
-300
-400
-500
-600
-700
-800
-Wavelength,
-Îğ
-
-(
-n
-m
-)
-S
-p
-e
-c
-t
-r
-a
-l
-
-
-e
-n
-e
-r
-g
-y
-
-
-r
-e
-s
-p
-o
-n
-s
-e
-
-
-R
-E
-
-Îğ
-
-R
-E
-
-Îğ
-=
-610
-
-
-(
-rel.
-)
-waveband-text-size
-
-
diff --git a/tests/testthat/test-autoplot-cps-spct.R b/tests/testthat/test-autoplot-cps-spct.R
new file mode 100644
index 00000000..9dbd3c01
--- /dev/null
+++ b/tests/testthat/test-autoplot-cps-spct.R
@@ -0,0 +1,33 @@
+context("autoplot-cps")
+library(ggplot2)
+library(photobiology)
+
+# We prepare shorter data objects for spectra to improve tests' runtime.
+# We also make sure no data are exactly at the boundary of the possible range to
+# avoid warnings. Such values are physically possible but not measurable.
+length.out.spct <- 100L
+white_led.cps_spct <- interpolate_spct(photobiology::white_led.cps_spct,
+ length.out = length.out.spct)
+
+test_that("cps_spct", {
+ set_annotations_default()
+ vdiffr::expect_doppelganger("cps-default",
+ autoplot(white_led.cps_spct))
+ vdiffr::expect_doppelganger("cps-ylim1",
+ autoplot(white_led.cps_spct, ylim = c(NA, 5e5)))
+ vdiffr::expect_doppelganger("cps-ylim2",
+ autoplot(white_led.cps_spct, ylim = c(-1e5, 5e5)))
+ vdiffr::expect_doppelganger("cps-range-num",
+ autoplot(white_led.cps_spct, range = c(500, 700)))
+ vdiffr::expect_doppelganger("cps-range-wb",
+ autoplot(white_led.cps_spct, range = waveband(c(500, 700))))
+ vdiffr::expect_doppelganger("cps-no-annotations",
+ autoplot(white_led.cps_spct, annotations = ""))
+ vdiffr::expect_doppelganger("cps-reserve-space",
+ autoplot(white_led.cps_spct, annotations = "reserve.space"))
+ vdiffr::expect_doppelganger("cps-minus-annotations",
+ autoplot(white_led.cps_spct, annotations = c("-", "summaries")))
+ vdiffr::expect_doppelganger("cps-plus-annotations",
+ autoplot(white_led.cps_spct, annotations = c("+", "boundaries")))
+})
+
diff --git a/tests/testthat/test-autoplot-filter-spct.R b/tests/testthat/test-autoplot-filter-spct.R
new file mode 100644
index 00000000..6bac3614
--- /dev/null
+++ b/tests/testthat/test-autoplot-filter-spct.R
@@ -0,0 +1,414 @@
+context("autoplot-filter")
+library(ggplot2)
+library(photobiology)
+library(photobiologyWavebands)
+
+# We prepare shorter data objects for spectra to improve tests' runtime.
+# We also make sure no data are exactly at the boundary of the possible range to
+# avoid warnings. Such values are physically possible but not measurable.
+length.out.spct <- 100L
+Ler_leaf_trns.spct <- interpolate_spct(photobiology::Ler_leaf_trns.spct, length.out = length.out.spct)
+Ler_leaf_trns.spct <- clean(Ler_leaf_trns.spct, range.s.data = c(1e-5, 1 - 1e-5))
+Ler_leaf_trns_i.spct <- interpolate_spct(photobiology::Ler_leaf_trns_i.spct, length.out = length.out.spct)
+Ler_leaf_trns_i.spct <- clean(Ler_leaf_trns_i.spct, range.s.data = c(1e-5, 1 - 1e-5))
+Ler_leaf_rflt.spct <- interpolate_spct(photobiology::Ler_leaf_rflt.spct, length.out = length.out.spct)
+Ler_leaf_rflt.spct <- clean(Ler_leaf_rflt.spct, range.s.data = c(1e-5, 1 - 1e-5))
+Ler_leaf.spct <- clean(Ler_leaf.spct, min.Afr = 1e-5, range.s.data = c(1e-5, 1 - 1e-5))
+Ler_leaf.spct <- interpolate_spct(photobiology::Ler_leaf.spct, length.out = length.out.spct)
+Ler_leaf.spct <- clean(Ler_leaf.spct, min.Afr = 1e-5, range.s.data = c(1e-5, 1 - 1e-5))
+
+
+test_that("filter_spct default", {
+ set_annotations_default()
+ Tfr_as_default()
+
+ vdiffr::expect_doppelganger("filter-default-tot-scaled",
+ autoplot(fscale(Ler_leaf_trns.spct, target = 0.06,
+ range = c(400,700), set.scaled = TRUE)))
+ vdiffr::expect_doppelganger("filter-default-tot-normalized",
+ autoplot(normalize(Ler_leaf_trns.spct, norm = "max")))
+
+ vdiffr::expect_doppelganger("filter-default-tot",
+ autoplot(Ler_leaf_trns.spct))
+ vdiffr::expect_doppelganger("filter-default-tot2a",
+ autoplot(Ler_leaf_trns.spct, plot.qty = "absorbance"))
+ # vdiffr::expect_doppelganger("filter-default-tot2afr",
+ # autoplot(Ler_leaf_trns.spct, plot.qty = "absorptance"))
+ vdiffr::expect_doppelganger("filter-default-tot-ylim",
+ autoplot(Ler_leaf_trns.spct, ylim = c(-0.05, 0.5)))
+ vdiffr::expect_doppelganger("filter-default-pc-out-tot",
+ autoplot(Ler_leaf_trns.spct, pc.out = TRUE))
+ vdiffr::expect_doppelganger("filter-text-size-tot",
+ autoplot(Ler_leaf_trns.spct, text.size = 3.5))
+ vdiffr::expect_doppelganger("filter-span-31-tot",
+ autoplot(Ler_leaf_trns.spct, span = 31))
+ vdiffr::expect_doppelganger("filter-wb-vis-tot",
+ autoplot(Ler_leaf_trns.spct, w.band = VIS_bands()))
+ vdiffr::expect_doppelganger("filter-label-average-tot",
+ autoplot(Ler_leaf_trns.spct, label.qty = "average"))
+ vdiffr::expect_doppelganger("filter-label-mean-tot",
+ autoplot(Ler_leaf_trns.spct, label.qty = "mean"))
+ vdiffr::expect_doppelganger("filter-range-num-tot",
+ autoplot(Ler_leaf_trns.spct, range = c(500, 700)))
+ vdiffr::expect_doppelganger("filter-range-wb-tot",
+ autoplot(Ler_leaf_trns.spct, range = waveband(c(500, 700))))
+ vdiffr::expect_doppelganger("filter-no-annotations-tot",
+ autoplot(Ler_leaf_trns.spct, annotations = ""))
+ vdiffr::expect_doppelganger("filter-minus-annotations-tot",
+ autoplot(Ler_leaf_trns.spct, annotations = c("-", "summaries")))
+ vdiffr::expect_doppelganger("filter-plus-annotations-tot",
+ autoplot(Ler_leaf_trns.spct, annotations = c("+", "boundaries")))
+
+ vdiffr::expect_doppelganger("filter-default-scaled",
+ autoplot(fscale(Ler_leaf_trns_i.spct, target = 0.06,
+ range = c(400,700), set.scaled = TRUE)))
+ vdiffr::expect_doppelganger("filter-default-normalized",
+ autoplot(normalize(Ler_leaf_trns_i.spct, norm = "max")))
+
+ vdiffr::expect_doppelganger("filter-default",
+ autoplot(Ler_leaf_trns_i.spct))
+ vdiffr::expect_doppelganger("filter-default-ylim",
+ autoplot(Ler_leaf_trns_i.spct, ylim = c(NA, 1.2)))
+ vdiffr::expect_doppelganger("filter-default-pc-out",
+ autoplot(Ler_leaf_trns_i.spct, pc.out = TRUE))
+ vdiffr::expect_doppelganger("filter-text-size",
+ autoplot(Ler_leaf_trns_i.spct, text.size = 3.5))
+ vdiffr::expect_doppelganger("filter-span-31",
+ autoplot(Ler_leaf_trns_i.spct, span = 31))
+ vdiffr::expect_doppelganger("filter-wb-vis",
+ autoplot(Ler_leaf_trns_i.spct, w.band = VIS_bands()))
+ vdiffr::expect_doppelganger("filter-label-average",
+ autoplot(Ler_leaf_trns_i.spct, label.qty = "average"))
+ vdiffr::expect_doppelganger("filter-label-mean",
+ autoplot(Ler_leaf_trns_i.spct, label.qty = "mean"))
+ vdiffr::expect_doppelganger("filter-range-num",
+ autoplot(Ler_leaf_trns_i.spct, range = c(500, 700)))
+ vdiffr::expect_doppelganger("filter-range-wb",
+ autoplot(Ler_leaf_trns_i.spct, range = waveband(c(500, 700))))
+ vdiffr::expect_doppelganger("filter-no-annotations",
+ autoplot(Ler_leaf_trns_i.spct, annotations = ""))
+ vdiffr::expect_doppelganger("filter-reserve-space",
+ autoplot(Ler_leaf_trns_i.spct, annotations = "reserve.space"))
+ vdiffr::expect_doppelganger("filter-minus-summaries",
+ autoplot(Ler_leaf_trns_i.spct, annotations = c("-", "summaries")))
+ vdiffr::expect_doppelganger("filter-minus-boxes",
+ autoplot(Ler_leaf_trns_i.spct, annotations = c("-", "boxes")))
+ vdiffr::expect_doppelganger("filter-plus-boundaries",
+ autoplot(Ler_leaf_trns_i.spct, annotations = c("+", "boundaries")))
+ vdiffr::expect_doppelganger("filter-plus-segments",
+ autoplot(Ler_leaf_trns_i.spct, annotations = c("+", "segments")))
+})
+
+test_that("filter_spct absorptance", {
+ set_annotations_default()
+ Afr_as_default()
+
+ Ler_leaf_Afr_i_spct <- T2Afr(Ler_leaf_trns_i.spct)
+
+ vdiffr::expect_doppelganger("filter-default-apt",
+ autoplot(Ler_leaf_Afr_i_spct))
+ vdiffr::expect_doppelganger("filter-default-apt2t",
+ autoplot(Ler_leaf_Afr_i_spct,
+ plot.qty = "transmittance"))
+ vdiffr::expect_doppelganger("filter-default-apt2a",
+ autoplot(Ler_leaf_Afr_i_spct,
+ plot.qty = "absorbance"))
+ vdiffr::expect_doppelganger("filter-default-apt-ylim",
+ autoplot(Ler_leaf_Afr_i_spct, ylim = c(-0.1, 1.2)))
+ vdiffr::expect_doppelganger("filter-default-pc-out-apt",
+ autoplot(Ler_leaf_Afr_i_spct, pc.out = TRUE))
+ vdiffr::expect_doppelganger("filter-text-size-apt",
+ autoplot(Ler_leaf_Afr_i_spct, text.size = 3.5))
+ vdiffr::expect_doppelganger("filter-span-31-apt",
+ autoplot(Ler_leaf_Afr_i_spct, span = 31))
+ vdiffr::expect_doppelganger("filter-wb-vis-apt",
+ autoplot(Ler_leaf_Afr_i_spct, w.band = VIS_bands()))
+ vdiffr::expect_doppelganger("filter-label-average-apt",
+ autoplot(Ler_leaf_Afr_i_spct, label.qty = "average"))
+ vdiffr::expect_doppelganger("filter-label-mean-apt",
+ autoplot(Ler_leaf_Afr_i_spct, label.qty = "mean"))
+ vdiffr::expect_doppelganger("filter-range-num-apt",
+ autoplot(Ler_leaf_Afr_i_spct, range = c(500, 700)))
+ vdiffr::expect_doppelganger("filter-range-wb-apt",
+ autoplot(Ler_leaf_Afr_i_spct, range = waveband(c(500, 700))))
+ vdiffr::expect_doppelganger("filter-no-annotations-apt",
+ autoplot(Ler_leaf_Afr_i_spct, annotations = ""))
+ vdiffr::expect_doppelganger("filter-minus-summaries-q",
+ autoplot(Ler_leaf_Afr_i_spct, annotations = c("-", "summaries")))
+ vdiffr::expect_doppelganger("filter-minus-boxes-apt",
+ autoplot(Ler_leaf_Afr_i_spct, annotations = c("-", "boxes")))
+ vdiffr::expect_doppelganger("filter-plus-boundaries-apt",
+ autoplot(Ler_leaf_Afr_i_spct, annotations = c("+", "boundaries")))
+ vdiffr::expect_doppelganger("filter-plus-segments-apt",
+ autoplot(Ler_leaf_Afr_i_spct, annotations = c("+", "segments")))
+})
+
+test_that("filter_spct A", {
+ set_annotations_default()
+ A_as_default()
+
+ Ler_leaf_A_i_spct <- T2A(Ler_leaf_trns_i.spct, action = "replace")
+
+ vdiffr::expect_doppelganger("filter-default-a2t",
+ autoplot(Ler_leaf_A_i_spct, range = c(300, NA),
+ plot.qty = "transmittance"))
+ # vdiffr::expect_doppelganger("filter-default-a2afr",
+ # autoplot(Ler_leaf_A_i_spct, range = c(300, NA),
+ # plot.qty = "absorptance"))
+ vdiffr::expect_doppelganger("filter-default-a-scaled",
+ autoplot(fscale(Ler_leaf_A_i_spct, target = 2,
+ range = c(400,700), set.scaled = TRUE),
+ plot.qty = "absorbance", range = c(300, NA)))
+ vdiffr::expect_doppelganger("filter-default-a-normalized",
+ autoplot(normalize(Ler_leaf_A_i_spct, norm = "max"),
+ range = c(300, NA)))
+
+ vdiffr::expect_doppelganger("filter-default-a",
+ autoplot(Ler_leaf_A_i_spct, range = c(300, NA)))
+ vdiffr::expect_doppelganger("filter-default-a-ylim",
+ autoplot(Ler_leaf_A_i_spct, range = c(300, NA), ylim = c(-0.2, 4)))
+ vdiffr::expect_doppelganger("filter-text-size-a",
+ autoplot(Ler_leaf_A_i_spct, range = c(300, NA), text.size = 3.5))
+ vdiffr::expect_doppelganger("filter-span-31-a",
+ autoplot(Ler_leaf_A_i_spct, range = c(300, NA), span = 11))
+ vdiffr::expect_doppelganger("filter-wb-vis-a",
+ autoplot(Ler_leaf_A_i_spct, range = c(300, NA), w.band = VIS_bands()))
+ vdiffr::expect_doppelganger("filter-label-average-a",
+ autoplot(Ler_leaf_A_i_spct, range = c(300, NA), label.qty = "average"))
+ vdiffr::expect_doppelganger("filter-label-mean-a",
+ autoplot(Ler_leaf_A_i_spct, range = c(300, NA), label.qty = "mean"))
+ vdiffr::expect_doppelganger("filter-range-wb-a",
+ autoplot(Ler_leaf_A_i_spct, range = waveband(c(500, 700))))
+ vdiffr::expect_doppelganger("filter-no-annotations-a",
+ autoplot(Ler_leaf_A_i_spct, range = c(300, NA), annotations = ""))
+ vdiffr::expect_doppelganger("filter-minus-summaries-a",
+ autoplot(Ler_leaf_A_i_spct, range = c(300, NA), annotations = c("-", "summaries")))
+ vdiffr::expect_doppelganger("filter-minus-boxes-a",
+ autoplot(Ler_leaf_A_i_spct, range = c(300, NA), annotations = c("-", "boxes")))
+ vdiffr::expect_doppelganger("filter-plus-boundaries-a",
+ autoplot(Ler_leaf_A_i_spct, range = c(300, NA), annotations = c("+", "boundaries")))
+ vdiffr::expect_doppelganger("filter-plus-segments-a",
+ autoplot(Ler_leaf_A_i_spct, range = c(300, NA), annotations = c("+", "segments")))
+})
+
+test_that("filter_spct Tfr", {
+ set_annotations_default()
+ Tfr_as_default()
+
+ Ler_leaf_t_i_spct <- any2T(Ler_leaf_trns_i.spct, action = "replace")
+
+ vdiffr::expect_doppelganger("filter-default-tfr",
+ autoplot(Ler_leaf_t_i_spct))
+ vdiffr::expect_doppelganger("filter-default-tfr-ylim",
+ autoplot(Ler_leaf_t_i_spct, ylim = c(-0.2, 1.2)))
+ vdiffr::expect_doppelganger("filter-default-pc-out-tfr",
+ autoplot(Ler_leaf_t_i_spct, pc.out = TRUE))
+ vdiffr::expect_doppelganger("filter-text-size-tfr",
+ autoplot(Ler_leaf_t_i_spct, text.size = 3.5))
+ vdiffr::expect_doppelganger("filter-span-31-tfr",
+ autoplot(Ler_leaf_t_i_spct, span = 31))
+ vdiffr::expect_doppelganger("filter-wb-vis-tfr",
+ autoplot(Ler_leaf_t_i_spct, w.band = VIS_bands()))
+ vdiffr::expect_doppelganger("filter-label-average-tfr",
+ autoplot(Ler_leaf_t_i_spct, label.qty = "average"))
+ vdiffr::expect_doppelganger("filter-label-mean-tfr",
+ autoplot(Ler_leaf_t_i_spct, label.qty = "mean"))
+ vdiffr::expect_doppelganger("filter-range-num-tfr",
+ autoplot(Ler_leaf_t_i_spct, range = c(500, 700)))
+ vdiffr::expect_doppelganger("filter-range-wb-tfr",
+ autoplot(Ler_leaf_t_i_spct, range = waveband(c(500, 700))))
+ vdiffr::expect_doppelganger("filter-no-annotations-tfr",
+ autoplot(Ler_leaf_t_i_spct, annotations = ""))
+ vdiffr::expect_doppelganger("filter-minus-summaries-tfr",
+ autoplot(Ler_leaf_t_i_spct, annotations = c("-", "summaries")))
+ vdiffr::expect_doppelganger("filter-minus-boxes-tfr",
+ autoplot(Ler_leaf_t_i_spct, annotations = c("-", "boxes")))
+ vdiffr::expect_doppelganger("filter-plus-boundaries-tfr",
+ autoplot(Ler_leaf_t_i_spct, annotations = c("+", "boundaries")))
+ vdiffr::expect_doppelganger("filter-plus-segments-tfr",
+ autoplot(Ler_leaf_t_i_spct, annotations = c("+", "segments")))
+})
+
+test_that("filter_mspct", {
+ unset_filter_qty_default()
+ set_annotations_default()
+
+ two_leaves.mspct <- filter_mspct(list(one = Ler_leaf_trns_i.spct,
+ half = Ler_leaf_trns_i.spct / 2))
+ vdiffr::expect_doppelganger("filter-mspct-default",
+ autoplot(two_leaves.mspct))
+ vdiffr::expect_doppelganger("filter-mspct-default-ylim",
+ autoplot(two_leaves.mspct, ylim = c(-0.2, 1.2)))
+ vdiffr::expect_doppelganger("filter-mspct-default-range",
+ autoplot(two_leaves.mspct, range = c(500, 700)))
+ # use range to avoid Tfr == 0 values.
+ vdiffr::expect_doppelganger("filter-mspct-default-A",
+ autoplot(T2A(two_leaves.mspct, action = "replace"),
+ range = c(400,750)))
+ vdiffr::expect_doppelganger("filter-mspct-default-Afr",
+ autoplot(T2Afr(two_leaves.mspct, action = "replace"),
+ range = c(400,750)))
+ vdiffr::expect_doppelganger("filter-mspct-default-Tfr",
+ autoplot(any2T(two_leaves.mspct, action = "replace"),
+ range = c(400,750)))
+ vdiffr::expect_doppelganger("filter-mspct-no-annotations",
+ autoplot(two_leaves.mspct, annotations = ""))
+ vdiffr::expect_doppelganger("filter-mspct-reserve-space",
+ autoplot(two_leaves.mspct, annotations = "reserve.space"))
+ vdiffr::expect_doppelganger("filter-mspct-mean",
+ autoplot(two_leaves.mspct, plot.data = "mean"))
+ vdiffr::expect_doppelganger("filter-mspct-median",
+ autoplot(two_leaves.mspct, plot.data = "median"))
+ # triggers warning
+ # vdiffr::expect_doppelganger("filter-mspct-sum",
+ # autoplot(two_leaves.mspct, plot.data = "sum"))
+ testthat::expect_warning(autoplot(two_leaves.mspct, plot.data = "sum"))
+ vdiffr::expect_doppelganger("filter-mspct-sum",
+ autoplot(two_leaves.mspct, plot.data = "prod"))
+ vdiffr::expect_doppelganger("filter-mspct-se",
+ autoplot(two_leaves.mspct, plot.data = "se"))
+ vdiffr::expect_doppelganger("filter-mspct-se-ylab",
+ autoplot(two_leaves.mspct, plot.data = "se", ylab = "Standard error of the mean"))
+ vdiffr::expect_doppelganger("filter-mspct-var",
+ autoplot(two_leaves.mspct, plot.data = "var"))
+ vdiffr::expect_doppelganger("filter-mspct-var-ylab",
+ autoplot(two_leaves.mspct, plot.data = "var", ylab = "Variance"))
+ vdiffr::expect_doppelganger("filter-mspct-mean-Tfr",
+ autoplot(any2T(two_leaves.mspct, action = "replace"), plot.data = "mean"))
+ vdiffr::expect_doppelganger("filter-mspct-median-Tfr",
+ autoplot(any2T(two_leaves.mspct, action = "replace"), plot.data = "median"))
+ # Bug in photobiology::rowwise_filter() (fixed in photobiology >= 0.10.11) affected next two staements
+ vdiffr::expect_doppelganger("filter-mspct-mean-Afr",
+ autoplot(T2Afr(two_leaves.mspct, action = "replace"), plot.data = "mean"))
+ vdiffr::expect_doppelganger("filter-mspct-median-Afr",
+ autoplot(T2Afr(two_leaves.mspct, action = "replace"), plot.data = "median"))
+ vdiffr::expect_doppelganger("filter-mspct-mean-A",
+ autoplot(T2A(two_leaves.mspct, action = "replace"), plot.data = "mean"))
+ vdiffr::expect_doppelganger("filter-mspct-median-A",
+ autoplot(T2A(two_leaves.mspct, action = "replace"), plot.data = "median"))
+})
+
+test_that("reflector_spct", {
+ set_annotations_default()
+ vdiffr::expect_doppelganger("reflector-default-tot-scaled",
+ autoplot(fscale(Ler_leaf_rflt.spct, target = 0.06,
+ range = c(400,700), set.scaled = TRUE)))
+ vdiffr::expect_doppelganger("reflector-default-tot-normalized",
+ autoplot(normalize(Ler_leaf_rflt.spct, norm = "max")))
+ vdiffr::expect_doppelganger("reflector-default-tot-normalized-759",
+ autoplot(normalize(Ler_leaf_rflt.spct, norm = 759.1)))
+
+ vdiffr::expect_doppelganger("reflector-default-tot",
+ autoplot(Ler_leaf_rflt.spct))
+ vdiffr::expect_doppelganger("reflector-default-tot-ylim",
+ autoplot(Ler_leaf_rflt.spct, ylim = c(-0.1, 0.65)))
+ vdiffr::expect_doppelganger("reflector-default-pc-out-tot",
+ autoplot(Ler_leaf_rflt.spct, pc.out = TRUE))
+ vdiffr::expect_doppelganger("reflector-text-size-tot",
+ autoplot(Ler_leaf_rflt.spct, text.size = 3.5))
+ vdiffr::expect_doppelganger("reflector-span-31-tot",
+ autoplot(Ler_leaf_rflt.spct, span = 31))
+ vdiffr::expect_doppelganger("reflector-wb-vis-tot",
+ autoplot(Ler_leaf_rflt.spct, w.band = VIS_bands()))
+ vdiffr::expect_doppelganger("reflector-label-average-tot",
+ autoplot(Ler_leaf_rflt.spct, label.qty = "average"))
+ vdiffr::expect_doppelganger("reflector-label-mean-tot",
+ autoplot(Ler_leaf_rflt.spct, label.qty = "mean"))
+ vdiffr::expect_doppelganger("reflector-range-num-tot",
+ autoplot(Ler_leaf_rflt.spct, range = c(500, 700)))
+ vdiffr::expect_doppelganger("reflector-range-wb-tot",
+ autoplot(Ler_leaf_rflt.spct, range = waveband(c(500, 700))))
+ vdiffr::expect_doppelganger("reflector-no-annotations-tot",
+ autoplot(Ler_leaf_rflt.spct, annotations = ""))
+ vdiffr::expect_doppelganger("reflector-minus-annotations-tot",
+ autoplot(Ler_leaf_rflt.spct, annotations = c("-", "summaries")))
+ vdiffr::expect_doppelganger("reflector-plus-annotations-tot",
+ autoplot(Ler_leaf_rflt.spct, annotations = c("+", "boundaries")))
+})
+
+test_that("reflector_mspct", {
+ set_annotations_default()
+ two_leaves_Rfr.mspct <- reflector_mspct(list(one = Ler_leaf_rflt.spct,
+ half = Ler_leaf_rflt.spct / 2))
+ vdiffr::expect_doppelganger("reflector-mspct-default",
+ autoplot(two_leaves_Rfr.mspct))
+ vdiffr::expect_doppelganger("reflector-mspct-default-range",
+ autoplot(two_leaves_Rfr.mspct, range = c(500, 700)))
+ vdiffr::expect_doppelganger("reflector-mspct-no-annotations",
+ autoplot(two_leaves_Rfr.mspct, annotations = ""))
+ vdiffr::expect_doppelganger("reflector-mspct-reserve-space",
+ autoplot(two_leaves_Rfr.mspct, annotations = "reserve.space"))
+ vdiffr::expect_doppelganger("reflector-mspct-mean",
+ autoplot(two_leaves_Rfr.mspct, plot.data = "mean"))
+ vdiffr::expect_doppelganger("reflector-mspct-median",
+ autoplot(two_leaves_Rfr.mspct, plot.data = "median"))
+ # triggers warning
+ # vdiffr::expect_doppelganger("reflector-mspct-sum",
+ # autoplot(two_leaves_Rfr.mspct, plot.data = "sum"))
+ testthat::expect_warning(autoplot(two_leaves_Rfr.mspct, plot.data = "sum"))
+ vdiffr::expect_doppelganger("reflector-mspct-sum",
+ autoplot(two_leaves_Rfr.mspct, plot.data = "prod"))
+ vdiffr::expect_doppelganger("reflector-mspct-se",
+ autoplot(two_leaves_Rfr.mspct, plot.data = "se"))
+ vdiffr::expect_doppelganger("reflector-mspct-se-ylab",
+ autoplot(two_leaves_Rfr.mspct, plot.data = "se", ylab = "Standard error of the mean"))
+ vdiffr::expect_doppelganger("reflector-mspct-var",
+ autoplot(two_leaves_Rfr.mspct, plot.data = "var"))
+ vdiffr::expect_doppelganger("reflector-mspct-var-ylab",
+ autoplot(two_leaves_Rfr.mspct, plot.data = "var", ylab = "Variance"))
+ vdiffr::expect_doppelganger("reflector-mspct-mean-Tfr",
+ autoplot(two_leaves_Rfr.mspct, plot.data = "mean"))
+ vdiffr::expect_doppelganger("reflector-mspct-median-Tfr",
+ autoplot(two_leaves_Rfr.mspct, plot.data = "median"))
+})
+
+test_that("object_spct", {
+ set_annotations_default()
+ vdiffr::expect_doppelganger("object-default-tot",
+ autoplot(Ler_leaf.spct))
+ vdiffr::expect_doppelganger("object-default-pc-out-tot",
+ autoplot(Ler_leaf.spct, pc.out = TRUE))
+ vdiffr::expect_doppelganger("object-text-size-tot",
+ autoplot(Ler_leaf.spct, text.size = 3.5))
+ vdiffr::expect_doppelganger("object-wb-vis-tot",
+ autoplot(Ler_leaf.spct, w.band = VIS_bands()))
+ vdiffr::expect_doppelganger("object-range-num-tot",
+ autoplot(Ler_leaf.spct, range = c(500, 700)))
+ vdiffr::expect_doppelganger("object-range-wb-tot",
+ autoplot(Ler_leaf.spct, range = waveband(c(500, 700))))
+ vdiffr::expect_doppelganger("object-no-annotations-tot",
+ autoplot(Ler_leaf.spct, annotations = ""))
+ vdiffr::expect_doppelganger("object-reserve-space-tot",
+ autoplot(Ler_leaf.spct, annotations = "reserve.space"))
+ vdiffr::expect_doppelganger("object-minus-guide-tot",
+ autoplot(Ler_leaf.spct, annotations = c("-", "colour.guide")))
+ vdiffr::expect_doppelganger("object-plus-segments-tot",
+ autoplot(Ler_leaf.spct, annotations = c("+", "segments")))
+
+ vdiffr::expect_doppelganger("object-default-stk",
+ autoplot(Ler_leaf.spct, stacked = FALSE))
+ vdiffr::expect_doppelganger("object-default-stk-ylim",
+ autoplot(Ler_leaf.spct, stacked = FALSE, ylim = c(-0.2, 1.2)))
+ vdiffr::expect_doppelganger("object-default-pc-out-stk",
+ autoplot(Ler_leaf.spct, stacked = FALSE, pc.out = TRUE))
+ vdiffr::expect_doppelganger("object-text-size-stk",
+ autoplot(Ler_leaf.spct, stacked = FALSE, text.size = 3.5))
+ vdiffr::expect_doppelganger("object-minus-peaks-stk",
+ autoplot(Ler_leaf.spct, stacked = FALSE, span = 401, annotations = c("-", "peaks")))
+ vdiffr::expect_doppelganger("object-peaks-valleys-stk",
+ autoplot(Ler_leaf.spct, stacked = FALSE, span = 401, annotations = c("+", "peaks", "valleys")))
+ vdiffr::expect_doppelganger("object-plus-valleys-stk",
+ autoplot(Ler_leaf.spct, stacked = FALSE, span = 401, annotations = c("+", "valleys")))
+ vdiffr::expect_doppelganger("object-wb-vis-stk",
+ autoplot(Ler_leaf.spct, stacked = FALSE, w.band = VIS_bands()))
+ vdiffr::expect_doppelganger("object-range-num-stk",
+ autoplot(Ler_leaf.spct, stacked = FALSE, range = c(500, 700)))
+ vdiffr::expect_doppelganger("object-range-wb-stk",
+ autoplot(Ler_leaf.spct, stacked = FALSE, range = waveband(c(500, 700))))
+ vdiffr::expect_doppelganger("object-no-annotations-stk",
+ autoplot(Ler_leaf.spct, stacked = FALSE, annotations = ""))
+ vdiffr::expect_doppelganger("object-minus-labels-stk",
+ autoplot(Ler_leaf.spct, stacked = FALSE, annotations = c("-", "labels")))
+ vdiffr::expect_doppelganger("object-plus-segments-stk",
+ autoplot(Ler_leaf.spct, stacked = FALSE, annotations = c("+", "segments")))
+})
diff --git a/tests/testthat/test-autoplot-raw-spct.R b/tests/testthat/test-autoplot-raw-spct.R
new file mode 100644
index 00000000..eb78cfa6
--- /dev/null
+++ b/tests/testthat/test-autoplot-raw-spct.R
@@ -0,0 +1,34 @@
+context("autoplot-raw-cps")
+library(ggplot2)
+library(photobiology)
+
+# We prepare shorter data objects for spectra to improve tests' runtime.
+# We also make sure no data are exactly at the boundary of the possible range to
+# avoid warnings. Such values are physically possible but not measurable.
+length.out.spct <- 100L
+white_led.raw_spct <- interpolate_spct(photobiology::white_led.raw_spct,
+ length.out = length.out.spct)
+
+test_that("raw_spct", {
+ set_annotations_default()
+ # skip_on_cran()
+ vdiffr::expect_doppelganger("raw-default",
+ autoplot(white_led.raw_spct))
+ vdiffr::expect_doppelganger("raw-ylim1",
+ autoplot(white_led.raw_spct, ylim = c(NA, 9e4)))
+ vdiffr::expect_doppelganger("raw-ylim2",
+ autoplot(white_led.raw_spct, ylim = c(-5e3, 9e4)))
+ vdiffr::expect_doppelganger("raw-range-num",
+ autoplot(white_led.raw_spct, range = c(500, 700)))
+ vdiffr::expect_doppelganger("raw-range-wb",
+ autoplot(white_led.raw_spct, range = waveband(c(500, 700))))
+ vdiffr::expect_doppelganger("raw-no-annotations",
+ autoplot(white_led.raw_spct, annotations = ""))
+ vdiffr::expect_doppelganger("raw-reserve-space",
+ autoplot(white_led.raw_spct, annotations = "reserve.space"))
+ vdiffr::expect_doppelganger("raw-minus-annotations",
+ autoplot(white_led.raw_spct, annotations = c("-", "summaries")))
+ vdiffr::expect_doppelganger("raw-plus-annotations",
+ autoplot(white_led.raw_spct, annotations = c("+", "boundaries")))
+})
+
diff --git a/tests/testthat/test-autoplot-response-spct.R b/tests/testthat/test-autoplot-response-spct.R
new file mode 100644
index 00000000..7d243708
--- /dev/null
+++ b/tests/testthat/test-autoplot-response-spct.R
@@ -0,0 +1,168 @@
+context("autoplot-response")
+library(photobiology)
+library(photobiologyWavebands)
+
+# We prepare shorter data objects for spectra to improve tests' runtime.
+# We also make sure no data are exactly at the boundary of the possible range to
+# avoid warnings. Such values are physically possible but not measurable.
+length.out.spct <- 100L
+ccd.spct <- interpolate_spct(photobiology::ccd.spct, length.out = length.out.spct)
+
+test_that("response_spct", {
+ set_annotations_default()
+ vdiffr::expect_doppelganger("response-default-scaled",
+ autoplot(fscale(ccd.spct, f = "mean", target = 1)))
+
+ vdiffr::expect_doppelganger("response-default",
+ autoplot(ccd.spct))
+ vdiffr::expect_doppelganger("response-default-ylim",
+ autoplot(ccd.spct, ylim = c(-0.1, 1.2)))
+ vdiffr::expect_doppelganger("response-text-size",
+ autoplot(ccd.spct, text.size = 3.5))
+ vdiffr::expect_doppelganger("response-span-31",
+ autoplot(ccd.spct, span = 31))
+ vdiffr::expect_doppelganger("response-wb-vis",
+ autoplot(ccd.spct, w.band = VIS_bands()))
+ vdiffr::expect_doppelganger("response-label-average",
+ autoplot(ccd.spct, label.qty = "average"))
+ vdiffr::expect_doppelganger("response-label-mean",
+ autoplot(ccd.spct, label.qty = "mean"))
+ vdiffr::expect_doppelganger("response-label-total",
+ autoplot(ccd.spct, label.qty = "total"))
+ vdiffr::expect_doppelganger("response-label-contrib",
+ autoplot(ccd.spct, label.qty = "contribution"))
+ vdiffr::expect_doppelganger("response-label-relative",
+ autoplot(ccd.spct, label.qty = "relative"))
+ vdiffr::expect_doppelganger("response-range-num",
+ autoplot(ccd.spct, range = c(300, 700)))
+ vdiffr::expect_doppelganger("response-range-wb",
+ autoplot(ccd.spct, range = waveband(c(300, 700))))
+ vdiffr::expect_doppelganger("response-no-annotations",
+ autoplot(ccd.spct, annotations = ""))
+ vdiffr::expect_doppelganger("response-reserve-space",
+ autoplot(ccd.spct, annotations = "reserve.space"))
+ vdiffr::expect_doppelganger("response-minus-annotations",
+ autoplot(ccd.spct, annotations = c("-", "summaries")))
+ vdiffr::expect_doppelganger("response-plus-annotations",
+ autoplot(ccd.spct, annotations = c("+", "boundaries")))
+
+ vdiffr::expect_doppelganger("response-default-q",
+ autoplot(ccd.spct, unit.out = "photon"))
+ vdiffr::expect_doppelganger("response-default-ylim-q",
+ autoplot(ccd.spct, unit.out = "photon", ylim = c(-0.2, 1.2)))
+ vdiffr::expect_doppelganger("response-text-size-q",
+ autoplot(ccd.spct, unit.out = "photon", text.size = 3.5))
+ vdiffr::expect_doppelganger("response-span-31-q",
+ autoplot(ccd.spct, unit.out = "photon", span = 31))
+ vdiffr::expect_doppelganger("response-wb-vis-q",
+ autoplot(ccd.spct, unit.out = "photon", w.band = VIS_bands()))
+ vdiffr::expect_doppelganger("response-label-average-q",
+ autoplot(ccd.spct, unit.out = "photon", label.qty = "average"))
+ vdiffr::expect_doppelganger("response-label-mean-q",
+ autoplot(ccd.spct, unit.out = "photon", label.qty = "mean"))
+ vdiffr::expect_doppelganger("response-label-total-q",
+ autoplot(ccd.spct, unit.out = "photon", label.qty = "total"))
+ vdiffr::expect_doppelganger("response-label-contrib-q",
+ autoplot(ccd.spct, unit.out = "photon", label.qty = "contribution"))
+ vdiffr::expect_doppelganger("response-label-relative-q",
+ autoplot(ccd.spct, unit.out = "photon", label.qty = "relative"))
+ vdiffr::expect_doppelganger("response-range-num-q",
+ autoplot(ccd.spct, unit.out = "photon", range = c(500, 700)))
+ vdiffr::expect_doppelganger("response-range-wb-q",
+ autoplot(ccd.spct, unit.out = "photon", range = waveband(c(500, 700))))
+ vdiffr::expect_doppelganger("response-no-annotations-q",
+ autoplot(ccd.spct, unit.out = "photon", annotations = ""))
+ vdiffr::expect_doppelganger("response-minus-summaries-q",
+ autoplot(ccd.spct, unit.out = "photon", annotations = c("-", "summaries")))
+ vdiffr::expect_doppelganger("response-minus-boxes-q",
+ autoplot(ccd.spct, unit.out = "photon", annotations = c("-", "boxes")))
+ vdiffr::expect_doppelganger("response-plus-boundaries-q",
+ autoplot(ccd.spct, unit.out = "photon", annotations = c("+", "boundaries")))
+ vdiffr::expect_doppelganger("response-plus-segments-q",
+ autoplot(ccd.spct, unit.out = "photon", annotations = c("+", "segments")))
+
+ # time units
+ vdiffr::expect_doppelganger("response-second",
+ autoplot(setTimeUnit(ccd.spct, "second", TRUE)))
+ vdiffr::expect_doppelganger("response-hour",
+ autoplot(setTimeUnit(ccd.spct, "hour", TRUE)))
+ vdiffr::expect_doppelganger("response-day",
+ autoplot(setTimeUnit(ccd.spct, "day", TRUE)))
+ vdiffr::expect_doppelganger("response-exposure",
+ autoplot(setTimeUnit(ccd.spct, "exposure", TRUE)))
+ vdiffr::expect_doppelganger("response-duration",
+ autoplot(setTimeUnit(ccd.spct, lubridate::duration(4.5, "minutes"), TRUE)))
+ vdiffr::expect_doppelganger("response-none",
+ autoplot(setTimeUnit(ccd.spct, "unknown", TRUE)))
+ vdiffr::expect_doppelganger("response-seconds",
+ autoplot(setTimeUnit(ccd.spct, lubridate::duration(1, "seconds"), TRUE)))
+ vdiffr::expect_doppelganger("response-hours",
+ autoplot(setTimeUnit(ccd.spct, lubridate::duration(1, "hours"), TRUE)))
+ vdiffr::expect_doppelganger("response-days",
+ autoplot(setTimeUnit(ccd.spct, lubridate::duration(1, "days"), TRUE)))
+
+ vdiffr::expect_doppelganger("response-second-q",
+ autoplot(setTimeUnit(ccd.spct, "second", TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("response-hour-q",
+ autoplot(setTimeUnit(ccd.spct, "hour", TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("response-day-q",
+ autoplot(setTimeUnit(ccd.spct, "day", TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("response-exposure-q",
+ autoplot(setTimeUnit(ccd.spct, "exposure", TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("response-duration-q",
+ autoplot(setTimeUnit(ccd.spct, lubridate::duration(4.5, "minutes"), TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("response-none-q",
+ autoplot(setTimeUnit(ccd.spct, "unknown", TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("response-seconds-q",
+ autoplot(setTimeUnit(ccd.spct, lubridate::duration(1, "seconds"), TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("response-hours-q",
+ autoplot(setTimeUnit(ccd.spct, lubridate::duration(1, "hours"), TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("response-days-q",
+ autoplot(setTimeUnit(ccd.spct, lubridate::duration(1, "days"), TRUE), unit.out = "photon"))
+
+ })
+
+test_that("response_mspct", {
+ set_annotations_default()
+ ccd.spct <- interpolate_spct(photobiology::ccd.spct, length.out = length.out.spct)
+ two_ccds.mspct <- response_mspct(list(one = ccd.spct,
+ half = ccd.spct / 2))
+
+ vdiffr::expect_doppelganger("response-mspct-default",
+ autoplot(two_ccds.mspct))
+ vdiffr::expect_doppelganger("response-mspct-default-range",
+ autoplot(two_ccds.mspct, range = c(500, 700)))
+ vdiffr::expect_doppelganger("response-mspct-default-e",
+ autoplot(two_ccds.mspct, unit.out = "energy"))
+ vdiffr::expect_doppelganger("response-mspct-default-p",
+ autoplot(two_ccds.mspct, unit.out = "photon"))
+ vdiffr::expect_doppelganger("response-mspct-no-annotations",
+ autoplot(two_ccds.mspct, annotations = ""))
+ vdiffr::expect_doppelganger("response-mspct-reserve-space",
+ autoplot(two_ccds.mspct, annotations = "reserve.space"))
+ vdiffr::expect_doppelganger("response-mspct-mean",
+ autoplot(two_ccds.mspct, plot.data = "mean"))
+ vdiffr::expect_doppelganger("response-mspct-median",
+ autoplot(two_ccds.mspct, plot.data = "median"))
+ vdiffr::expect_doppelganger("response-mspct-sum",
+ autoplot(two_ccds.mspct, plot.data = "sum"))
+ # vdiffr::expect_warning("response-mspct-prod",
+ # autoplot(two_ccds.mspct, plot.data = "prod"))
+ testthat::expect_warning(autoplot(two_ccds.mspct, plot.data = "prod"))
+ vdiffr::expect_doppelganger("response-mspct-se",
+ autoplot(two_ccds.mspct, plot.data = "se"))
+ vdiffr::expect_doppelganger("response-mspct-se-ylab",
+ autoplot(two_ccds.mspct, plot.data = "se", ylab = "Standard error of the mean"))
+ vdiffr::expect_doppelganger("response-mspct-var",
+ autoplot(two_ccds.mspct, plot.data = "var"))
+ vdiffr::expect_doppelganger("response-mspct-var-ylab",
+ autoplot(two_ccds.mspct, plot.data = "var", ylab = "Variance"))
+ vdiffr::expect_doppelganger("response-mspct-mean-e",
+ autoplot(two_ccds.mspct, plot.data = "mean", unit.out = "energy"))
+ vdiffr::expect_doppelganger("response-mspct-mean-p",
+ autoplot(two_ccds.mspct, plot.data = "mean", unit.out = "photon"))
+ vdiffr::expect_doppelganger("response-mspct-median-e",
+ autoplot(two_ccds.mspct, plot.data = "median", unit.out = "energy"))
+ vdiffr::expect_doppelganger("response-mspct-median-p",
+ autoplot(two_ccds.mspct, plot.data = "median", unit.out = "photon"))
+})
diff --git a/tests/testthat/test-autoplot-source-spct.R b/tests/testthat/test-autoplot-source-spct.R
new file mode 100644
index 00000000..27a81c5d
--- /dev/null
+++ b/tests/testthat/test-autoplot-source-spct.R
@@ -0,0 +1,240 @@
+context("autoplot-source")
+library(ggplot2)
+library(photobiology)
+library(photobiologyWavebands)
+
+# We prepare shorter data objects for spectra to improve tests' runtime.
+# We also make sure no data are exactly at the boundary of the possible range to
+# avoid warnings. Such values are physically possible but not measurable.
+length.out.spct <- 100L
+sun.spct <- interpolate_spct(photobiology::sun.spct, length.out = length.out.spct)
+white_led.source_spct <- interpolate_spct(photobiology::white_led.source_spct, length.out = length.out.spct)
+
+test_that("source_spct", {
+ set_annotations_default()
+ vdiffr::expect_doppelganger("source-default-scaled",
+ autoplot(fscale(white_led.source_spct)))
+ vdiffr::expect_doppelganger("source-default-normalized",
+ autoplot(normalize(white_led.source_spct)))
+ vdiffr::expect_doppelganger("source-default-norm-550",
+ autoplot(normalize(white_led.source_spct, norm = 550)))
+
+ vdiffr::expect_doppelganger("source-default",
+ autoplot(white_led.source_spct))
+ vdiffr::expect_doppelganger("source-default-geom-spct",
+ autoplot(white_led.source_spct, geom = "spct"))
+ vdiffr::expect_doppelganger("source-ylim1",
+ autoplot(white_led.source_spct, ylim = c(NA, 1)))
+ vdiffr::expect_doppelganger("source-ylim2",
+ autoplot(white_led.source_spct, ylim = c(-0.1, 1)))
+ vdiffr::expect_doppelganger("source-text-size",
+ autoplot(white_led.source_spct, text.size = 3.5))
+ vdiffr::expect_doppelganger("source-span-11",
+ autoplot(white_led.source_spct, span = 11))
+ vdiffr::expect_doppelganger("source-wb-vis-1",
+ autoplot(white_led.source_spct, w.band = VIS()))
+ vdiffr::expect_doppelganger("source-wb-vis",
+ autoplot(white_led.source_spct, w.band = VIS_bands()))
+ vdiffr::expect_doppelganger("source-wb-null",
+ autoplot(white_led.source_spct, w.band = NULL))
+ vdiffr::expect_doppelganger("source-label-average",
+ autoplot(white_led.source_spct, label.qty = "average"))
+ vdiffr::expect_doppelganger("source-label-mean",
+ autoplot(white_led.source_spct, label.qty = "mean"))
+ vdiffr::expect_doppelganger("source-label-total",
+ autoplot(white_led.source_spct, label.qty = "total"))
+ vdiffr::expect_doppelganger("source-label-contrib",
+ autoplot(white_led.source_spct, label.qty = "contribution"))
+ vdiffr::expect_doppelganger("source-label-relative",
+ autoplot(white_led.source_spct, label.qty = "relative"))
+ vdiffr::expect_doppelganger("source-range-num",
+ autoplot(white_led.source_spct, range = c(500, 700)))
+ vdiffr::expect_doppelganger("source-range-wb",
+ autoplot(white_led.source_spct, range = waveband(c(500, 700))))
+ vdiffr::expect_doppelganger("source-no-annotations",
+ autoplot(white_led.source_spct, annotations = ""))
+ vdiffr::expect_doppelganger("source-reserve-space",
+ autoplot(white_led.source_spct, annotations = "reserve.space"))
+ vdiffr::expect_doppelganger("source-minus-annotations",
+ autoplot(white_led.source_spct, annotations = c("-", "summaries")))
+ vdiffr::expect_doppelganger("source-plus-annotations",
+ autoplot(white_led.source_spct, annotations = c("+", "boundaries")))
+
+ vdiffr::expect_doppelganger("source-default-q-scaled",
+ autoplot(fscale(white_led.source_spct), unit.out = "photon"))
+ vdiffr::expect_doppelganger("source-default-q-normalized",
+ autoplot(normalize(white_led.source_spct), unit.out = "photon"))
+
+ vdiffr::expect_doppelganger("source-default-q",
+ autoplot(white_led.source_spct, unit.out = "photon"))
+ vdiffr::expect_doppelganger("source-ylim1-q",
+ autoplot(white_led.source_spct, unit.out = "photon", ylim = c(NA, 6)))
+ vdiffr::expect_doppelganger("source-ylim2-q",
+ autoplot(white_led.source_spct, unit.out = "photon", ylim = c(-0.5, 6)))
+ vdiffr::expect_doppelganger("source-text-size-q",
+ autoplot(white_led.source_spct, unit.out = "photon", text.size = 3.5))
+ vdiffr::expect_doppelganger("source-span-11-q",
+ autoplot(white_led.source_spct, unit.out = "photon", span = 11))
+ vdiffr::expect_doppelganger("source-wb-vis-q",
+ autoplot(white_led.source_spct, unit.out = "photon", w.band = VIS_bands()))
+ vdiffr::expect_doppelganger("source-label-average-q",
+ autoplot(white_led.source_spct, unit.out = "photon", label.qty = "average"))
+ vdiffr::expect_doppelganger("source-label-mean-q",
+ autoplot(white_led.source_spct, unit.out = "photon", label.qty = "mean"))
+ vdiffr::expect_doppelganger("source-range-num-q",
+ autoplot(white_led.source_spct, unit.out = "photon", range = c(500, 700)))
+ vdiffr::expect_doppelganger("source-range-wb-q",
+ autoplot(white_led.source_spct, unit.out = "photon", range = waveband(c(500, 700))))
+ vdiffr::expect_doppelganger("source-no-annotations-q",
+ autoplot(white_led.source_spct, unit.out = "photon", annotations = ""))
+ vdiffr::expect_doppelganger("source-minus-summaries-q",
+ autoplot(white_led.source_spct, unit.out = "photon", annotations = c("-", "summaries")))
+ vdiffr::expect_doppelganger("source-minus-boxes-q",
+ autoplot(white_led.source_spct, unit.out = "photon", annotations = c("-", "boxes")))
+ vdiffr::expect_doppelganger("source-plus-boundaries-q",
+ autoplot(white_led.source_spct, unit.out = "photon", annotations = c("+", "boundaries")))
+ vdiffr::expect_doppelganger("source-plus-segments-q",
+ autoplot(white_led.source_spct, unit.out = "photon", annotations = c("+", "segments")))
+
+ vdiffr::expect_doppelganger("source-normalized",
+ autoplot(normalize(white_led.source_spct)))
+ vdiffr::expect_doppelganger("source-normalized-pcout",
+ autoplot(normalize(white_led.source_spct), pc.out = TRUE))
+ vdiffr::expect_doppelganger("source-normalized-wl",
+ autoplot(normalize(white_led.source_spct, norm = 550)))
+ vdiffr::expect_doppelganger("source-normalized-wl-pcout",
+ autoplot(normalize(white_led.source_spct, norm = 550), pc.out = TRUE))
+ vdiffr::expect_doppelganger("source-normalized-ylim",
+ autoplot(normalize(white_led.source_spct), ylim = c(-0.2, 1.2)))
+ vdiffr::expect_doppelganger("source-scaled",
+ autoplot(fscale(white_led.source_spct)))
+ vdiffr::expect_doppelganger("source-scaled-total",
+ autoplot(fscale(white_led.source_spct, f = "total")))
+ vdiffr::expect_doppelganger("source-scaled-mean",
+ autoplot(fscale(white_led.source_spct, f = "mean")))
+ vdiffr::expect_doppelganger("source-scaled-mean-2",
+ autoplot(fscale(white_led.source_spct, target = 2)))
+ vdiffr::expect_doppelganger("source-scaled-mean-2-PAR",
+ autoplot(fscale(white_led.source_spct, target = 2, range = PhR())))
+ vdiffr::expect_doppelganger("source-scaled-total-200",
+ autoplot(fscale(white_led.source_spct, f = "total", target = 200)))
+ vdiffr::expect_doppelganger("source-scaled-total-200-PAR",
+ autoplot(fscale(white_led.source_spct, f = "total", target = 200, range = PhR())))
+ vdiffr::expect_doppelganger("source-scaled-irrad-200",
+ autoplot(fscale(white_led.source_spct, f = irrad, target = 200)))
+ vdiffr::expect_doppelganger("source-scaled-irrad-200-PAR",
+ autoplot(fscale(white_led.source_spct, f = irrad, target = 200, range = PhR())))
+ vdiffr::expect_doppelganger("source-product-wb",
+ autoplot(sun.spct * Red()))
+ vdiffr::expect_doppelganger("source-product-BSWF",
+ autoplot(sun.spct * CIE()))
+ vdiffr::expect_doppelganger("source-product-BSWF-wl",
+ autoplot(sun.spct * CIE(300)))
+ # time units
+ vdiffr::expect_doppelganger("source-second",
+ autoplot(setTimeUnit(white_led.source_spct, "second", TRUE)))
+ vdiffr::expect_doppelganger("source-hour",
+ autoplot(setTimeUnit(white_led.source_spct, "hour", TRUE)))
+ vdiffr::expect_doppelganger("source-day",
+ autoplot(setTimeUnit(white_led.source_spct, "day", TRUE)))
+ vdiffr::expect_doppelganger("source-exposure",
+ autoplot(setTimeUnit(white_led.source_spct, "exposure", TRUE)))
+ vdiffr::expect_doppelganger("source-duration",
+ autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(4.5, "minutes"), TRUE)))
+ vdiffr::expect_doppelganger("source-none",
+ autoplot(setTimeUnit(white_led.source_spct, "unknown", TRUE)))
+ vdiffr::expect_doppelganger("source-seconds",
+ autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(1, "seconds"), TRUE)))
+ vdiffr::expect_doppelganger("source-hours",
+ autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(1, "hours"), TRUE)))
+ vdiffr::expect_doppelganger("source-days",
+ autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(1, "days"), TRUE)))
+
+ vdiffr::expect_doppelganger("source-second-q",
+ autoplot(setTimeUnit(white_led.source_spct, "second", TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("source-hour-q",
+ autoplot(setTimeUnit(white_led.source_spct, "hour", TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("source-day-q",
+ autoplot(setTimeUnit(white_led.source_spct, "day", TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("source-exposure-q",
+ autoplot(setTimeUnit(white_led.source_spct, "exposure", TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("source-duration-q",
+ autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(4.5, "minutes"), TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("source-none-q",
+ autoplot(setTimeUnit(white_led.source_spct, "unknown", TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("source-seconds-q",
+ autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(1, "seconds"), TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("source-hours-q",
+ autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(1, "hours"), TRUE), unit.out = "photon"))
+ vdiffr::expect_doppelganger("source-days-q",
+ autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(1, "days"), TRUE), unit.out = "photon"))
+
+ })
+
+test_that("source_mspct", {
+ set_annotations_default()
+ white_led.source_spct <- interpolate_spct(photobiology::white_led.source_spct, length.out = length.out.spct)
+ two_leds.mspct <- source_mspct(list(one = white_led.source_spct,
+ half = white_led.source_spct / 2))
+
+ vdiffr::expect_doppelganger("source-mspct-default",
+ autoplot(two_leds.mspct))
+ vdiffr::expect_doppelganger("source-mspct-default-idfactor",
+ autoplot(two_leds.mspct, idfactor = "spectrum"))
+ vdiffr::expect_doppelganger("source-mspct-default-geom-spct",
+ autoplot(two_leds.mspct, geom = "spct"))
+ vdiffr::expect_doppelganger("source-mspct-ylim",
+ autoplot(two_leds.mspct, ylim = c(-0.1, 1.2)))
+ vdiffr::expect_doppelganger("source-mspct-default-range",
+ autoplot(two_leds.mspct, range = c(500, 700)))
+ vdiffr::expect_doppelganger("source-mspct-default-wband-wb",
+ autoplot(two_leds.mspct, w.band = VIS()))
+ vdiffr::expect_doppelganger("source-mspct-default-wband-wbls",
+ autoplot(two_leds.mspct, w.band = VIS_bands()))
+ vdiffr::expect_doppelganger("source-mspct-default-wband-null",
+ autoplot(two_leds.mspct, w.band = NULL))
+ vdiffr::expect_doppelganger("source-mspct-default-e",
+ autoplot(two_leds.mspct, unit.out = "energy"))
+ vdiffr::expect_doppelganger("source-mspct-default-p",
+ autoplot(two_leds.mspct, unit.out = "photon"))
+ vdiffr::expect_doppelganger("source-mspct-no-annotations",
+ autoplot(two_leds.mspct, annotations = ""))
+ vdiffr::expect_doppelganger("source-mspct-reserve-space",
+ autoplot(two_leds.mspct, annotations = "reserve.space"))
+ vdiffr::expect_doppelganger("source-mspct-mean",
+ autoplot(two_leds.mspct, plot.data = "mean"))
+ vdiffr::expect_doppelganger("source-mspct-median",
+ autoplot(two_leds.mspct, plot.data = "median"))
+ vdiffr::expect_doppelganger("source-mspct-sum",
+ autoplot(two_leds.mspct, plot.data = "sum"))
+ # triggers warning
+ # vdiffr::expect_doppelganger("source-mspct-sum",
+ # autoplot(two_leds.mspct, plot.data = "prod"))
+ testthat::expect_warning(autoplot(two_leds.mspct, plot.data = "prod"))
+ vdiffr::expect_doppelganger("source-mspct-se",
+ autoplot(two_leds.mspct, plot.data = "se"))
+ vdiffr::expect_doppelganger("source-mspct-se-ylab",
+ autoplot(two_leds.mspct, plot.data = "se", ylab = "Standard error of the mean"))
+ vdiffr::expect_doppelganger("source-mspct-var",
+ autoplot(two_leds.mspct, plot.data = "var"))
+ vdiffr::expect_doppelganger("source-mspct-var-ylab",
+ autoplot(two_leds.mspct, plot.data = "var", ylab = "Variance"))
+ vdiffr::expect_doppelganger("source-mspct-mean-e",
+ autoplot(two_leds.mspct, plot.data = "mean", unit.out = "energy"))
+ vdiffr::expect_doppelganger("source-mspct-median-e",
+ autoplot(two_leds.mspct, plot.data = "median", unit.out = "energy"))
+ vdiffr::expect_doppelganger("source-mspct-mean-p",
+ autoplot(two_leds.mspct, plot.data = "mean", unit.out = "photon"))
+ vdiffr::expect_doppelganger("source-mspct-median-p",
+ autoplot(two_leds.mspct, plot.data = "median", unit.out = "photon"))
+
+ vdiffr::expect_doppelganger("source-mspct-facets1",
+ autoplot(two_leds.mspct, facets = 1))
+ vdiffr::expect_doppelganger("source-mspct-facets2",
+ autoplot(two_leds.mspct, facets = 2))
+ vdiffr::expect_doppelganger("source-mspct-facetsT",
+ autoplot(two_leds.mspct, facets = TRUE))
+ vdiffr::expect_doppelganger("source-mspct-facetsT-geom-spct",
+ autoplot(two_leds.mspct, facets = TRUE, geom = "spct"))
+
+})
diff --git a/tests/testthat/test-autoplot-waveband.R b/tests/testthat/test-autoplot-waveband.R
new file mode 100644
index 00000000..d9b81a40
--- /dev/null
+++ b/tests/testthat/test-autoplot-waveband.R
@@ -0,0 +1,23 @@
+context("autoplot-waveband")
+library(ggplot2)
+library(photobiology)
+
+test_that("waveband", {
+ set_annotations_default()
+ vdiffr::expect_doppelganger("waveband-default-cie",
+ autoplot(CIE(), range = c(230, 430)))
+ vdiffr::expect_doppelganger("waveband-default-red",
+ autoplot(Red()))
+ vdiffr::expect_doppelganger("waveband-default-ylim",
+ autoplot(Red(), ylim = c(-0.2, 1.2)))
+ vdiffr::expect_doppelganger("waveband-text-size",
+ autoplot(Red(), text.size = 3.5))
+ vdiffr::expect_doppelganger("waveband-plus-segments",
+ autoplot(Red(), annotations = c("+", "segments")))
+ vdiffr::expect_doppelganger("waveband-minus-boxes",
+ autoplot(Red(), annotations = c("-", "boxes")))
+ vdiffr::expect_doppelganger("waveband-no-annotations",
+ autoplot(Red(), annotations = ""))
+ vdiffr::expect_doppelganger("waveband-reserve-space",
+ autoplot(Red(), annotations = "reserve.space"))
+})
diff --git a/tests/testthat/test-plot-methods.R b/tests/testthat/test-plot-methods.R
deleted file mode 100644
index 5bb3a6c1..00000000
--- a/tests/testthat/test-plot-methods.R
+++ /dev/null
@@ -1,1004 +0,0 @@
-context("plot")
-library(ggplot2)
-library(photobiology)
-library(photobiologyWavebands)
-
-# We prepare shorter data objects for spectra to improve tests' runtime.
-# We also make sure no data are exactly at the boundary of the possible range to
-# avoid warnings. Such values are physically possible but not measurable.
-length.out.spct <- 100L
-sun.spct <- interpolate_spct(photobiology::sun.spct, length.out = length.out.spct)
-white_led.raw_spct <- interpolate_spct(photobiology::white_led.raw_spct, length.out = length.out.spct)
-white_led.cps_spct <- interpolate_spct(photobiology::white_led.cps_spct, length.out = length.out.spct)
-white_led.source_spct <- interpolate_spct(photobiology::white_led.source_spct, length.out = length.out.spct)
-Ler_leaf_trns.spct <- interpolate_spct(photobiology::Ler_leaf_trns.spct, length.out = length.out.spct)
-Ler_leaf_trns.spct <- clean(Ler_leaf_trns.spct, range.s.data = c(1e-5, 1 - 1e-5))
-Ler_leaf_trns_i.spct <- interpolate_spct(photobiology::Ler_leaf_trns_i.spct, length.out = length.out.spct)
-Ler_leaf_trns_i.spct <- clean(Ler_leaf_trns_i.spct, range.s.data = c(1e-5, 1 - 1e-5))
-Ler_leaf_rflt.spct <- interpolate_spct(photobiology::Ler_leaf_rflt.spct, length.out = length.out.spct)
-Ler_leaf_rflt.spct <- clean(Ler_leaf_rflt.spct, range.s.data = c(1e-5, 1 - 1e-5))
-Ler_leaf.spct <- clean(Ler_leaf.spct, min.Afr = 1e-5, range.s.data = c(1e-5, 1 - 1e-5))
-Ler_leaf.spct <- interpolate_spct(photobiology::Ler_leaf.spct, length.out = length.out.spct)
-Ler_leaf.spct <- clean(Ler_leaf.spct, min.Afr = 1e-5, range.s.data = c(1e-5, 1 - 1e-5))
-ccd.spct <- interpolate_spct(photobiology::ccd.spct, length.out = length.out.spct)
-
-test_that("raw_spct", {
- set_annotations_default()
- # skip_on_cran()
- vdiffr::expect_doppelganger("raw-default",
- autoplot(white_led.raw_spct))
- vdiffr::expect_doppelganger("raw-ylim1",
- autoplot(white_led.raw_spct, ylim = c(NA, 9e4)))
- vdiffr::expect_doppelganger("raw-ylim2",
- autoplot(white_led.raw_spct, ylim = c(-5e3, 9e4)))
- vdiffr::expect_doppelganger("raw-range-num",
- autoplot(white_led.raw_spct, range = c(500, 700)))
- vdiffr::expect_doppelganger("raw-range-wb",
- autoplot(white_led.raw_spct, range = waveband(c(500, 700))))
- vdiffr::expect_doppelganger("raw-no-annotations",
- autoplot(white_led.raw_spct, annotations = ""))
- vdiffr::expect_doppelganger("raw-reserve-space",
- autoplot(white_led.raw_spct, annotations = "reserve.space"))
- vdiffr::expect_doppelganger("raw-minus-annotations",
- autoplot(white_led.raw_spct, annotations = c("-", "summaries")))
- vdiffr::expect_doppelganger("raw-plus-annotations",
- autoplot(white_led.raw_spct, annotations = c("+", "boundaries")))
-})
-
-test_that("cps_spct", {
- set_annotations_default()
- vdiffr::expect_doppelganger("cps-default",
- autoplot(white_led.cps_spct))
- vdiffr::expect_doppelganger("cps-ylim1",
- autoplot(white_led.cps_spct, ylim = c(NA, 5e5)))
- vdiffr::expect_doppelganger("cps-ylim2",
- autoplot(white_led.cps_spct, ylim = c(-1e5, 5e5)))
- vdiffr::expect_doppelganger("cps-range-num",
- autoplot(white_led.cps_spct, range = c(500, 700)))
- vdiffr::expect_doppelganger("cps-range-wb",
- autoplot(white_led.cps_spct, range = waveband(c(500, 700))))
- vdiffr::expect_doppelganger("cps-no-annotations",
- autoplot(white_led.cps_spct, annotations = ""))
- vdiffr::expect_doppelganger("cps-reserve-space",
- autoplot(white_led.cps_spct, annotations = "reserve.space"))
- vdiffr::expect_doppelganger("cps-minus-annotations",
- autoplot(white_led.cps_spct, annotations = c("-", "summaries")))
- vdiffr::expect_doppelganger("cps-plus-annotations",
- autoplot(white_led.cps_spct, annotations = c("+", "boundaries")))
-})
-
-test_that("source_spct", {
- set_annotations_default()
- vdiffr::expect_doppelganger("source-default-scaled",
- autoplot(fscale(white_led.source_spct)))
- vdiffr::expect_doppelganger("source-default-normalized",
- autoplot(normalize(white_led.source_spct)))
- vdiffr::expect_doppelganger("source-default-norm-550",
- autoplot(white_led.source_spct, norm = 550))
-
- vdiffr::expect_doppelganger("source-default",
- autoplot(white_led.source_spct))
- vdiffr::expect_doppelganger("source-ylim1",
- autoplot(white_led.source_spct, ylim = c(NA, 1)))
- vdiffr::expect_doppelganger("source-ylim2",
- autoplot(white_led.source_spct, ylim = c(-0.1, 1)))
- vdiffr::expect_doppelganger("source-text-size",
- autoplot(white_led.source_spct, text.size = 3.5))
- vdiffr::expect_doppelganger("source-span-31",
- autoplot(white_led.source_spct, span = 31))
- vdiffr::expect_doppelganger("source-wb-vis",
- autoplot(white_led.source_spct, w.band = VIS_bands()))
- vdiffr::expect_doppelganger("source-label-average",
- autoplot(white_led.source_spct, label.qty = "average"))
- vdiffr::expect_doppelganger("source-label-mean",
- autoplot(white_led.source_spct, label.qty = "mean"))
- vdiffr::expect_doppelganger("source-label-total",
- autoplot(white_led.source_spct, label.qty = "total"))
- vdiffr::expect_doppelganger("source-label-contrib",
- autoplot(white_led.source_spct, label.qty = "contribution"))
- vdiffr::expect_doppelganger("source-label-relative",
- autoplot(white_led.source_spct, label.qty = "relative"))
- vdiffr::expect_doppelganger("source-range-num",
- autoplot(white_led.source_spct, range = c(500, 700)))
- vdiffr::expect_doppelganger("source-range-wb",
- autoplot(white_led.source_spct, range = waveband(c(500, 700))))
- vdiffr::expect_doppelganger("source-no-annotations",
- autoplot(white_led.source_spct, annotations = ""))
- vdiffr::expect_doppelganger("source-reserve-space",
- autoplot(white_led.source_spct, annotations = "reserve.space"))
- vdiffr::expect_doppelganger("source-minus-annotations",
- autoplot(white_led.source_spct, annotations = c("-", "summaries")))
- vdiffr::expect_doppelganger("source-plus-annotations",
- autoplot(white_led.source_spct, annotations = c("+", "boundaries")))
-
- vdiffr::expect_doppelganger("source-default-q-scaled",
- autoplot(fscale(white_led.source_spct), unit.out = "photon"))
- vdiffr::expect_doppelganger("source-default-q-normalized",
- autoplot(normalize(white_led.source_spct), unit.out = "photon"))
-
- vdiffr::expect_doppelganger("source-default-q",
- autoplot(white_led.source_spct, unit.out = "photon"))
- vdiffr::expect_doppelganger("source-ylim1-q",
- autoplot(white_led.source_spct, unit.out = "photon", ylim = c(NA, 6)))
- vdiffr::expect_doppelganger("source-ylim2-q",
- autoplot(white_led.source_spct, unit.out = "photon", ylim = c(-0.5, 6)))
- vdiffr::expect_doppelganger("source-text-size-q",
- autoplot(white_led.source_spct, unit.out = "photon", text.size = 3.5))
- vdiffr::expect_doppelganger("source-span-31-q",
- autoplot(white_led.source_spct, unit.out = "photon", span = 31))
- vdiffr::expect_doppelganger("source-wb-vis-q",
- autoplot(white_led.source_spct, unit.out = "photon", w.band = VIS_bands()))
- vdiffr::expect_doppelganger("source-label-average-q",
- autoplot(white_led.source_spct, unit.out = "photon", label.qty = "average"))
- vdiffr::expect_doppelganger("source-label-mean-q",
- autoplot(white_led.source_spct, unit.out = "photon", label.qty = "mean"))
- vdiffr::expect_doppelganger("source-range-num-q",
- autoplot(white_led.source_spct, unit.out = "photon", range = c(500, 700)))
- vdiffr::expect_doppelganger("source-range-wb-q",
- autoplot(white_led.source_spct, unit.out = "photon", range = waveband(c(500, 700))))
- vdiffr::expect_doppelganger("source-no-annotations-q",
- autoplot(white_led.source_spct, unit.out = "photon", annotations = ""))
- vdiffr::expect_doppelganger("source-minus-summaries-q",
- autoplot(white_led.source_spct, unit.out = "photon", annotations = c("-", "summaries")))
- vdiffr::expect_doppelganger("source-minus-boxes-q",
- autoplot(white_led.source_spct, unit.out = "photon", annotations = c("-", "boxes")))
- vdiffr::expect_doppelganger("source-plus-boundaries-q",
- autoplot(white_led.source_spct, unit.out = "photon", annotations = c("+", "boundaries")))
- vdiffr::expect_doppelganger("source-plus-segments-q",
- autoplot(white_led.source_spct, unit.out = "photon", annotations = c("+", "segments")))
-
- vdiffr::expect_doppelganger("source-normalized",
- autoplot(normalize(white_led.source_spct)))
- vdiffr::expect_doppelganger("source-normalized-wl",
- autoplot(normalize(white_led.source_spct, norm = 550)))
- vdiffr::expect_doppelganger("source-normalized-ylim",
- autoplot(normalize(white_led.source_spct), ylim = c(-0.2, 1.2)))
- vdiffr::expect_doppelganger("source-scaled",
- autoplot(fscale(white_led.source_spct)))
- vdiffr::expect_doppelganger("source-scaled-total",
- autoplot(fscale(white_led.source_spct, f = "total")))
- vdiffr::expect_doppelganger("source-scaled-mean",
- autoplot(fscale(white_led.source_spct, f = "mean")))
- vdiffr::expect_doppelganger("source-scaled-mean-2",
- autoplot(fscale(white_led.source_spct, target = 2)))
- vdiffr::expect_doppelganger("source-scaled-mean-2-PAR",
- autoplot(fscale(white_led.source_spct, target = 2, range = PhR())))
- vdiffr::expect_doppelganger("source-scaled-total-200",
- autoplot(fscale(white_led.source_spct, f = "total", target = 200)))
- vdiffr::expect_doppelganger("source-scaled-total-200-PAR",
- autoplot(fscale(white_led.source_spct, f = "total", target = 200, range = PAR())))
- vdiffr::expect_doppelganger("source-scaled-irrad-200",
- autoplot(fscale(white_led.source_spct, f = irrad, target = 200)))
- vdiffr::expect_doppelganger("source-scaled-irrad-200-PAR",
- autoplot(fscale(white_led.source_spct, f = irrad, target = 200, range = PhR())))
- vdiffr::expect_doppelganger("source-product-wb",
- autoplot(sun.spct * Red()))
- vdiffr::expect_doppelganger("source-product-BSWF",
- autoplot(sun.spct * CIE()))
- vdiffr::expect_doppelganger("source-product-BSWF-wl",
- autoplot(sun.spct * CIE(300)))
- # time units
- vdiffr::expect_doppelganger("source-second",
- autoplot(setTimeUnit(white_led.source_spct, "second", TRUE)))
- vdiffr::expect_doppelganger("source-hour",
- autoplot(setTimeUnit(white_led.source_spct, "hour", TRUE)))
- vdiffr::expect_doppelganger("source-day",
- autoplot(setTimeUnit(white_led.source_spct, "day", TRUE)))
- vdiffr::expect_doppelganger("source-exposure",
- autoplot(setTimeUnit(white_led.source_spct, "exposure", TRUE)))
- vdiffr::expect_doppelganger("source-duration",
- autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(4.5, "minutes"), TRUE)))
- vdiffr::expect_doppelganger("source-none",
- autoplot(setTimeUnit(white_led.source_spct, "unknown", TRUE)))
- vdiffr::expect_doppelganger("source-seconds",
- autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(1, "seconds"), TRUE)))
- vdiffr::expect_doppelganger("source-hours",
- autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(1, "hours"), TRUE)))
- vdiffr::expect_doppelganger("source-days",
- autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(1, "days"), TRUE)))
-
- vdiffr::expect_doppelganger("source-second-q",
- autoplot(setTimeUnit(white_led.source_spct, "second", TRUE), unit.out = "photon"))
- vdiffr::expect_doppelganger("source-hour-q",
- autoplot(setTimeUnit(white_led.source_spct, "hour", TRUE), unit.out = "photon"))
- vdiffr::expect_doppelganger("source-day-q",
- autoplot(setTimeUnit(white_led.source_spct, "day", TRUE), unit.out = "photon"))
- vdiffr::expect_doppelganger("source-exposure-q",
- autoplot(setTimeUnit(white_led.source_spct, "exposure", TRUE), unit.out = "photon"))
- vdiffr::expect_doppelganger("source-duration-q",
- autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(4.5, "minutes"), TRUE), unit.out = "photon"))
- vdiffr::expect_doppelganger("source-none-q",
- autoplot(setTimeUnit(white_led.source_spct, "unknown", TRUE), unit.out = "photon"))
- vdiffr::expect_doppelganger("source-seconds-q",
- autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(1, "seconds"), TRUE), unit.out = "photon"))
- vdiffr::expect_doppelganger("source-hours-q",
- autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(1, "hours"), TRUE), unit.out = "photon"))
- vdiffr::expect_doppelganger("source-days-q",
- autoplot(setTimeUnit(white_led.source_spct, lubridate::duration(1, "days"), TRUE), unit.out = "photon"))
-
- })
-
-test_that("source_mspct", {
- set_annotations_default()
- two_leds.mspct <- source_mspct(list(one = white_led.source_spct,
- half = white_led.source_spct / 2))
-
- vdiffr::expect_doppelganger("source-mspct-default",
- autoplot(two_leds.mspct))
- vdiffr::expect_doppelganger("source-mspct-ylim",
- autoplot(two_leds.mspct, ylim = c(-0.1, 1.2)))
- vdiffr::expect_doppelganger("source-mspct-default-range",
- autoplot(two_leds.mspct, range = c(500, 700)))
- vdiffr::expect_doppelganger("source-mspct-default-e",
- autoplot(two_leds.mspct, unit.out = "energy"))
- vdiffr::expect_doppelganger("source-mspct-default-p",
- autoplot(two_leds.mspct, unit.out = "photon"))
- vdiffr::expect_doppelganger("source-mspct-no-annotations",
- autoplot(two_leds.mspct, annotations = ""))
- vdiffr::expect_doppelganger("source-mspct-reserve-space",
- autoplot(two_leds.mspct, annotations = "reserve.space"))
- vdiffr::expect_doppelganger("source-mspct-mean",
- autoplot(two_leds.mspct, plot.data = "mean"))
- vdiffr::expect_doppelganger("source-mspct-median",
- autoplot(two_leds.mspct, plot.data = "median"))
- vdiffr::expect_doppelganger("source-mspct-sum",
- autoplot(two_leds.mspct, plot.data = "sum"))
- # triggers warning
- # vdiffr::expect_doppelganger("source-mspct-sum",
- # autoplot(two_leds.mspct, plot.data = "prod"))
- testthat::expect_warning(autoplot(two_leds.mspct, plot.data = "prod"))
- vdiffr::expect_doppelganger("source-mspct-se",
- autoplot(two_leds.mspct, plot.data = "se"))
- vdiffr::expect_doppelganger("source-mspct-se-ylab",
- autoplot(two_leds.mspct, plot.data = "se", ylab = "Standard error of the mean"))
- vdiffr::expect_doppelganger("source-mspct-var",
- autoplot(two_leds.mspct, plot.data = "var"))
- vdiffr::expect_doppelganger("source-mspct-var-ylab",
- autoplot(two_leds.mspct, plot.data = "var", ylab = "Variance"))
- vdiffr::expect_doppelganger("source-mspct-mean-e",
- autoplot(two_leds.mspct, plot.data = "mean", unit.out = "energy"))
- vdiffr::expect_doppelganger("source-mspct-median-e",
- autoplot(two_leds.mspct, plot.data = "median", unit.out = "energy"))
- vdiffr::expect_doppelganger("source-mspct-mean-p",
- autoplot(two_leds.mspct, plot.data = "mean", unit.out = "photon"))
- vdiffr::expect_doppelganger("source-mspct-median-p",
- autoplot(two_leds.mspct, plot.data = "median", unit.out = "photon"))
-})
-
-test_that("filter_spct", {
- set_annotations_default()
- vdiffr::expect_doppelganger("filter-default-tot-scaled",
- autoplot(fscale(Ler_leaf_trns.spct, target = 0.06,
- range = c(400,700), set.scaled = TRUE)))
- vdiffr::expect_doppelganger("filter-default-tot-normalized",
- autoplot(normalize(Ler_leaf_trns.spct, norm = "max")))
-
- vdiffr::expect_doppelganger("filter-default-tot",
- autoplot(Ler_leaf_trns.spct))
- vdiffr::expect_doppelganger("filter-default-tot-ylim",
- autoplot(Ler_leaf_trns.spct, ylim = c(-0.05, 0.5)))
- vdiffr::expect_doppelganger("filter-default-pc-out-tot",
- autoplot(Ler_leaf_trns.spct, pc.out = TRUE))
- vdiffr::expect_doppelganger("filter-text-size-tot",
- autoplot(Ler_leaf_trns.spct, text.size = 3.5))
- vdiffr::expect_doppelganger("filter-span-31-tot",
- autoplot(Ler_leaf_trns.spct, span = 31))
- vdiffr::expect_doppelganger("filter-wb-vis-tot",
- autoplot(Ler_leaf_trns.spct, w.band = VIS_bands()))
- vdiffr::expect_doppelganger("filter-label-average-tot",
- autoplot(Ler_leaf_trns.spct, label.qty = "average"))
- vdiffr::expect_doppelganger("filter-label-mean-tot",
- autoplot(Ler_leaf_trns.spct, label.qty = "mean"))
- vdiffr::expect_doppelganger("filter-range-num-tot",
- autoplot(Ler_leaf_trns.spct, range = c(500, 700)))
- vdiffr::expect_doppelganger("filter-range-wb-tot",
- autoplot(Ler_leaf_trns.spct, range = waveband(c(500, 700))))
- vdiffr::expect_doppelganger("filter-no-annotations-tot",
- autoplot(Ler_leaf_trns.spct, annotations = ""))
- vdiffr::expect_doppelganger("filter-minus-annotations-tot",
- autoplot(Ler_leaf_trns.spct, annotations = c("-", "summaries")))
- vdiffr::expect_doppelganger("filter-plus-annotations-tot",
- autoplot(Ler_leaf_trns.spct, annotations = c("+", "boundaries")))
-
- vdiffr::expect_doppelganger("filter-default-scaled",
- autoplot(fscale(Ler_leaf_trns_i.spct, target = 0.06,
- range = c(400,700), set.scaled = TRUE)))
- vdiffr::expect_doppelganger("filter-default-normalized",
- autoplot(normalize(Ler_leaf_trns_i.spct, norm = "max")))
- vdiffr::expect_doppelganger("filter-default-norm-max",
- autoplot(Ler_leaf_trns_i.spct, norm = "max"))
-
- vdiffr::expect_doppelganger("filter-default",
- autoplot(Ler_leaf_trns_i.spct))
- vdiffr::expect_doppelganger("filter-default-ylim",
- autoplot(Ler_leaf_trns_i.spct, ylim = c(NA, 1.2)))
- vdiffr::expect_doppelganger("filter-default-pc-out",
- autoplot(Ler_leaf_trns_i.spct, pc.out = TRUE))
- vdiffr::expect_doppelganger("filter-text-size",
- autoplot(Ler_leaf_trns_i.spct, text.size = 3.5))
- vdiffr::expect_doppelganger("filter-span-31",
- autoplot(Ler_leaf_trns_i.spct, span = 31))
- vdiffr::expect_doppelganger("filter-wb-vis",
- autoplot(Ler_leaf_trns_i.spct, w.band = VIS_bands()))
- vdiffr::expect_doppelganger("filter-label-average",
- autoplot(Ler_leaf_trns_i.spct, label.qty = "average"))
- vdiffr::expect_doppelganger("filter-label-mean",
- autoplot(Ler_leaf_trns_i.spct, label.qty = "mean"))
- vdiffr::expect_doppelganger("filter-range-num",
- autoplot(Ler_leaf_trns_i.spct, range = c(500, 700)))
- vdiffr::expect_doppelganger("filter-range-wb",
- autoplot(Ler_leaf_trns_i.spct, range = waveband(c(500, 700))))
- vdiffr::expect_doppelganger("filter-no-annotations",
- autoplot(Ler_leaf_trns_i.spct, annotations = ""))
- vdiffr::expect_doppelganger("filter-reserve-space",
- autoplot(Ler_leaf_trns_i.spct, annotations = "reserve.space"))
- vdiffr::expect_doppelganger("filter-minus-summaries",
- autoplot(Ler_leaf_trns_i.spct, annotations = c("-", "summaries")))
- vdiffr::expect_doppelganger("filter-minus-boxes",
- autoplot(Ler_leaf_trns_i.spct, annotations = c("-", "boxes")))
- vdiffr::expect_doppelganger("filter-plus-boundaries",
- autoplot(Ler_leaf_trns_i.spct, annotations = c("+", "boundaries")))
- vdiffr::expect_doppelganger("filter-plus-segments",
- autoplot(Ler_leaf_trns_i.spct, annotations = c("+", "segments")))
-
- vdiffr::expect_doppelganger("filter-default-apt",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorptance"))
- vdiffr::expect_doppelganger("filter-default-apt-ylim",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorptance", ylim = c(-0.1, 1.2)))
- vdiffr::expect_doppelganger("filter-default-pc-out-apt",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorptance", pc.out = TRUE))
- vdiffr::expect_doppelganger("filter-text-size-apt",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorptance", text.size = 3.5))
- vdiffr::expect_doppelganger("filter-span-31-apt",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorptance", span = 31))
- vdiffr::expect_doppelganger("filter-wb-vis-apt",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorptance", w.band = VIS_bands()))
- vdiffr::expect_doppelganger("filter-label-average-apt",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorptance", label.qty = "average"))
- vdiffr::expect_doppelganger("filter-label-mean-apt",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorptance", label.qty = "mean"))
- vdiffr::expect_doppelganger("filter-range-num-apt",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorptance", range = c(500, 700)))
- vdiffr::expect_doppelganger("filter-range-wb-apt",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorptance", range = waveband(c(500, 700))))
- vdiffr::expect_doppelganger("filter-no-annotations-apt",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorptance", annotations = ""))
- vdiffr::expect_doppelganger("filter-minus-summaries-q",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorptance", annotations = c("-", "summaries")))
- vdiffr::expect_doppelganger("filter-minus-boxes-apt",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorptance", annotations = c("-", "boxes")))
- vdiffr::expect_doppelganger("filter-plus-boundaries-apt",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorptance", annotations = c("+", "boundaries")))
- vdiffr::expect_doppelganger("filter-plus-segments-apt",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorptance", annotations = c("+", "segments")))
-
- vdiffr::expect_doppelganger("filter-default-a-scaled",
- autoplot(fscale(Ler_leaf_trns_i.spct, target = 2, qty.out = "absorbance",
- range = c(400,700), set.scaled = TRUE),
- plot.qty = "absorbance", range = c(300, NA)))
- # vdiffr::expect_doppelganger("filter-default-a-normalized",
- # autoplot(normalize(Ler_leaf_trns_i.spct, norm = "max"),
- # plot.qty = "absorbance", range = c(300, NA)))
-
- vdiffr::expect_doppelganger("filter-default-a",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorbance", range = c(300, NA)))
- vdiffr::expect_doppelganger("filter-default-a-ylim",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorbance", range = c(300, NA), ylim = c(-0.2, 4)))
- vdiffr::expect_doppelganger("filter-text-size-a",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorbance", range = c(300, NA), text.size = 3.5))
- vdiffr::expect_doppelganger("filter-span-31-a",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorbance", range = c(300, NA), span = 31))
- vdiffr::expect_doppelganger("filter-wb-vis-a",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorbance", range = c(300, NA), w.band = VIS_bands()))
- vdiffr::expect_doppelganger("filter-label-average-a",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorbance", range = c(300, NA), label.qty = "average"))
- vdiffr::expect_doppelganger("filter-label-mean-a",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorbance", range = c(300, NA), label.qty = "mean"))
- vdiffr::expect_doppelganger("filter-range-wb-a",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorbance", range = waveband(c(500, 700))))
- vdiffr::expect_doppelganger("filter-no-annotations-a",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorbance", range = c(300, NA), annotations = ""))
- vdiffr::expect_doppelganger("filter-minus-summaries-a",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorbance", range = c(300, NA), annotations = c("-", "summaries")))
- vdiffr::expect_doppelganger("filter-minus-boxes-a",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorbance", range = c(300, NA), annotations = c("-", "boxes")))
- vdiffr::expect_doppelganger("filter-plus-boundaries-a",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorbance", range = c(300, NA), annotations = c("+", "boundaries")))
- vdiffr::expect_doppelganger("filter-plus-segments-a",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "absorbance", range = c(300, NA), annotations = c("+", "segments")))
-
- vdiffr::expect_doppelganger("filter-default-tfr",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "transmittance"))
- vdiffr::expect_doppelganger("filter-default-tfr-ylim",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "transmittance", ylim = c(-0.2, 1.2)))
- vdiffr::expect_doppelganger("filter-default-pc-out-tfr",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "transmittance", pc.out = TRUE))
- vdiffr::expect_doppelganger("filter-text-size-tfr",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "transmittance", text.size = 3.5))
- vdiffr::expect_doppelganger("filter-span-31-tfr",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "transmittance", span = 31))
- vdiffr::expect_doppelganger("filter-wb-vis-tfr",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "transmittance", w.band = VIS_bands()))
- vdiffr::expect_doppelganger("filter-label-average-tfr",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "transmittance", label.qty = "average"))
- vdiffr::expect_doppelganger("filter-label-mean-tfr",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "transmittance", label.qty = "mean"))
- vdiffr::expect_doppelganger("filter-range-num-tfr",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "transmittance", range = c(500, 700)))
- vdiffr::expect_doppelganger("filter-range-wb-tfr",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "transmittance", range = waveband(c(500, 700))))
- vdiffr::expect_doppelganger("filter-no-annotations-tfr",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "transmittance", annotations = ""))
- vdiffr::expect_doppelganger("filter-minus-summaries-tfr",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "transmittance", annotations = c("-", "summaries")))
- vdiffr::expect_doppelganger("filter-minus-boxes-tfr",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "transmittance", annotations = c("-", "boxes")))
- vdiffr::expect_doppelganger("filter-plus-boundaries-tfr",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "transmittance", annotations = c("+", "boundaries")))
- vdiffr::expect_doppelganger("filter-plus-segments-tfr",
- autoplot(Ler_leaf_trns_i.spct, plot.qty = "transmittance", annotations = c("+", "segments")))
-})
-
-test_that("filter_mspct", {
- set_annotations_default()
- two_leaves.mspct <- filter_mspct(list(one = Ler_leaf_trns_i.spct,
- half = Ler_leaf_trns_i.spct / 2))
- vdiffr::expect_doppelganger("filter-mspct-default",
- autoplot(two_leaves.mspct))
- vdiffr::expect_doppelganger("filter-mspct-default-ylim",
- autoplot(two_leaves.mspct, ylim = c(-0.2, 1.2)))
- vdiffr::expect_doppelganger("filter-mspct-default-range",
- autoplot(two_leaves.mspct, range = c(500, 700)))
- # use range to avoid Tfr == 0 values.
- vdiffr::expect_doppelganger("filter-mspct-default-A",
- autoplot(two_leaves.mspct,
- range = c(400,750),
- plot.qty = "absorbance"))
- vdiffr::expect_doppelganger("filter-mspct-default-Afr",
- autoplot(two_leaves.mspct,
- range = c(400,750),
- plot.qty = "absorptance"))
- vdiffr::expect_doppelganger("filter-mspct-default-Tfr",
- autoplot(two_leaves.mspct, plot.qty = "transmittance"))
- vdiffr::expect_doppelganger("filter-mspct-no-annotations",
- autoplot(two_leaves.mspct, annotations = ""))
- vdiffr::expect_doppelganger("filter-mspct-reserve-space",
- autoplot(two_leaves.mspct, annotations = "reserve.space"))
- vdiffr::expect_doppelganger("filter-mspct-mean",
- autoplot(two_leaves.mspct, plot.data = "mean"))
- vdiffr::expect_doppelganger("filter-mspct-median",
- autoplot(two_leaves.mspct, plot.data = "median"))
- # triggers warning
- # vdiffr::expect_doppelganger("filter-mspct-sum",
- # autoplot(two_leaves.mspct, plot.data = "sum"))
- testthat::expect_warning(autoplot(two_leaves.mspct, plot.data = "sum"))
- vdiffr::expect_doppelganger("filter-mspct-sum",
- autoplot(two_leaves.mspct, plot.data = "prod"))
- vdiffr::expect_doppelganger("filter-mspct-se",
- autoplot(two_leaves.mspct, plot.data = "se"))
- vdiffr::expect_doppelganger("filter-mspct-se-ylab",
- autoplot(two_leaves.mspct, plot.data = "se", ylab = "Standard error of the mean"))
- vdiffr::expect_doppelganger("filter-mspct-var",
- autoplot(two_leaves.mspct, plot.data = "var"))
- vdiffr::expect_doppelganger("filter-mspct-var-ylab",
- autoplot(two_leaves.mspct, plot.data = "var", ylab = "Variance"))
- vdiffr::expect_doppelganger("filter-mspct-mean-Tfr",
- autoplot(two_leaves.mspct, plot.data = "mean", plot.qty = "transmittance"))
- vdiffr::expect_doppelganger("filter-mspct-median-Tfr",
- autoplot(two_leaves.mspct, plot.data = "median", plot.qty = "transmittance"))
- # Bug in photobiology::rowwise_filter() (fixed in photobiology >= 0.10.11)
- # vdiffr::expect_doppelganger("filter-mspct-mean-Afr",
- # autoplot(two_leaves.mspct, plot.data = "mean", plot.qty = "absorptance"))
- # vdiffr::expect_doppelganger("filter-mspct-median-Afr",
- # autoplot(two_leaves.mspct, plot.data = "median", plot.qty = "absorptance"))
- vdiffr::expect_doppelganger("filter-mspct-mean-A",
- autoplot(two_leaves.mspct, plot.data = "mean", plot.qty = "absorbance"))
- vdiffr::expect_doppelganger("filter-mspct-median-A",
- autoplot(two_leaves.mspct, plot.data = "median", plot.qty = "absorbance"))
-})
-
-test_that("reflector_spct", {
- set_annotations_default()
- vdiffr::expect_doppelganger("reflector-default-tot-scaled",
- autoplot(fscale(Ler_leaf_rflt.spct, target = 0.06,
- range = c(400,700), set.scaled = TRUE)))
- vdiffr::expect_doppelganger("reflector-default-tot-normalized",
- autoplot(normalize(Ler_leaf_rflt.spct, norm = "max")))
- vdiffr::expect_doppelganger("reflector-default-tot-norm-max",
- autoplot(Ler_leaf_rflt.spct, norm = "max"))
- vdiffr::expect_doppelganger("reflector-default-tot-norm-update",
- autoplot(Ler_leaf_rflt.spct, norm = "update"))
- vdiffr::expect_doppelganger("reflector-default-tot-norm-skip",
- autoplot(Ler_leaf_rflt.spct, norm = "skip"))
-
- vdiffr::expect_doppelganger("reflector-default-tot",
- autoplot(Ler_leaf_rflt.spct))
- vdiffr::expect_doppelganger("reflector-default-tot-ylim",
- autoplot(Ler_leaf_rflt.spct, ylim = c(-0.1, 0.65)))
- vdiffr::expect_doppelganger("reflector-default-pc-out-tot",
- autoplot(Ler_leaf_rflt.spct, pc.out = TRUE))
- vdiffr::expect_doppelganger("reflector-text-size-tot",
- autoplot(Ler_leaf_rflt.spct, text.size = 3.5))
- vdiffr::expect_doppelganger("reflector-span-31-tot",
- autoplot(Ler_leaf_rflt.spct, span = 31))
- vdiffr::expect_doppelganger("reflector-wb-vis-tot",
- autoplot(Ler_leaf_rflt.spct, w.band = VIS_bands()))
- vdiffr::expect_doppelganger("reflector-label-average-tot",
- autoplot(Ler_leaf_rflt.spct, label.qty = "average"))
- vdiffr::expect_doppelganger("reflector-label-mean-tot",
- autoplot(Ler_leaf_rflt.spct, label.qty = "mean"))
- vdiffr::expect_doppelganger("reflector-range-num-tot",
- autoplot(Ler_leaf_rflt.spct, range = c(500, 700)))
- vdiffr::expect_doppelganger("reflector-range-wb-tot",
- autoplot(Ler_leaf_rflt.spct, range = waveband(c(500, 700))))
- vdiffr::expect_doppelganger("reflector-no-annotations-tot",
- autoplot(Ler_leaf_rflt.spct, annotations = ""))
- vdiffr::expect_doppelganger("reflector-minus-annotations-tot",
- autoplot(Ler_leaf_rflt.spct, annotations = c("-", "summaries")))
- vdiffr::expect_doppelganger("reflector-plus-annotations-tot",
- autoplot(Ler_leaf_rflt.spct, annotations = c("+", "boundaries")))
-})
-
-test_that("reflector_mspct", {
- set_annotations_default()
- two_leaves_Rfr.mspct <- reflector_mspct(list(one = Ler_leaf_rflt.spct,
- half = Ler_leaf_rflt.spct / 2))
- vdiffr::expect_doppelganger("reflector-mspct-default",
- autoplot(two_leaves_Rfr.mspct))
- vdiffr::expect_doppelganger("reflector-mspct-default-range",
- autoplot(two_leaves_Rfr.mspct, range = c(500, 700)))
- vdiffr::expect_doppelganger("reflector-mspct-no-annotations",
- autoplot(two_leaves_Rfr.mspct, annotations = ""))
- vdiffr::expect_doppelganger("reflector-mspct-reserve-space",
- autoplot(two_leaves_Rfr.mspct, annotations = "reserve.space"))
- vdiffr::expect_doppelganger("reflector-mspct-mean",
- autoplot(two_leaves_Rfr.mspct, plot.data = "mean"))
- vdiffr::expect_doppelganger("reflector-mspct-median",
- autoplot(two_leaves_Rfr.mspct, plot.data = "median"))
- # triggers warning
- # vdiffr::expect_doppelganger("reflector-mspct-sum",
- # autoplot(two_leaves_Rfr.mspct, plot.data = "sum"))
- testthat::expect_warning(autoplot(two_leaves_Rfr.mspct, plot.data = "sum"))
- vdiffr::expect_doppelganger("reflector-mspct-sum",
- autoplot(two_leaves_Rfr.mspct, plot.data = "prod"))
- vdiffr::expect_doppelganger("reflector-mspct-se",
- autoplot(two_leaves_Rfr.mspct, plot.data = "se"))
- vdiffr::expect_doppelganger("reflector-mspct-se-ylab",
- autoplot(two_leaves_Rfr.mspct, plot.data = "se", ylab = "Standard error of the mean"))
- vdiffr::expect_doppelganger("reflector-mspct-var",
- autoplot(two_leaves_Rfr.mspct, plot.data = "var"))
- vdiffr::expect_doppelganger("reflector-mspct-var-ylab",
- autoplot(two_leaves_Rfr.mspct, plot.data = "var", ylab = "Variance"))
- vdiffr::expect_doppelganger("reflector-mspct-mean-Tfr",
- autoplot(two_leaves_Rfr.mspct, plot.data = "mean", plot.qty = "reflectance"))
- vdiffr::expect_doppelganger("reflector-mspct-median-Tfr",
- autoplot(two_leaves_Rfr.mspct, plot.data = "median", plot.qty = "reflectance"))
-})
-
-test_that("object_spct", {
- set_annotations_default()
- vdiffr::expect_doppelganger("object-default-tot",
- autoplot(Ler_leaf.spct))
- vdiffr::expect_doppelganger("object-default-pc-out-tot",
- autoplot(Ler_leaf.spct, pc.out = TRUE))
- vdiffr::expect_doppelganger("object-text-size-tot",
- autoplot(Ler_leaf.spct, text.size = 3.5))
- vdiffr::expect_doppelganger("object-wb-vis-tot",
- autoplot(Ler_leaf.spct, w.band = VIS_bands()))
- vdiffr::expect_doppelganger("object-range-num-tot",
- autoplot(Ler_leaf.spct, range = c(500, 700)))
- vdiffr::expect_doppelganger("object-range-wb-tot",
- autoplot(Ler_leaf.spct, range = waveband(c(500, 700))))
- vdiffr::expect_doppelganger("object-no-annotations-tot",
- autoplot(Ler_leaf.spct, annotations = ""))
- vdiffr::expect_doppelganger("object-reserve-space-tot",
- autoplot(Ler_leaf.spct, annotations = "reserve.space"))
- vdiffr::expect_doppelganger("object-minus-guide-tot",
- autoplot(Ler_leaf.spct, annotations = c("-", "colour.guide")))
- vdiffr::expect_doppelganger("object-plus-segments-tot",
- autoplot(Ler_leaf.spct, annotations = c("+", "segments")))
-
- vdiffr::expect_doppelganger("object-default-stk",
- autoplot(Ler_leaf.spct, stacked = FALSE))
- vdiffr::expect_doppelganger("object-default-stk-ylim",
- autoplot(Ler_leaf.spct, stacked = FALSE, ylim = c(-0.2, 1.2)))
- vdiffr::expect_doppelganger("object-default-pc-out-stk",
- autoplot(Ler_leaf.spct, stacked = FALSE, pc.out = TRUE))
- vdiffr::expect_doppelganger("object-text-size-stk",
- autoplot(Ler_leaf.spct, stacked = FALSE, text.size = 3.5))
- vdiffr::expect_doppelganger("object-minus-peaks-stk",
- autoplot(Ler_leaf.spct, stacked = FALSE, span = 401, annotations = c("-", "peaks")))
- vdiffr::expect_doppelganger("object-peaks-valleys-stk",
- autoplot(Ler_leaf.spct, stacked = FALSE, span = 401, annotations = c("+", "peaks", "valleys")))
- vdiffr::expect_doppelganger("object-plus-valleys-stk",
- autoplot(Ler_leaf.spct, stacked = FALSE, span = 401, annotations = c("+", "valleys")))
- vdiffr::expect_doppelganger("object-wb-vis-stk",
- autoplot(Ler_leaf.spct, stacked = FALSE, w.band = VIS_bands()))
- vdiffr::expect_doppelganger("object-range-num-stk",
- autoplot(Ler_leaf.spct, stacked = FALSE, range = c(500, 700)))
- vdiffr::expect_doppelganger("object-range-wb-stk",
- autoplot(Ler_leaf.spct, stacked = FALSE, range = waveband(c(500, 700))))
- vdiffr::expect_doppelganger("object-no-annotations-stk",
- autoplot(Ler_leaf.spct, stacked = FALSE, annotations = ""))
- vdiffr::expect_doppelganger("object-minus-labels-stk",
- autoplot(Ler_leaf.spct, stacked = FALSE, annotations = c("-", "labels")))
- vdiffr::expect_doppelganger("object-plus-segments-stk",
- autoplot(Ler_leaf.spct, stacked = FALSE, annotations = c("+", "segments")))
-})
-
-test_that("object_spct_as_reflector", {
- set_annotations_default()
- vdiffr::expect_doppelganger("object-as-reflector-default-tot",
- autoplot(Ler_leaf.spct, plot.qty = "reflectance"))
- vdiffr::expect_doppelganger("object-as-reflector-default-pc-out-tot",
- autoplot(Ler_leaf.spct, pc.out = TRUE, plot.qty = "reflectance"))
- vdiffr::expect_doppelganger("object-as-reflector-text-size-tot",
- autoplot(Ler_leaf.spct, text.size = 3.5, plot.qty = "reflectance"))
- vdiffr::expect_doppelganger("object-as-reflector-wb-vis-tot",
- autoplot(Ler_leaf.spct, w.band = VIS_bands(), plot.qty = "reflectance"))
- vdiffr::expect_doppelganger("object-as-reflector-range-num-tot",
- autoplot(Ler_leaf.spct, range = c(500, 700), plot.qty = "reflectance"))
- vdiffr::expect_doppelganger("object-as-reflector-range-wb-tot",
- autoplot(Ler_leaf.spct, range = waveband(c(500, 700)), plot.qty = "reflectance"))
- vdiffr::expect_doppelganger("object-as-reflector-no-annotations-tot",
- autoplot(Ler_leaf.spct, annotations = "", plot.qty = "reflectance"))
- vdiffr::expect_doppelganger("object-as-reflector-reserve-space-tot",
- autoplot(Ler_leaf.spct, annotations = "reserve.space", plot.qty = "reflectance"))
- vdiffr::expect_doppelganger("object-as-reflector-minus-guide-tot",
- autoplot(Ler_leaf.spct, annotations = c("-", "colour.guide"), plot.qty = "reflectance"))
- vdiffr::expect_doppelganger("object-as-reflector-plus-segments-tot",
- autoplot(Ler_leaf.spct, annotations = c("+", "segments"), plot.qty = "reflectance"))
-})
-
-test_that("object_spct_as_filter", {
- set_annotations_default()
- vdiffr::expect_doppelganger("object-filter-tfr-default-tot",
- autoplot(Ler_leaf.spct, plot.qty = "transmittance"))
- vdiffr::expect_doppelganger("object-as-filter-tfr-default-pc-out-tot",
- autoplot(Ler_leaf.spct, pc.out = TRUE, plot.qty = "transmittance"))
- vdiffr::expect_doppelganger("object-as-filter-tfr-text-size-tot",
- autoplot(Ler_leaf.spct, text.size = 3.5, plot.qty = "transmittance"))
- vdiffr::expect_doppelganger("object-as-filter-tfr-wb-vis-tot",
- autoplot(Ler_leaf.spct, w.band = VIS_bands(), plot.qty = "transmittance"))
- vdiffr::expect_doppelganger("object-as-filter-tfr-range-num-tot",
- autoplot(Ler_leaf.spct, range = c(500, 700), plot.qty = "transmittance"))
- vdiffr::expect_doppelganger("object-as-filter-tfr-range-wb-tot",
- autoplot(Ler_leaf.spct, range = waveband(c(500, 700)), plot.qty = "transmittance"))
- vdiffr::expect_doppelganger("object-as-filter-tfr-no-annotations-tot",
- autoplot(Ler_leaf.spct, annotations = "", plot.qty = "transmittance"))
- vdiffr::expect_doppelganger("object-as-filter-tfr-reserve-space-tot",
- autoplot(Ler_leaf.spct, annotations = "reserve.space", plot.qty = "transmittance"))
- vdiffr::expect_doppelganger("object-as-filter-tfr-minus-guide-tot",
- autoplot(Ler_leaf.spct, annotations = c("-", "colour.guide"), plot.qty = "transmittance"))
- vdiffr::expect_doppelganger("object-as-filter-tfr-plus-segments-tot",
- autoplot(Ler_leaf.spct, annotations = c("+", "segments"), plot.qty = "transmittance"))
-
- vdiffr::expect_doppelganger("object-as-filter-afr-default-tot",
- autoplot(Ler_leaf.spct, plot.qty = "absorptance"))
- vdiffr::expect_doppelganger("object-as-filter-afr-default-pc-out-tot",
- autoplot(Ler_leaf.spct, pc.out = TRUE, plot.qty = "absorptance"))
- vdiffr::expect_doppelganger("object-as-filter-afr-text-size-tot",
- autoplot(Ler_leaf.spct, text.size = 3.5, plot.qty = "absorptance"))
- vdiffr::expect_doppelganger("object-as-filter-afr-wb-vis-tot",
- autoplot(Ler_leaf.spct, w.band = VIS_bands(), plot.qty = "absorptance"))
- vdiffr::expect_doppelganger("object-as-filter-afr-range-num-tot",
- autoplot(Ler_leaf.spct, range = c(500, 700), plot.qty = "absorptance"))
- vdiffr::expect_doppelganger("object-as-filter-afr-range-wb-tot",
- autoplot(Ler_leaf.spct, range = waveband(c(500, 700)), plot.qty = "absorptance"))
- vdiffr::expect_doppelganger("object-as-filter-afr-no-annotations-tot",
- autoplot(Ler_leaf.spct, annotations = "", plot.qty = "absorptance"))
- vdiffr::expect_doppelganger("object-as-filter-afr-reserve-space-tot",
- autoplot(Ler_leaf.spct, annotations = "reserve.space", plot.qty = "absorptance"))
- vdiffr::expect_doppelganger("object-as-filter-afr-minus-guide-tot",
- autoplot(Ler_leaf.spct, annotations = c("-", "colour.guide"), plot.qty = "absorptance"))
- vdiffr::expect_doppelganger("object-as-filter-afr-plus-segments-tot",
- autoplot(Ler_leaf.spct, annotations = c("+", "segments"), plot.qty = "absorptance"))
-
- vdiffr::expect_doppelganger("object-as-filter-a-default-tot",
- autoplot(Ler_leaf.spct, plot.qty = "absorbance"))
- vdiffr::expect_doppelganger("object-as-filter-a-default-pc-out-tot",
- autoplot(Ler_leaf.spct, pc.out = TRUE, plot.qty = "absorbance"))
- vdiffr::expect_doppelganger("object-as-filter-a-text-size-tot",
- autoplot(Ler_leaf.spct, text.size = 3.5, plot.qty = "absorbance"))
- vdiffr::expect_doppelganger("object-as-filter-a-wb-vis-tot",
- autoplot(Ler_leaf.spct, w.band = VIS_bands(), plot.qty = "absorbance"))
- vdiffr::expect_doppelganger("object-as-filter-a-range-num-tot",
- autoplot(Ler_leaf.spct, range = c(500, 700), plot.qty = "absorbance"))
- vdiffr::expect_doppelganger("object-as-filter-a-range-wb-tot",
- autoplot(Ler_leaf.spct, range = waveband(c(500, 700)), plot.qty = "absorbance"))
- vdiffr::expect_doppelganger("object-as-filter-a-no-annotations-tot",
- autoplot(Ler_leaf.spct, annotations = "", plot.qty = "absorbance"))
- vdiffr::expect_doppelganger("object-as-filter-a-reserve-space-tot",
- autoplot(Ler_leaf.spct, annotations = "reserve.space", plot.qty = "absorbance"))
- vdiffr::expect_doppelganger("object-as-filter-a-minus-guide-tot",
- autoplot(Ler_leaf.spct, annotations = c("-", "colour.guide"), plot.qty = "absorbance"))
- vdiffr::expect_doppelganger("object-as-filter-a-plus-segments-tot",
- autoplot(Ler_leaf.spct, annotations = c("+", "segments"), plot.qty = "absorbance"))
-})
-
-test_that("response_spct", {
- set_annotations_default()
- vdiffr::expect_doppelganger("response-default-scaled",
- autoplot(fscale(ccd.spct, f = "mean", target = 1)))
- vdiffr::expect_doppelganger("response-default-normalized",
- autoplot(ccd.spct, norm = 600))
-
- vdiffr::expect_doppelganger("response-default",
- autoplot(ccd.spct))
- vdiffr::expect_doppelganger("response-default-ylim",
- autoplot(ccd.spct, ylim = c(-0.1, 1.2)))
- vdiffr::expect_doppelganger("response-text-size",
- autoplot(ccd.spct, text.size = 3.5))
- vdiffr::expect_doppelganger("response-span-31",
- autoplot(ccd.spct, span = 31))
- vdiffr::expect_doppelganger("response-wb-vis",
- autoplot(ccd.spct, w.band = VIS_bands()))
- vdiffr::expect_doppelganger("response-label-average",
- autoplot(ccd.spct, label.qty = "average"))
- vdiffr::expect_doppelganger("response-label-mean",
- autoplot(ccd.spct, label.qty = "mean"))
- vdiffr::expect_doppelganger("response-label-total",
- autoplot(ccd.spct, label.qty = "total"))
- vdiffr::expect_doppelganger("response-label-contrib",
- autoplot(ccd.spct, label.qty = "contribution"))
- vdiffr::expect_doppelganger("response-label-relative",
- autoplot(ccd.spct, label.qty = "relative"))
- vdiffr::expect_doppelganger("response-range-num",
- autoplot(ccd.spct, range = c(300, 700)))
- vdiffr::expect_doppelganger("response-range-wb",
- autoplot(ccd.spct, range = waveband(c(300, 700))))
- vdiffr::expect_doppelganger("response-no-annotations",
- autoplot(ccd.spct, annotations = ""))
- vdiffr::expect_doppelganger("response-reserve-space",
- autoplot(ccd.spct, annotations = "reserve.space"))
- vdiffr::expect_doppelganger("response-minus-annotations",
- autoplot(ccd.spct, annotations = c("-", "summaries")))
- vdiffr::expect_doppelganger("response-plus-annotations",
- autoplot(ccd.spct, annotations = c("+", "boundaries")))
-
- vdiffr::expect_doppelganger("response-default-q",
- autoplot(ccd.spct, unit.out = "photon"))
- vdiffr::expect_doppelganger("response-default-ylim-q",
- autoplot(ccd.spct, unit.out = "photon", ylim = c(-0.2, 1.2)))
- vdiffr::expect_doppelganger("response-text-size-q",
- autoplot(ccd.spct, unit.out = "photon", text.size = 3.5))
- vdiffr::expect_doppelganger("response-span-31-q",
- autoplot(ccd.spct, unit.out = "photon", span = 31))
- vdiffr::expect_doppelganger("response-wb-vis-q",
- autoplot(ccd.spct, unit.out = "photon", w.band = VIS_bands()))
- vdiffr::expect_doppelganger("response-label-average-q",
- autoplot(ccd.spct, unit.out = "photon", label.qty = "average"))
- vdiffr::expect_doppelganger("response-label-mean-q",
- autoplot(ccd.spct, unit.out = "photon", label.qty = "mean"))
- vdiffr::expect_doppelganger("response-label-total-q",
- autoplot(ccd.spct, unit.out = "photon", label.qty = "total"))
- vdiffr::expect_doppelganger("response-label-contrib-q",
- autoplot(ccd.spct, unit.out = "photon", label.qty = "contribution"))
- vdiffr::expect_doppelganger("response-label-relative-q",
- autoplot(ccd.spct, unit.out = "photon", label.qty = "relative"))
- vdiffr::expect_doppelganger("response-range-num-q",
- autoplot(ccd.spct, unit.out = "photon", range = c(500, 700)))
- vdiffr::expect_doppelganger("response-range-wb-q",
- autoplot(ccd.spct, unit.out = "photon", range = waveband(c(500, 700))))
- vdiffr::expect_doppelganger("response-no-annotations-q",
- autoplot(ccd.spct, unit.out = "photon", annotations = ""))
- vdiffr::expect_doppelganger("response-minus-summaries-q",
- autoplot(ccd.spct, unit.out = "photon", annotations = c("-", "summaries")))
- vdiffr::expect_doppelganger("response-minus-boxes-q",
- autoplot(ccd.spct, unit.out = "photon", annotations = c("-", "boxes")))
- vdiffr::expect_doppelganger("response-plus-boundaries-q",
- autoplot(ccd.spct, unit.out = "photon", annotations = c("+", "boundaries")))
- vdiffr::expect_doppelganger("response-plus-segments-q",
- autoplot(ccd.spct, unit.out = "photon", annotations = c("+", "segments")))
-
- # time units
- vdiffr::expect_doppelganger("response-second",
- autoplot(setTimeUnit(ccd.spct, "second", TRUE), norm = NULL))
- vdiffr::expect_doppelganger("response-hour",
- autoplot(setTimeUnit(ccd.spct, "hour", TRUE), norm = NULL))
- vdiffr::expect_doppelganger("response-day",
- autoplot(setTimeUnit(ccd.spct, "day", TRUE), norm = NULL))
- vdiffr::expect_doppelganger("response-exposure",
- autoplot(setTimeUnit(ccd.spct, "exposure", TRUE), norm = NULL))
- vdiffr::expect_doppelganger("response-duration",
- autoplot(setTimeUnit(ccd.spct, lubridate::duration(4.5, "minutes"), TRUE), norm = NULL))
- vdiffr::expect_doppelganger("response-none",
- autoplot(setTimeUnit(ccd.spct, "unknown", TRUE), norm = NULL))
- vdiffr::expect_doppelganger("response-seconds",
- autoplot(setTimeUnit(ccd.spct, lubridate::duration(1, "seconds"), TRUE), norm = NULL))
- vdiffr::expect_doppelganger("response-hours",
- autoplot(setTimeUnit(ccd.spct, lubridate::duration(1, "hours"), TRUE), norm = NULL))
- vdiffr::expect_doppelganger("response-days",
- autoplot(setTimeUnit(ccd.spct, lubridate::duration(1, "days"), TRUE), norm = NULL))
-
- vdiffr::expect_doppelganger("response-second-q",
- autoplot(setTimeUnit(ccd.spct, "second", TRUE), norm = NULL, unit.out = "photon"))
- vdiffr::expect_doppelganger("response-hour-q",
- autoplot(setTimeUnit(ccd.spct, "hour", TRUE), norm = NULL, unit.out = "photon"))
- vdiffr::expect_doppelganger("response-day-q",
- autoplot(setTimeUnit(ccd.spct, "day", TRUE), norm = NULL, unit.out = "photon"))
- vdiffr::expect_doppelganger("response-exposure-q",
- autoplot(setTimeUnit(ccd.spct, "exposure", TRUE), norm = NULL, unit.out = "photon"))
- vdiffr::expect_doppelganger("response-duration-q",
- autoplot(setTimeUnit(ccd.spct, lubridate::duration(4.5, "minutes"), TRUE), norm = NULL, unit.out = "photon"))
- vdiffr::expect_doppelganger("response-none-q",
- autoplot(setTimeUnit(ccd.spct, "unknown", TRUE), norm = NULL, unit.out = "photon"))
- vdiffr::expect_doppelganger("response-seconds-q",
- autoplot(setTimeUnit(ccd.spct, lubridate::duration(1, "seconds"), TRUE), norm = NULL, unit.out = "photon"))
- vdiffr::expect_doppelganger("response-hours-q",
- autoplot(setTimeUnit(ccd.spct, lubridate::duration(1, "hours"), TRUE), norm = NULL, unit.out = "photon"))
- vdiffr::expect_doppelganger("response-days-q",
- autoplot(setTimeUnit(ccd.spct, lubridate::duration(1, "days"), TRUE), norm = NULL, unit.out = "photon"))
-
- })
-
-test_that("response_mspct", {
- set_annotations_default()
- two_ccds.mspct <- response_mspct(list(one = ccd.spct,
- half = ccd.spct / 2))
-
- vdiffr::expect_doppelganger("response-mspct-default",
- autoplot(two_ccds.mspct))
- vdiffr::expect_doppelganger("response-mspct-default-range",
- autoplot(two_ccds.mspct, range = c(500, 700)))
- vdiffr::expect_doppelganger("response-mspct-default-e",
- autoplot(two_ccds.mspct, unit.out = "energy"))
- vdiffr::expect_doppelganger("response-mspct-default-p",
- autoplot(two_ccds.mspct, unit.out = "photon"))
- vdiffr::expect_doppelganger("response-mspct-no-annotations",
- autoplot(two_ccds.mspct, annotations = ""))
- vdiffr::expect_doppelganger("response-mspct-reserve-space",
- autoplot(two_ccds.mspct, annotations = "reserve.space"))
- vdiffr::expect_doppelganger("response-mspct-mean",
- autoplot(two_ccds.mspct, plot.data = "mean"))
- vdiffr::expect_doppelganger("response-mspct-median",
- autoplot(two_ccds.mspct, plot.data = "median"))
- vdiffr::expect_doppelganger("response-mspct-sum",
- autoplot(two_ccds.mspct, plot.data = "sum"))
- # vdiffr::expect_doppelganger("response-mspct-sum",
- # autoplot(two_ccds.mspct, plot.data = "prod"))
- testthat::expect_warning(autoplot(two_ccds.mspct, plot.data = "prod"))
- vdiffr::expect_doppelganger("response-mspct-se",
- autoplot(two_ccds.mspct, plot.data = "se"))
- vdiffr::expect_doppelganger("response-mspct-se-ylab",
- autoplot(two_ccds.mspct, plot.data = "se", ylab = "Standard error of the mean"))
- vdiffr::expect_doppelganger("response-mspct-var",
- autoplot(two_ccds.mspct, plot.data = "var"))
- vdiffr::expect_doppelganger("response-mspct-var-ylab",
- autoplot(two_ccds.mspct, plot.data = "var", ylab = "Variance"))
- vdiffr::expect_doppelganger("response-mspct-mean-e",
- autoplot(two_ccds.mspct, plot.data = "mean", unit.out = "energy"))
- vdiffr::expect_doppelganger("response-mspct-mean-p",
- autoplot(two_ccds.mspct, plot.data = "mean", unit.out = "photon"))
- vdiffr::expect_doppelganger("response-mspct-median-e",
- autoplot(two_ccds.mspct, plot.data = "median", unit.out = "energy"))
- vdiffr::expect_doppelganger("response-mspct-median-p",
- autoplot(two_ccds.mspct, plot.data = "median", unit.out = "photon"))
-})
-
-test_that("waveband", {
- set_annotations_default()
- vdiffr::expect_doppelganger("waveband-default-cie",
- autoplot(CIE(), range = c(230, 430)))
- vdiffr::expect_doppelganger("waveband-default-red",
- autoplot(Red()))
- vdiffr::expect_doppelganger("waveband-default-ylim",
- autoplot(Red(), ylim = c(-0.2, 1.2)))
- vdiffr::expect_doppelganger("waveband-text-size",
- autoplot(Red(), text.size = 3.5))
- vdiffr::expect_doppelganger("waveband-plus-segments",
- autoplot(Red(), annotations = c("+", "segments")))
- vdiffr::expect_doppelganger("waveband-minus-boxes",
- autoplot(Red(), annotations = c("-", "boxes")))
- vdiffr::expect_doppelganger("waveband-no-annotations",
- autoplot(Red(), annotations = ""))
- vdiffr::expect_doppelganger("waveband-reserve-space",
- autoplot(Red(), annotations = "reserve.space"))
-})
-
-
-# test_that("plot_spct", {
-# set_annotations_default()
-# # skip_on_cran()
-# vdiffr::expect_doppelganger("raw-default-autop",
-# plot(white_led.raw_spct))
-# vdiffr::expect_doppelganger("cps-default-autop",
-# plot(white_led.cps_spct))
-# vdiffr::expect_doppelganger("source-default-autop",
-# plot(white_led.source_spct))
-# vdiffr::expect_doppelganger("source-product-BSWF-autop",
-# plot(sun.spct * CIE()))
-# vdiffr::expect_doppelganger("filter-default-tot-autop",
-# plot(Ler_leaf_trns.spct))
-# vdiffr::expect_doppelganger("reflector-default-tot-autop",
-# plot(Ler_leaf_rflt.spct))
-# vdiffr::expect_doppelganger("object-default-tot-autop",
-# plot(Ler_leaf.spct))
-# vdiffr::expect_doppelganger("object-default-stk-autop",
-# plot(Ler_leaf.spct, stacked = FALSE))
-# vdiffr::expect_doppelganger("response-default-autop",
-# plot(ccd.spct))
-# })
-
-test_that("plot_mspct", {
- set_annotations_default()
- two_ccds.mspct <- response_mspct(list(one = ccd.spct,
- half = ccd.spct / 2))
- vdiffr::expect_doppelganger("response-mspct-default-autop",
- plot(two_ccds.mspct))
-})
-
-test_that("plot_waveband", {
- vdiffr::expect_doppelganger("waveband-default-cie-autop",
- plot(CIE(), range = c(230, 430)))
-})
-
-test_that("set_annotations_default", {
- set_annotations_default()
- expect_null(getOption("photobiology.plot.annotations"))
- set_annotations_default("")
- expect_setequal(getOption("photobiology.plot.annotations"), "")
- set_annotations_default("reserve.space")
- expect_setequal(getOption("photobiology.plot.annotations"), "reserve.space")
- set_annotations_default()
- set_annotations_default(c("+", "title:what:where"))
- expect_setequal(getOption("photobiology.plot.annotations"),
- c("boxes", "labels", "summaries", "colour.guide", "peaks", "title:what:where"))
- set_annotations_default("+")
- expect_setequal(getOption("photobiology.plot.annotations"),
- c("boxes", "labels", "summaries", "colour.guide", "peaks", "title:what:where"))
- set_annotations_default("-")
- expect_setequal(getOption("photobiology.plot.annotations"),
- c("boxes", "labels", "summaries", "colour.guide", "peaks", "title:what:where"))
- set_annotations_default(c("-", "title"))
- expect_setequal(getOption("photobiology.plot.annotations"),
- c("boxes", "labels", "summaries", "colour.guide", "peaks", "title:what:where"))
- set_annotations_default(c("-", "title*"))
- expect_setequal(getOption("photobiology.plot.annotations"),
- c("boxes", "labels", "summaries", "colour.guide", "peaks"))
- set_annotations_default(c("-", "peaks*"))
- expect_setequal(getOption("photobiology.plot.annotations"),
- c("boxes", "labels", "summaries", "colour.guide"))
- set_annotations_default(c("+", "peaks"))
- expect_setequal(getOption("photobiology.plot.annotations"),
- c("boxes", "labels", "summaries", "colour.guide", "peaks"))
- set_annotations_default(c("+", "peak.labels"))
- expect_setequal(getOption("photobiology.plot.annotations"),
- c("boxes", "labels", "summaries", "colour.guide", "peak.labels"))
- set_annotations_default(c("+", "peaks"))
- expect_setequal(getOption("photobiology.plot.annotations"),
- c("boxes", "labels", "summaries", "colour.guide", "peaks"))
- set_annotations_default(c("+", "peaks"))
- expect_setequal(getOption("photobiology.plot.annotations"),
- c("boxes", "labels", "summaries", "colour.guide", "peaks"))
- set_annotations_default(c("+", "segments"))
- expect_setequal(getOption("photobiology.plot.annotations"),
- c("segments", "labels", "summaries", "colour.guide", "peaks"))
- set_annotations_default(c("+", "boxes"))
- expect_setequal(getOption("photobiology.plot.annotations"),
- c("boxes", "labels", "summaries", "colour.guide", "peaks"))
- set_annotations_default(c("=", "segments", "summaries"))
- expect_setequal(getOption("photobiology.plot.annotations"),
- c("segments", "summaries"))
- set_annotations_default(c("=", ""))
- expect_setequal(getOption("photobiology.plot.annotations"), "")
- set_annotations_default(c("segments", "summaries"))
- expect_setequal(getOption("photobiology.plot.annotations"),
- c("segments", "summaries"))
- set_annotations_default(c("color.guide", "colour.guide"))
- expect_setequal(getOption("photobiology.plot.annotations"), "colour.guide")
- set_annotations_default() # clean up
-})
-
-test_that("set_w.band_default", {
- set_w.band_default()
- expect_null(getOption("photobiology.plot.bands"))
- set_w.band_default(UVB())
- expect_setequal(getOption("photobiology.plot.bands"), list(UVB()))
- set_w.band_default(UV_bands())
- expect_setequal(getOption("photobiology.plot.bands"), UV_bands())
- expect_warning(set_w.band_default("UVB"))
- expect_warning(set_w.band_default(c(400,500)))
- expect_warning(set_w.band_default(list(a = 400, b = "a")))
- set_w.band_default() # clean up
-})
diff --git a/tests/testthat/test-set-unset-options.R b/tests/testthat/test-set-unset-options.R
new file mode 100644
index 00000000..767eb13c
--- /dev/null
+++ b/tests/testthat/test-set-unset-options.R
@@ -0,0 +1,72 @@
+context("set-unset-options")
+library(photobiology)
+
+test_that("set_annotations_default", {
+ set_annotations_default()
+ expect_null(getOption("photobiology.plot.annotations"))
+ set_annotations_default("")
+ expect_setequal(getOption("photobiology.plot.annotations"), "")
+ set_annotations_default("reserve.space")
+ expect_setequal(getOption("photobiology.plot.annotations"), "reserve.space")
+ set_annotations_default()
+ set_annotations_default(c("+", "title:what:where"))
+ expect_setequal(getOption("photobiology.plot.annotations"),
+ c("boxes", "labels", "summaries", "colour.guide", "peaks", "title:what:where"))
+ set_annotations_default("+")
+ expect_setequal(getOption("photobiology.plot.annotations"),
+ c("boxes", "labels", "summaries", "colour.guide", "peaks", "title:what:where"))
+ set_annotations_default("-")
+ expect_setequal(getOption("photobiology.plot.annotations"),
+ c("boxes", "labels", "summaries", "colour.guide", "peaks", "title:what:where"))
+ set_annotations_default(c("-", "title"))
+ expect_setequal(getOption("photobiology.plot.annotations"),
+ c("boxes", "labels", "summaries", "colour.guide", "peaks", "title:what:where"))
+ set_annotations_default(c("-", "title*"))
+ expect_setequal(getOption("photobiology.plot.annotations"),
+ c("boxes", "labels", "summaries", "colour.guide", "peaks"))
+ set_annotations_default(c("-", "peaks*"))
+ expect_setequal(getOption("photobiology.plot.annotations"),
+ c("boxes", "labels", "summaries", "colour.guide"))
+ set_annotations_default(c("+", "peaks"))
+ expect_setequal(getOption("photobiology.plot.annotations"),
+ c("boxes", "labels", "summaries", "colour.guide", "peaks"))
+ set_annotations_default(c("+", "peak.labels"))
+ expect_setequal(getOption("photobiology.plot.annotations"),
+ c("boxes", "labels", "summaries", "colour.guide", "peak.labels"))
+ set_annotations_default(c("+", "peaks"))
+ expect_setequal(getOption("photobiology.plot.annotations"),
+ c("boxes", "labels", "summaries", "colour.guide", "peaks"))
+ set_annotations_default(c("+", "peaks"))
+ expect_setequal(getOption("photobiology.plot.annotations"),
+ c("boxes", "labels", "summaries", "colour.guide", "peaks"))
+ set_annotations_default(c("+", "segments"))
+ expect_setequal(getOption("photobiology.plot.annotations"),
+ c("segments", "labels", "summaries", "colour.guide", "peaks"))
+ set_annotations_default(c("+", "boxes"))
+ expect_setequal(getOption("photobiology.plot.annotations"),
+ c("boxes", "labels", "summaries", "colour.guide", "peaks"))
+ set_annotations_default(c("=", "segments", "summaries"))
+ expect_setequal(getOption("photobiology.plot.annotations"),
+ c("segments", "summaries"))
+ set_annotations_default(c("=", ""))
+ expect_setequal(getOption("photobiology.plot.annotations"), "")
+ set_annotations_default(c("segments", "summaries"))
+ expect_setequal(getOption("photobiology.plot.annotations"),
+ c("segments", "summaries"))
+ set_annotations_default(c("color.guide", "colour.guide"))
+ expect_setequal(getOption("photobiology.plot.annotations"), "colour.guide")
+ set_annotations_default() # clean up
+})
+
+test_that("set_w.band_default", {
+ set_w.band_default()
+ expect_null(getOption("photobiology.plot.bands"))
+ set_w.band_default(UVB())
+ expect_setequal(getOption("photobiology.plot.bands"), list(UVB()))
+ set_w.band_default(UV_bands())
+ expect_setequal(getOption("photobiology.plot.bands"), UV_bands())
+ expect_warning(set_w.band_default("UVB"))
+ expect_warning(set_w.band_default(c(400,500)))
+ expect_warning(set_w.band_default(list(a = 400, b = "a")))
+ set_w.band_default() # clean up
+})
diff --git a/vignettes/userguide2-autoplot-methods.R b/vignettes/userguide2-autoplot-methods.R
index 5b00d18b..b658df0d 100644
--- a/vignettes/userguide2-autoplot-methods.R
+++ b/vignettes/userguide2-autoplot-methods.R
@@ -73,7 +73,7 @@ autoplot(sun.spct, w.band = waveband(c(380, 760)))
autoplot(sun.spct, w.band = NULL)
## ----eval=FALSE---------------------------------------------------------------
-# set_w.band_default(w.band = Plant_bands())
+# set_w.band_default(w.band = Plant_bands())
## -----------------------------------------------------------------------------
autoplot(sun_evening.mspct, plot.data = "mean")
@@ -164,8 +164,8 @@ autoplot(yellow_gel.spct, plot.qty = "absorbance", wls.target = 2,
annotations = list(c("-", "peaks"), c("+", "wls")))
## ----eval=FALSE, echo=FALSE---------------------------------------------------
-# yellow_gel.spct$Rfr <- 1 - max(yellow_gel.spct$Tfr)
-# autoplot(yellow_gel.spct, plot.qty = "absorptance", annotations = c("-", "peaks"))
+# yellow_gel.spct$Rfr <- 1 - max(yellow_gel.spct$Tfr)
+# autoplot(yellow_gel.spct, plot.qty = "absorptance", annotations = c("-", "peaks"))
## -----------------------------------------------------------------------------
autoplot(sun.spct) + geom_spct(fill = color_of(sun.spct)) +
@@ -179,16 +179,16 @@ autoplot(yellow_gel.spct, annotations = c("+", "boundaries"))
autoplot(white_led.raw_spct, annotations = c("+", "boundaries"))
## ----eval=FALSE, message = FALSE----------------------------------------------
-# autoplot(white_led.raw_spct[ , c("w.length", "counts_1")],
-# annotations = c("+", "boundaries"))
+# autoplot(white_led.raw_spct[ , c("w.length", "counts_1")],
+# annotations = c("+", "boundaries"))
## ----eval=FALSE---------------------------------------------------------------
-# autoplot(white_led.raw_spct[ , c("w.length", "counts_1", "counts_3")],
-# annotations = c("+", "boundaries"))
+# autoplot(white_led.raw_spct[ , c("w.length", "counts_1", "counts_3")],
+# annotations = c("+", "boundaries"))
## ----eval=FALSE---------------------------------------------------------------
-# # Not run so as to pass CRAN checks!!
-# autoplot(yellow_gel.spct - 0.01, annotations = c("+", "boundaries"))
+# # Not run so as to pass CRAN checks!!
+# autoplot(yellow_gel.spct - 0.01, annotations = c("+", "boundaries"))
## -----------------------------------------------------------------------------
autoplot(sun_evening.mspct, annotations = c("-", "peaks")) +
diff --git a/vignettes/userguide2-autoplot-methods.Rmd b/vignettes/userguide2-autoplot-methods.Rmd
index c2fbebfb..e7c37ceb 100644
--- a/vignettes/userguide2-autoplot-methods.Rmd
+++ b/vignettes/userguide2-autoplot-methods.Rmd
@@ -504,6 +504,7 @@ A `autoplot()` method for `waveband` objects is also provided.
```{r}
autoplot(VIS())
```
+
```{r}
autoplot(PAR(), range = c(200, 1000), geom = "spct",
unit.in = "photon", unit.out = "energy")
diff --git a/vignettes/userguide2-autoplot-methods.html b/vignettes/userguide2-autoplot-methods.html
index d42faa50..231f0fe7 100644
--- a/vignettes/userguide2-autoplot-methods.html
+++ b/vignettes/userguide2-autoplot-methods.html
@@ -12,7 +12,7 @@
-
+
User Guide: 2 Autoplot Methods
@@ -62,7 +62,7 @@
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
-pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
@@ -339,9 +339,9 @@
User Guide: 2 Autoplot Methods
-âggspectraâ 0.3.12.9001
+âggspectraâ 0.3.14.9000
Pedro J. Aphalo
-2024-08-02
+2024-12-23
@@ -398,8 +398,11 @@
Introduction
## Label: sunlight, simulated
## Measured on 2010-06-22 09:51:00 UTC
## Measured at 60.20911 N, 24.96474 E; Kumpula, Helsinki, FI
-## Time unit 1s
-##
+## Variables:
+## w.length: Wavelength [nm]
+## s.e.irrad: Spectral energy irradiance [W m-2 nm-1]
+## s.q.irrad: Spectral photon irradiance [mol s-1 m-2 nm-1]
+## --
## w.length s.e.irrad s.q.irrad
## Min. :280.0 Min. :0.0000 Min. :0.000e+00
## 1st Qu.:409.2 1st Qu.:0.4115 1st Qu.:1.980e-06
@@ -418,8 +421,10 @@
Introduction
## time.04 measured on 2023-06-12 18:41:00.768459 UTC
## time.05 measured on 2023-06-12 18:42:00.769065 UTC
## Measured at 60.227 N, 24.018 E; Viikki, Helsinki, FI
-## Time unit 1s
-##
+## Variables:
+## w.length: Wavelength [nm]
+## s.e.irrad: Spectral energy irradiance [W m-2 nm-1]
+## --
## w.length s.e.irrad spct.idx
## Min. : 290.0 Min. :0.00000 time.01:1593
## 1st Qu.: 474.4 1st Qu.:0.02315 time.02:1593
@@ -466,7 +471,7 @@
The basics
The simplest possible call to autoplot()
needs only one
argument, the object to plot.
-
+
In contrast to the examples in the User Guide 1 , here we
obtain directly an annotated plot of the solar spectrum at ground level.
This would be of limited use without the possibility to adjust the
@@ -482,16 +487,16 @@
The basics
spectral values and derived summaries will always use the same base of
expression.
autoplot (sun.spct, unit.out = "photon" )
-
+
We can build and area + line ("spct"
) plot instead the
default line plot.
autoplot (sun.spct, geom = "spct" )
-
+
If a single object contains multiple spectra in long form, they are
all plotted. In this case no summary values are displayed as they would
overlap.
autoplot (sun_evening.spct)
-
+
In addition to the autoplot()
methods for individual
spectra and spectra in stored long form (_spct
classes),
there are autoplot()
methods available for collections of
@@ -515,21 +520,21 @@
The basics
## [10] "chroma_mspct" "generic_mspct"
The plot using defaults is identical to that above.
autoplot (sun_evening.mspct)
-
+
We can choose a different name for the factor identifying the spectra
in the collection.
autoplot (sun_evening.mspct, idfactor = "Spectra" )
-
+
With facets, there is only one spectrum per panel. Summaries per
waveband are shown.
autoplot (sun_evening.spct, facets = TRUE )
-
+
Above we showed the default faceting by passing
facets = TRUE
. We can set the number of columns by passing
a number. For panels in one column we pass facets = 1
, and
for two columns we pass facets = 2
, and so on.
autoplot (sun_evening.mspct, facets = 2 )
-
+
Contrary to "gg"
objects created with package âggplot2â,
the data embedded in the "gg"
objects created with these
@@ -562,11 +567,35 @@
The basics
## position_identity
##
## geom_text: na.rm = TRUE
-## stat_peaks: span = NULL, ignore_threshold = 0.02, strict = TRUE, refine.wl = FALSE, method = spline, chroma.type = CMF, label.fmt = %.4g, x.label.fmt = %.4g, y.label.fmt = %.4g, na.rm = TRUE
+## stat_peaks: span = NULL, ignore_threshold = 0.02, strict = TRUE, refine.wl = FALSE, method = spline, chroma.type = CMF, label.fmt = %.4g, x.label.fmt = %.4g, y.label.fmt = %.4g, x.label.transform = function (x)
+## {
+## class(x) <- unique.default(c("AsIs", oldClass(x)))
+## x
+## }, y.label.transform = function (x)
+## {
+## class(x) <- unique.default(c("AsIs", oldClass(x)))
+## x
+## }, x.colour.transform = function (x)
+## {
+## class(x) <- unique.default(c("AsIs", oldClass(x)))
+## x
+## }, na.rm = TRUE
## position_nudge
##
## geom_point: na.rm = TRUE
-## stat_peaks: span = NULL, ignore_threshold = 0.02, strict = TRUE, refine.wl = FALSE, method = spline, chroma.type = CMF, label.fmt = %.3g, x.label.fmt = %.3g, y.label.fmt = %.3g, na.rm = TRUE
+## stat_peaks: span = NULL, ignore_threshold = 0.02, strict = TRUE, refine.wl = FALSE, method = spline, chroma.type = CMF, label.fmt = %.3g, x.label.fmt = %.3g, y.label.fmt = %.3g, x.label.transform = function (x)
+## {
+## class(x) <- unique.default(c("AsIs", oldClass(x)))
+## x
+## }, y.label.transform = function (x)
+## {
+## class(x) <- unique.default(c("AsIs", oldClass(x)))
+## x
+## }, x.colour.transform = function (x)
+## {
+## class(x) <- unique.default(c("AsIs", oldClass(x)))
+## x
+## }, na.rm = TRUE
## position_identity
##
## geom_rect: na.rm = TRUE
@@ -594,8 +623,10 @@
The basics
## Label: sunlight, simulated
## Measured on 2010-06-22 09:51:00 UTC
## Measured at 60.20911 N, 24.96474 E; Kumpula, Helsinki, FI
-## Time unit 1s
-##
+## Variables:
+## w.length: Wavelength [nm]
+## s.e.irrad: Spectral energy irradiance [W m-2 nm-1]
+## --
## w.length s.e.irrad
## Min. :280.0 Min. :0.0000
## 1st Qu.:409.2 1st Qu.:0.4115
@@ -616,22 +647,22 @@
Wavelengths
classes, such as class
source_spct
, or a
waveband
definition.
autoplot (sun.spct, range = c (400 , 700 ))
-
+
We can show summaries for different wavebands, by passing them to
parameter w.band
. We can pass either individual wavebands
or lists of wavebands. First a list of wavebands created with a
constructor, here showing the limits based on the ISO standard.
autoplot (sun.spct, w.band = photobiologyWavebands:: VIS_bands ("ISO" ))
-
+
A single waveband can also be created with a generic constructor.
autoplot (sun.spct, w.band = waveband (c (380 , 760 )))
-
+
NULL
as argument for w.band
is replaced by a
waveband covering the full range of the spectral data. The whole
range is the range plotted, which is controlled by the argument
passed to range
.
autoplot (sun.spct, w.band = NULL )
-
+
Summarizing the examples above, arguments passed to
range
and w.band
play very different roles.
Parameter range
, gives the wavelengths to include in the
@@ -666,7 +697,7 @@
âParallelâ summaries
spectra. Currently implemented only for spectra with identical
wavelength vectors and of the same class.
autoplot (sun_evening.mspct, plot.data = "mean" )
-
+
Summary quantities by waveband
@@ -680,7 +711,7 @@
Summary quantities by waveband
labels. Note that the units and quantity labels for the waveband
summaries have also changed.
autoplot (sun.spct, label.qty = "mean" )
-
+
Two label.qty
values need explanation. The first one,
"relative"
displays in labels the relative contribution of
the integral of each waveband, to the sum of the integrals of all
@@ -697,10 +728,10 @@
Summary quantities by waveband
wavebands cover the whole range of wavelengths in the spectrum, the sum
of the summary values is less than 100.
autoplot (sun.spct, label.qty = "contribution.pc" )
-
+
When using "relative.pc"
the sum adds to 100.
autoplot (sun.spct, label.qty = "relative.pc" )
-
+
Automatic annotations
@@ -900,42 +931,42 @@
Automatic annotations
We add a title, subtitle and caption.
autoplot (sun.spct,
annotations = c ("+" , "title:objt:when:where" ))
-
+
We use ânoneâ as a filler so that only subtitle and caption
are added to the plot.
autoplot (sun.spct,
annotations = c ("+" , "title:none:what:where" ))
-
+
With "boundaries"
, we add one or two horizontal dashed
lines showing the valid range of values. It does not override any other
annotation. (The boundary line is shown in red when a plot displays
out-of-range spectral data.)
autoplot (sun.spct,
annotations = c ("+" , "boundaries" ))
-
+
We can list all the annotations to be included in a plot, in which
case "="
is optional so as to maintain compatibility with
earlier versions.
autoplot (sun.spct,
annotations = c ("=" , "labels" , "summaries" , "color.guide" , "peaks" , "boundaries" ))
-
+
As indicated in the table above, some annotations override other
annotations which fulfill a similar role. Here "segments"
overrides the "boxes"
, included in the default
annotations.
autoplot (sun.spct,
annotations = c ("+" , "segments" ))
-
+
We can also remove some of the default annotations on a case
by case basis.
autoplot (sun.spct, annotations = c ("-" , "summaries" , "peaks" ))
-
+
The behaviour of some annotations can be tweaked. Below we add
"valleys"
as annotations, and control with
span
how close to each other are the peaks and valleys
found.
autoplot (sun.spct, annotations = c ("+" , "valleys" ), span = 41 )
-
+
The annotations "peak.labels"
and
"valley.labels"
override "peaks"
and
"valleys"
. They use the repulsive geometry
@@ -944,29 +975,29 @@
Automatic annotations
annotations = list (c ("+" , "peak.labels" ),
c ("-" , "boxes" , "summaries" , "labels" )),
span = 21 )
-
+
autoplot (sun.spct,
annotations = list (c ("+" , "valley.labels" ),
c ("-" , "peaks" )),
span = 31 )
-
+
autoplot (sun.spct, annotations = c ("+" , "peak.labels" , "valley.labels" ), span = 31 )
-
+
Passing ""
as argument to annotations
results in a plot with no annotations, and no extra expansion of scale
limits.
autoplot (sun.spct, annotations = "" )
-
+
Passing "reserve.space"
as argument to
annotations
results in a plot with no annotations, but with
scale limits expanded so as to receive annotations.
autoplot (sun.spct, annotations = "reserve.space" )
-
+
The size of the font used for the annotations is controlled by
argument text.size
.
autoplot (sun.spct, annotations = c ("=" , "segments" , "labels" , "color.guide" ),
text.size = 3.5 )
-
+
Argument ylim
allows to manually set the limits of the
\(y\) axis using the same syntax as in
package âggplot2â. The annotations are still automatically positioned,
@@ -974,7 +1005,7 @@
Automatic annotations
passed to ylim
still give the âspaceâ available for
plotting data.
autoplot (sun.spct, ylim = c (NA , 1 ))
-
+
The time base of the spectral unit or the duration of the exposure is
stored as metadata. As demonstrated here using spectral data integrated
over 24 h, a one-day-long exposure, the units in the axis labels change
@@ -982,7 +1013,7 @@
Automatic annotations
getTimeUnit (sun.daily.spct)
## [1] "day"
-
+
Even though the autoplot()
methods can return a finished
plot, the returned object is a ggplot
object and can be
built upon by adding additional elements like facets ,
@@ -991,7 +1022,7 @@
Automatic annotations
linetype
.
autoplot (sun_evening.spct, facets = 3 ) +
geom_vline (xintercept = c (400 , 700 ), linetype = "dashed" )
-
+
It is possible to construct and bind the spectra on-the-fly, and to
use arbitrary variable names for the index factor. This works
automatically as long as row binding is done with function
@@ -1000,7 +1031,7 @@
Automatic annotations
rbindspct (list (sun = sun.spct, filtered = yellow_gel.spct * sun.spct),
idfactor = "Source" )
autoplot (filter_no_yes.spct)
-
+
In the examples above the source_spct
object
sun.spct
was used. The autoplot()
methods for
other spectral classes have only slight differences. We show some
@@ -1009,14 +1040,14 @@
Automatic annotations
valleys.
autoplot (yellow_gel.spct,
annotations = list (c ("-" , "peaks" ), c ("+" , "wls" )))
-
+
In many cases it is possible to convert on-the-fly the quantity
plotted. In this case, given that the data are clipped as absorbance, a
fixed target of A = 2 for the cut-off to be labelled with the wavelength
is appropriate.
autoplot (yellow_gel.spct, plot.qty = "absorbance" , wls.target = 2 ,
annotations = list (c ("-" , "peaks" ), c ("+" , "wls" )))
-
+
If one needs to, one can add a suitable layer function, geom
or stat , using âlocalâ data, as shown here, or plot default
@@ -1024,13 +1055,13 @@
Automatic annotations
autoplot (sun.spct) + geom_spct (fill = color_of (sun.spct)) +
geom_spct (data = yellow_gel.spct * sun.spct, color = "black" ,
fill = color_of (yellow_gel.spct * sun.spct))
-
+
In the case of quantities like transmittance which have a certain
range of valid values, both upper and lower boundaries are highlighted,
but in other cases only one, or even none depending on the possible
valid ranges for the spectral quantities.
autoplot (yellow_gel.spct, annotations = c ("+" , "boundaries" ))
-
+
Differently from other classes raw_spct
and
cps_spct
objects can contain multiple columns of data,
normally measured different integartion times, and meant to be combined
@@ -1039,7 +1070,7 @@
Automatic annotations
descriptor as metadata, the upper boundary is set to the maximum counts
of the detector.
autoplot (white_led.raw_spct, annotations = c ("+" , "boundaries" ))
-
+
Both raw_spct
and cps_spct
objects contain
multiple data columns when integration time bracketing has been used
during data acquisition. In such cases, if one wants to plot only one of
@@ -1072,7 +1103,7 @@
Editing plots and adding layers
autoplot (sun_evening.mspct, annotations = c ("-" , "peaks" )) +
aes (color = ifelse (spct.idx == "time.05" , "black" , "darkred" )) +
theme (legend.position = "none" )
-
+
Plots created with autoplot()
methods are
ggplot
objects and can be customized, bearing in mind that
any added layers will be plotted on top or existing layers (that is
@@ -1088,21 +1119,21 @@
Editing plots and adding layers
label.fmt = "max at %3.1f nm" ,
vjust = - 0.5 , hjust = 0 ,
color = "red" , size = 3 )
-
+
Ploting wavebands
A autoplot()
method for waveband
objects is
also provided.
-
+
autoplot (PAR (), range = c (200 , 1000 ), geom = "spct" ,
unit.in = "photon" , unit.out = "energy" )
-
+
autoplot (CIE (), range = CIE (), annotations = c ("-" , "color.guide" ))
-
+
autoplot (DNA_N (), range = c (270 , 420 ), annotations = c ("-" , "color.guide" ))
-
+