wavelength_scan: Spectra calculation at a fixed angle

Description Usage Arguments Details Value References Examples

View source: R/wavelength_scan.R

Description

Function to calculate the reflectivity, transmission and absorption as a function of wavelength for a given multilayer film.

Usage

1
2
3
4
5
6
7
8
9
wavelength_scan(
  layers,
  wavelengths = seq(3.5e-07, 8.5e-07, length.out = 500),
  angle = 0,
  polarisation = "p",
  incident_medium.index = complex(real = 1, imaginary = 0),
  exit_medium.index = complex(real = 1, imaginary = 0),
  show.progress = F
)

Arguments

layers

A list object containing the stack parameters. Must include index, thickness and (optionally) repetitions. See details and examples for more information.

wavelengths

The wavelength range of the calculated spectra, in meters. The default covers the visible range from 350 nm to 850 nm.

angle

Fixed angle in degrees. Default is 0.

polarisation

Linear polarisation of the light. Acceptable arguments are 'p' (Transverse Magnetic) or 's' (Transverse Electric).

incident_medium.index

The global incident medium. Default is n=1+0i (air)

exit_medium.index

The global exit medium. Default is n=1+0i (air)

show.progress

Determine if a progress bar is to be printed to console

Details

The layers list should be constructed like so:

layers <- list(index = ..., thickness = ..., repetitions = ...)

where index and thickness are vectors containing the stack parameters in order from the top interface to the bottom. Repetitions is an integer repeating the stack.

Value

Returns a dataframe with the wavelength, Refelctivity, Transmission and Absorbtion

References

Introduction to Optics 3rd Edition, Pearson international edition by Frank L. Pedrotti, Leno Matthew Pedrotti, Leno S. Pedrotti

Examples

1
2
3
4
5
6
layers<-list(index=c(2.35+0i,1.38+0i),thickness=c(550e-9/(4*2.35),550e-9/(4*1.38)),repetitions=6)

R_highlowStack6<-wavelength_scan(incident_medium.index=1+0i,exit_medium.index=1.52+0i,layers=layers)

plot(R_highlowStack6$wavelength,R_highlowStack6$Reflection,type='l',lwd=2, ylim=c(0,1))
title("H/L index stack (N=6 & 2): Pedrotti Figure 22-9")

tjconstant/mlfilms documentation built on April 25, 2020, 3:24 p.m.