This project has been archived by its maintainers, and is no longer receiving any updates.
A python interface to refractiveindex.info
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.
Installation
pip install refractiveindex2
Usage
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'.
How to get material page names
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
Related projects
Metadata
Release files for refractiveindex2 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| refractiveindex2-0.1.1.tar.gz | 10.1 kB | Without provenance | Details for refractiveindex2-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| refractiveindex2-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for refractiveindex2-0.1.1-py3-none-any.whl |
Total release size: 17.9 kB
Release files / refractiveindex2-0.1.1.tar.gz
| Download URL | refractiveindex2-0.1.1.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dad4c00f19e22166df0b4b9c2208279011b6a29b17503e4719a5a9c163ac2979
|
|
BLAKE2b-256 checksum How to use checksums |
c7ecc4df0e7b746b5f20bc301246b8c0cbccd23bdb8032beb52f9b592f3399c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / refractiveindex2-0.1.1-py3-none-any.whl
| Download URL | refractiveindex2-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cb08d1205542698f03c504a3724ac5bab011add8b8241e3882ab5cf3f2510276
|
|
BLAKE2b-256 checksum How to use checksums |
90da4d3f2a416de1b987a827ee1c16b2e356907efaa51378711adf66e37a8099
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for refractiveindex2 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.