RII_Pandas (refractiveindex.info-pandas)
Python 3 + Pandas wrapper for the refractiveindex.info database developed by Mikhail Polyanskiy.
Pandas DataFrame creation was made with modified versions of dboperations.py from refractiveindex.info-sqlite package developed by Hugo Guillén.
Features
- Create Pandas DataFrame by parsing database files cloned from Polyanskiy's GitHub repository.
- Drude-Lorentz model (formula 21) and Brendel-Bormann model (formula 22) are available to describe metallic dielectric function.
Install
Install and update using pip
$ pip install -U riip
Install using conda
$ conda install -c mnishida riip
Usage
>>> import riip
>>> ri = riip.RiiDataFrame()
Polyanskiy's 'refractiveindex.info database' is cloned from GitHub repository, and three csv files, 'catalog.csv', 'raw_data.csv' and 'grid_data.csv' are created. They are located in 'data' folder under the installation directory. This process may take a few minutes, but it will happen only the first time you start it after installation.
>>> ri.search("Al") # search material contains the string
>>> ri.select(
"2.5 < n < 3 and 0.4 < wl < 0.8"
) # select materials that fullfill the condition
>>> print(ri.show([23, 118])) # show catalog
>>> print(ri.read(23)) # read the data book
>>> ri.references(23) # see references
>>> ri.plot(23, "n") # plot wavelength dependence of refractive index
>>> Al = ri.material(
{"book": "Al", "page": "Mathewson"}) # create material with book and page
>>> Al = ri.material({"id": 23}) # create material with id number
It may not be safe to use "id" in your application importing this package. The id number may be changed when an update is done on your local database.
>>> import numpy as np
>>> wls = np.linspace(0.5, 1.6) # wavelength from 0.5 μm to 1.6 μm
>>> Al.n(wls) # refractive index
>>> Al.k(wls) # extinction coefficient
>>> Al.eps(wls) # complex permittivity
For more information, see RII_Pandas User's Guide.
Update database
If refractiveindex.info database is updated, you can pull it to the local database by
>>> import riip
>>> ri = riip.RiiDataFrame()
>>> ri.update_db()
Uninstall
$ pip uninstall riip
or
$ conda uninstall riip
Dependencies
- python 3
- numpy
- scipy
- pandas
- pyyaml
- gitpython
Version
0.8.6
Metadata
Release files for riip 0.8.6
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 | |
|---|---|---|---|---|
| riip-0.8.6.tar.gz | 592.8 kB | Without provenance | Details |
Release files / riip-0.8.6.tar.gz
| Download URL | riip-0.8.6.tar.gz |
|---|---|
| Size | 592.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
868465022ce5293adec9639e3b17505f116bd30baa7bc70635c24bac632a49c4
|
|
BLAKE2b-256 checksum How to use checksums |
59ee718f2179d002e5be3c1eafff245ab9fa3fcee63026319bfd1e5cdd1b2166
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for riip 0.8.6
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.