by Scott Prahl
July 2018
Inverse Adding-Doubling is a command-line program that determines the intrinsic optical properties of a flat scattering and absoption sample using measurements of the total reflection and transmission. Basically, optical properties are repeatedly guessed until the calculated reflection and transmission match the measured values.
This package provides two executables ad
and iad
. The first does a forward adding-doubling calculation (i.e., given the albedo, optical thickness, and anisotropy it returns the total reflection and transmission). The second
does the reverse.
This program Prahl et al., Applied Optics, 32, 559-568, 1993 uses the Adding-Doubling method of van de Hulst Multiple Light Scattering, Academic Press, 1978. I extended the Adding-Doubling method to account for Fresnel reflection at boundaries as well as corrections that must accompany integrating sphere experiments.
Finally, integrating spheres do not always collect all the light that exits from the front or back surface of a sample. Since this is impossible to account for the 1D adding-doubling technique, a Monte Carlo simulation is included in the inverse calculation.
Details about using the program are documented in the accompanying manual.
In principle, in a unix environment you should be able to just type
make install
to create and install executable versions of the ad
and iad
programs. See
INSTALL.md for more details. Then run
iad test/basic-A.rxt
to translate the reflection and transmission measurements to optical properties in the generated file test/basic-A.txt
For Windows, there are executable binaries
ad.exe
andiad.exe
compiled using MinGW-w64. These apps can be run using theCommand Prompt
applicationcmd.exe
. These binaries are packaged in a separateiad-win
distributions on github or omlc.
This is located in the doc/
directory.
Once you have installed the shared library (.dylib
under macOS) or (.so
under linux) then you can install python bindings
pip install iadpython
then in Jupyter
import numpy as np
import matplotlib.pyplot as plt
import iadpython as iad
g = np.linspace(0.5,0.8,50)
plt.plot(g, iad.rt(1,1,0.5,1.0,g))
plt.show()
Edit the Makefile
to select the right type of shared library for your platform
make install-lib
If you have Mathematica, then (and only if you have installed the right tools and edited the Makefile for your platform) and have the libraries installed then you should be able to type
make mma
make install mma
and then load the iad module and then type
Plot[UR1[0.5,1.0,g], {g,0.5,0.8}]
in Mathematica to get a graph. Very cool.
Scott Prahl