Far-field cross-sections

mie(
  wavelength,
  epsilon,
  radius,
  medium = 1,
  nmax = ceiling(2 + max(x) + 4 * max(x)^(1/3)),
  efficiency = FALSE,
  mode = c("EM", "Magnetic", "Electric"),
  order = Inf
)

Arguments

wavelength

real vector

epsilon

complex vector

radius

scalar

medium

scalar, refractive index of surrounding medium

nmax

truncation order

efficiency

logical, scale by geometrical cross-sections

mode

type of mode

order

order of multipoles

Value

data.frame

Details

Homogeneous sphere illuminated by a plane wave

See also

Author

Baptiste Auguie

Examples

gold <- epsAu(seq(400, 800))
cross_sections <- with(gold, mie(wavelength, epsilon, radius=50, medium=1.33, efficiency=FALSE))
matplot(cross_sections$wavelength, cross_sections[, -1], type="l", lty=1,
        xlab=expression(lambda/mu*m), ylab=expression(sigma/mu*m^2))
legend("topright", names(cross_sections)[-1], col=1:3, lty=1)

gold <- epsAu(seq(200, 1500))
library(ggplot2)


params <- expand.grid(order = c(1, 2, Inf), mode = c("EM", "Magnetic", "Electric"), stringsAsFactors=FALSE)

all <- plyr::mdply(params, mie, wavelength=gold$wavelength, 
             epsilon=gold$epsilon, radius=80, medium=1.5,
            .progress="text")
#> 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |========                                                              |  11%
  |                                                                            
  |================                                                      |  22%
  |                                                                            
  |=======================                                               |  33%
  |                                                                            
  |===============================                                       |  44%
  |                                                                            
  |=======================================                               |  56%
  |                                                                            
  |===============================================                       |  67%
  |                                                                            
  |======================================================                |  78%
  |                                                                            
  |==============================================================        |  89%
  |                                                                            
  |======================================================================| 100%

m <- reshape2::melt(all, meas = c("extinction", "scattering", "absorption"))

ggplot(m) +
 facet_grid(mode~variable, scales="free") +
 geom_path(aes(wavelength, value, colour = factor(order))) +
 scale_linetype_manual(values = c(2, 3, 1)) +
 labs(x = expression(wavelength / nm),
      y = expression(sigma / nm^2),
      colour = "Mode",
      linetype = "Order")