Far-field cross-sections
real vector
complex vector
scalar
scalar, refractive index of surrounding medium
truncation order
logical, scale by geometrical cross-sections
type of mode
order of multipoles
data.frame
Homogeneous sphere illuminated by a plane wave
Other user:
mie-package
,
mie_approximation()
,
mie_bh()
,
mie_ml()
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")