Skip to content
MartinPdeSPublic

About

Unit-aware Python toolkit for optical materials, refractive-index data, dispersion models, Fresnel interfaces, and thin-film stacks.

Topics

Resources

Contributing

Stars

9 stars

Watchers

1 watching

Forks

Repository files navigation

PyOptik

PyOptik logo

Badge Status
Python versions Supported Python versions
Documentation Documentation
Tests Tests Test coverage
PyPI PyPI version Monthly PyPI downloads
Conda Anaconda version Anaconda downloads Latest Anaconda release

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.

Installation

Requires Python >=3.10.

$ python -m pip install PyOptik

Install from the martinpdes Conda channel:

$ conda install -c martinpdes pyoptik

For an editable source installation:

$ git clone https://github.com/MartinPdeS/PyOptik.git
$ cd PyOptik
$ python -m pip install -e .

Calculate silica dispersion

"""
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()
https://raw.githubusercontent.com/MartinPdeS/PyOptik/HEAD/docs/source/_static/tutorials/silica_dispersion.png

Wavelength dependence of the silica refractive index.

Documentation

Use the PyOptik documentation to work through examples and look up the inputs and return values of individual functions.

Contributing

Bug reports, worked examples, and documentation corrections are welcome. To set up a development checkout and run the tests, follow the contributing guide.

Contact

For questions, contact Martin Poinsinet de Sivry-Houle.

License

See the PyOptik license for terms of use.

About

Unit-aware Python toolkit for optical materials, refractive-index data, dispersion models, Fresnel interfaces, and thin-film stacks.

Topics

Resources

Contributing

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages