| Badge | Status |
|---|---|
| Python versions | |
| Documentation | |
| Tests | |
| PyPI | |
| Conda |
A package for refractive index values.
Select a measured optical dataset or dispersion model, then evaluate refractive index over a wavelength range. Use wavelength quantities with explicit units, check the source validity range, and cite the dataset used in your calculation.
See the usage guide for further examples and implementation details.
Requires Python >=3.10.
$ python -m pip install PyOptikInstall from the martinpdes Conda channel:
$ conda install -c martinpdes pyoptikFor an editable source installation:
$ git clone https://github.com/MartinPdeS/PyOptik.git
$ cd PyOptik
$ python -m pip install -e ."""
Plot the Refractive Index of Optical Material: Silica
=====================================================
This module demonstrates the usage of the PyOptik library to calculate and plot the refractive index of the optical material Silica glass over a specified range of wavelengths.
"""
# %%
from TypedUnit import ureg
from PyOptik import MaterialCatalog
# Initialize the material with the Sellmeier model
catalog = MaterialCatalog.from_snapshot()
material = catalog.get("main/SiO2/Malitson").load()
# Calculate refractive index at specific wavelengths
RI = material.compute_refractive_index(wavelength=[1310, 1550] * ureg.nanometer)
# Display calculated refractive indices at sample wavelengths
material.plot()Use the PyOptik documentation to work through examples and look up the inputs and return values of individual functions.
Bug reports, worked examples, and documentation corrections are welcome. To set up a development checkout and run the tests, follow the contributing guide.
For questions, contact Martin Poinsinet de Sivry-Houle.
See the PyOptik license for terms of use.

