[Git Download]

ricalcFigure: Complex refractive index for Toluene, computed from absorption measurements collected using Fourier-Transform Mid-Infrared Spectroscopy.


This tool can quickly compute the dispersion properties of a material, given some information about the absorption or refraction. For example, RI-Calc can be used to estimate the complex refractive index as a function of wavelength from an absorption spectrum.

Internally, all materials are stored as a list wavelengths and associated refractive indices. The complex refractive index is given as:

\hat{n}(\lambda) = n(\lambda) + ik(\lambda)

where \lambda is the wavelength of the incident radiation, n is the effective refractive index, and k is the absorption coefficient.

Note that both n and k obey the Kramer's-Kronig relations, allowing one to be estimated using a measurement of the other. In this case, these values are computed using the following two equations:

A(\lambda) \approx -\frac{2 \pi}{n_0 \lambda} \chi^{\prime\prime}(\lambda) n(\lambda) \approx n_0 + \frac{\chi^{\prime}(\lambda)}{2n_0}

where A is the absorption (per unit thickness), n_0 is the baseline refractive index (\approx 1.4 for most materials). The real and imaginary components of the magnetic susceptibility

\chi(\lambda) = \chi^{\prime}(\lambda) + i \chi^{\prime\prime}(\lambda)

are related through the Hilbert transform, and the absorption coefficient

k = -\frac{A(\lambda)\lambda}{4 \pi}

can be computed from the absorption.


The only required argument is an input file specifying some material property as a function of wavelength:

>> ricalc etaToluene.txt

The format for the input file can be specified at the command line, however the default assumes columns with entries [wavelength absorbance], where the wavelength is given in microns. Other arguments can be used to provide additional information:

>> ricalc [INPUT] --input-format wavenumber,A --scale 10 --n0 1.48 --output-format wavenumber,n,k

takes an input file listing of absorbance measurements, in units of wavenumber (cm^{-1}), of a 10\mu m thick slab with a baseline refractive index of n \approx 1.48, and outputs the complex refractive index at each measured wavenumber.

A description of all available command-line arguments is given using:

>> ricalc --help

The only potentially time-consuming component of this algorithm is the Hilbert transform necessary to calculate \chi^{\prime} or \chi^{\prime\prime}. This is computed using the FFTW Fast Fourier Transform C++ package, which is adequate for most practical measurements composed of thousands of spectral samples.

However, if it were necessary to process a large number of spectra, either iteratively or from a large image, alternative approaches may be necessary. One possibility is the use of NVidia's CUFFT library. In addition, other approximations may be more accurate or efficient. Using an FFT to compute the Hilbert transform will produce measurable artifacts at the edges of the spectrum. This can be mitigated using the --padding argument, which essentially assumes that \chi \rightarrow 0 for values outside of the measured band.


I would like to thank Rohith Reddy and Suzanne Leslie for their help and patience with the mathematics. Physics FTW.