Skip to main content

A python interface to the refractiveindex.info database.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

A python interface to refractiveindex.info

Continuous integration PyPI version

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' 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

Related projects

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

refractiveindex2-0.1.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

refractiveindex2-0.1.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file refractiveindex2-0.1.1.tar.gz.

File metadata

  • Download URL: refractiveindex2-0.1.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for refractiveindex2-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dad4c00f19e22166df0b4b9c2208279011b6a29b17503e4719a5a9c163ac2979
MD5 7c72e1d2277f9e75ac1bedafeaf609ce
BLAKE2b-256 c7ecc4df0e7b746b5f20bc301246b8c0cbccd23bdb8032beb52f9b592f3399c5

See more details on using hashes here.

File details

Details for the file refractiveindex2-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for refractiveindex2-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cb08d1205542698f03c504a3724ac5bab011add8b8241e3882ab5cf3f2510276
MD5 0a9d2fa6892f4b6b5400879ba2699d1e
BLAKE2b-256 90da4d3f2a416de1b987a827ee1c16b2e356907efaa51378711adf66e37a8099

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