plot_FilterCombinations function

Plot filter combinations along with the (optional) net transmission window

Plot filter combinations along with the (optional) net transmission window

The function allows to plot transmission windows for different filters. Missing data for specific wavelengths are automatically interpolated for the given filter data using the function approx . With that a standardised output is reached and a net transmission window can be shown.

Calculations

Net transmission window

The net transmission window of two filters is approximated by

[REMOVE_ME]Tfinal=T1T2[REMOVEME2] T_{final} = T_{1} * T_{2} [REMOVE_ME_2]

Optical density

[REMOVE_ME]OD=log10(T)[REMOVEME2] OD = -log10(T) [REMOVE_ME_2]

Total optical density

[REMOVE_ME]ODtotal=OD1+OD2[REMOVEME2] OD_{total} = OD_{1} + OD_{2} [REMOVE_ME_2]

Please consider using own calculations for more precise values.

How to provide input data?

CASE 1

The function expects that all filter values are either of type matrix or data.frame

with two columns. The first columns contains the wavelength, the second the relative transmission (but not in percentage, i.e. the maximum transmission can be only become 1).

In this case only the transmission window is show as provided. Changes in filter thickness and reflection factor are not considered.

CASE 2

The filter data itself are provided as list element containing a matrix or data.frame and additional information on the thickness of the filter, e.g., list(filter1 = list(filter_matrix, d = 2)). The given filter data are always considered as standard input and the filter thickness value is taken into account by

[REMOVE_ME]Transmission=Transmission(d)[REMOVEME2] Transmission = Transmission^(d) [REMOVE_ME_2]

with d given in the same dimension as the original filter data.

CASE 3

Same as CASE 2 but additionally a reflection factor P is provided, e.g., list(filter1 = list(filter_matrix, d = 2, P = 0.9)). The final transmission becomes:

[REMOVE_ME]Transmission=Transmission(d)P[REMOVEME2] Transmission = Transmission^(d) * P [REMOVE_ME_2]

Advanced plotting parameters

The following further non-common plotting parameters can be passed to the function:

‘Argument’‘Datatype’‘Description’
legendlogicalenable/disable legend
legend.poscharacterchange legend position ( graphics::legend )
legend.textcharactersame as the argument legend in ( graphics::legend )
net_transmission.colcolcolour of net transmission window polygon
net_transmission.col_linescolcolour of net transmission window polygon lines
net_transmission.densitynumericspecify line density in the transmission polygon
gridlistfull list of arguments that can be passed to the function graphics::grid

For further modifications standard additional R plot functions are recommend, e.g., the legend can be fully customised by disabling the standard legend and use the function graphics::legend

instead.

plot_FilterCombinations( filters, wavelength_range = 200:1000, show_net_transmission = TRUE, interactive = FALSE, plot = TRUE, ... )

Arguments

  • filters: list (required ): a named list of filter data for each filter to be shown. The filter data itself should be either provided as data.frame or matrix

    (see details for more options).

  • wavelength_range: numeric (with default): wavelength range used for the interpolation

  • show_net_transmission: logical (with default): show net transmission window as polygon.

  • interactive: logical (with default): enable/disable interactive plots.

  • plot: logical (with default): enable/disable the plot output.

  • ...: further arguments that can be passed to control the plot output. Supported are main, xlab, ylab, xlim, ylim, type, lty, lwd. For non common plotting parameters see the details section.

Returns

Returns an S4 object of type RLum.Results .

@data

‘Object’‘Type’ ‘Description’
net_transmission_windowmatrixthe resulting net transmission window
OD_totalmatrixthe total optical density
filter_matrixmatrixthe filter matrix used for plotting

@info

ObjectType Description
callcallthe original function call

Description

The function allows to plot transmission windows for different filters. Missing data for specific wavelengths are automatically interpolated for the given filter data using the function approx . With that a standardised output is reached and a net transmission window can be shown.

Calculations

Net transmission window

The net transmission window of two filters is approximated by

Tfinal=T1T2 T_{final} = T_{1} * T_{2}

Optical density

OD=log10(T) OD = -log10(T)

Total optical density

ODtotal=OD1+OD2 OD_{total} = OD_{1} + OD_{2}

Please consider using own calculations for more precise values.

How to provide input data?

CASE 1

The function expects that all filter values are either of type matrix or data.frame

with two columns. The first columns contains the wavelength, the second the relative transmission (but not in percentage, i.e. the maximum transmission can be only become 1).

In this case only the transmission window is show as provided. Changes in filter thickness and reflection factor are not considered.

CASE 2

The filter data itself are provided as list element containing a matrix or data.frame and additional information on the thickness of the filter, e.g., list(filter1 = list(filter_matrix, d = 2)). The given filter data are always considered as standard input and the filter thickness value is taken into account by

Transmission=Transmission(d) Transmission = Transmission^(d)

with d given in the same dimension as the original filter data.

CASE 3

Same as CASE 2 but additionally a reflection factor P is provided, e.g., list(filter1 = list(filter_matrix, d = 2, P = 0.9)). The final transmission becomes:

Transmission=Transmission(d)P Transmission = Transmission^(d) * P

Advanced plotting parameters

The following further non-common plotting parameters can be passed to the function:

‘Argument’‘Datatype’‘Description’
legendlogicalenable/disable legend
legend.poscharacterchange legend position ( graphics::legend )
legend.textcharactersame as the argument legend in ( graphics::legend )
net_transmission.colcolcolour of net transmission window polygon
net_transmission.col_linescolcolour of net transmission window polygon lines
net_transmission.densitynumericspecify line density in the transmission polygon
gridlistfull list of arguments that can be passed to the function graphics::grid

For further modifications standard additional R plot functions are recommend, e.g., the legend can be fully customised by disabling the standard legend and use the function graphics::legend

instead.

Function version

0.3.2

Examples

## (For legal reasons no real filter data are provided) ## Create filter sets filter1 <- density(rnorm(100, mean = 450, sd = 20)) filter1 <- matrix(c(filter1$x, filter1$y/max(filter1$y)), ncol = 2) filter2 <- matrix(c(200:799,rep(c(0,0.8,0),each = 200)), ncol = 2) ## Example 1 (standard) plot_FilterCombinations(filters = list(filter1, filter2)) ## Example 2 (with d and P value and name for filter 2) results <- plot_FilterCombinations( filters = list(filter_1 = filter1, Rectangle = list(filter2, d = 2, P = 0.6))) results ## Example 3 show optical density plot(results$OD_total) ## Not run: ##Example 4 ##show the filters using the interactive mode plot_FilterCombinations(filters = list(filter1, filter2), interactive = TRUE) ## End(Not run)

See Also

RLum.Results , approx

Author(s)

Sebastian Kreutzer, Institute of Geography, Heidelberg University (Germany) , RLum Developer Team

How to cite

Kreutzer, S., 2025. plot_FilterCombinations(): Plot filter combinations along with the (optional) net transmission window. Function version 0.3.2. In: Kreutzer, S., Burow, C., Dietze, M., Fuchs, M.C., Schmidt, C., Fischer, M., Friedrich, J., Mercier, N., Philippe, A., Riedesel, S., Autzen, M., Mittelstrass, D., Gray, H.J., Galharret, J., Colombo, M., Steinbuch, L., Boer, A.d., 2025. Luminescence: Comprehensive Luminescence Dating Data Analysis. R package version 1.0.1. https://r-lum.github.io/Luminescence/

  • Maintainer: Sebastian Kreutzer
  • License: GPL-3
  • Last published: 2025-03-07