This repo is based on the refractiveindex repo by Ivan Toftul, which itself is based on the refractiveindex.py module from the PyTMM project by Pavel Dmitriev. It provides a python interface to the refractiveindex.info database by Mikhail Polyanskiy.
Compared to other interfaces to the database, refractiveindex2 implements additional formulas required by some materials in the database and is rewritten to have a simpler class structure. It also includes extensive tests for all materials in the database.
pip install refractiveindex2
import refractiveindex2 as ri
SiO = ri.RefractiveIndexMaterial(shelf="main", book="SiO", page="Hass")
wavelength_um = 0.6 # [microns]
SiO.get_epsilon(wavelength_um=wavelength_um)
# (3.8633404437869827 + 0.003931076923076923j)
SiO.get_refractive_index(wavelength_um=wavelength_um)
# (1.96553846)
SiO.get_extinction_coefficient(wavelength_um=wavelength_um)
# (0.001)Notes:
- here the time dependence is assumed to be
$\mathrm{e}^{-\mathrm{i} \omega t}$ , so$\mathrm{Im}(\varepsilon) > 0$ is responsible for the losses. - if there is a space in the name, one should write underscore instead of it, i.e. not
page='Rodriguez-de Marcos'butpage='Rodriguez-de_Marcos'.
You can find the proper “page” name by hovering your cursor on the link in the Data section
Or you can look up folders in this repository
https://github.com/polyanskiy/refractiveindex.info-database
