Skip to main content

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' but page='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

How to get page name

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

refractiveindex-0.0.7.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

refractiveindex-0.0.7-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file refractiveindex-0.0.7.tar.gz.

File metadata

  • Download URL: refractiveindex-0.0.7.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.3 Linux/6.14.6-200.fc41.x86_64

File hashes

Hashes for refractiveindex-0.0.7.tar.gz
Algorithm Hash digest
SHA256 d383f86bf1549123447fafe34591d75a1aaf454af01f1b4746601dfe7b5ada2e
MD5 54b041127e0e6916483f6ec3d18165da
BLAKE2b-256 2ff62e9035bde7785afd958f909de0c77582ff07eadd95f8c88d51f6fae0cbb5

See more details on using hashes here.

File details

Details for the file refractiveindex-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: refractiveindex-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.3 Linux/6.14.6-200.fc41.x86_64

File hashes

Hashes for refractiveindex-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8f5d980bddf77f311b0ee4e5d6ef137d9bc9ca39fb4aa4bf47d80c4c35841985
MD5 c3f165d8354be93c45bbe8d4c80a0651
BLAKE2b-256 2f95ba6b04da731924da7e32637f9b73fe86e121a537f31a202814ba78ab27d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page