No project description provided
Project description
Easy Python interface to RefractiveIndex database
The original database
https://github.com/polyanskiy/refractiveindex.info-database
Database files parsing was made with a modified version of refractiveIndex.py
from PyTMM project by Pavel Dmitriev.
Installation
pip install refractiveindex
Usage
from refractiveindex import RefractiveIndexMaterial
SiO = RefractiveIndexMaterial(shelf='main', book='SiO', page='Hass')
wavelength_nm = 600 # [nm]
SiO.get_epsilon(wavelength_nm)
# (3.8633404437869827+0.003931076923076923j)
SiO.get_refractive_index(wavelength_nm)
# (1.96553846)
SiO.get_extinction_coefficient(wavelength_nm)
# (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
Simular projects for Julia
Julia interface to refractiveindex.info database
https://github.com/stillyslalom/RefractiveIndex.jl
Possible problems
Refractive index changed naming in its database, please upgrade the package
pip install --upgrade refractiveindex
and remove database folder at ~/.refractiveindex.info-database
.
The database is currently limited to dispersion and extinction ('n-k') data.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file refractiveindex-0.0.5.tar.gz
.
File metadata
- Download URL: refractiveindex-0.0.5.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.3 Linux/6.8.11-200.fc39.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a36def0afe16cf5a040cba2c1cdba5f78ed3b4d603a5a7a7686915540383ca14 |
|
MD5 | a776952c6ce7f92a051e6cfe2ca98a84 |
|
BLAKE2b-256 | ee087fcd39df89437f3d9f7e0e5c38f7ee6164dba9c1c2453a01f5cdcdf64f45 |
File details
Details for the file refractiveindex-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: refractiveindex-0.0.5-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.3 Linux/6.8.11-200.fc39.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2283a623376f88652adc7c20ba59e3b147d8a0e092eac6ba5bff2ee1fad97b5 |
|
MD5 | 50bf88f866acf1b579c2f82d844091ee |
|
BLAKE2b-256 | 6f9f951976f29d2de7d928c3e9cdebcdb50fd0294ccd23c946f62df4550d807c |