Examples Gallery#
Welcome to the PyOptik Examples Gallery. Here you will find a collection of examples that demonstrate the versatility and power of PyOptik. These examples range from simple introductory use cases to more advanced, application-specific tutorials.
The gallery includes:
Basic API Usage: Learn how to get started with PyOptik, covering fundamental operations and core functionalities of the library.
Application Tutorials: Follow step-by-step guides that show how PyOptik can be used in practical, real-world scenarios, such as:
Simulating Optical Properties: Understand how to simulate the optical properties of various materials, including refractive index and absorption characteristics.
Fiber Optic Analysis: See how PyOptik can be utilized for fiber optics simulations, providing insights into light propagation and mode analysis.
Biomedical Imaging Applications: Discover how PyOptik can be leveraged for imaging purposes, including applications in biomedical optics.
These examples are designed to help users at all levels, whether you are a beginner learning how to use the basic API or an experienced user looking for guidance on more advanced use cases.
Explore the gallery and unlock the potential of PyOptik for your optical simulations and research!
Examples: Sellmeier Material#
This folder contains examples that demonstrate how to use the SellmeierMaterial class from the PyOptik library. These examples illustrate the practical applications of modeling materials using the Sellmeier equation, which is commonly used in optical design to determine the refractive index of various materials.
Contents#
Basic Sellmeier Calculation: Shows how to instantiate the SellmeierMaterial class and calculate the refractive index for different wavelengths.
Plotting Refractive Index: Demonstrates how to visualize the refractive index as a function of wavelength using the plot method.
Application Example: Provides an example of how to use the Sellmeier model in a more advanced optical simulation or analysis.
Usage#
To run these examples, make sure you have installed all required dependencies as outlined in the main PyOptik README. Navigate to this folder and execute the Python scripts as follows:

Plot the Refractive Index of Optical Material: BK7

Plot the Refractive Index of Optical Material: Silica

Plot the Refractive Index of Optical Material: Water
Examples: Tabulated Material#
This folder contains examples demonstrating how to use the TabulatedMaterial class from the PyOptik library. These examples illustrate the practical applications of working with tabulated refractive index and absorption data, which is useful for analyzing materials based on empirical measurements.
Contents#
Basic Tabulated Material Usage: Shows how to create an instance of the TabulatedMaterial class and access the refractive index and absorption values.
Interpolating Refractive Index: Demonstrates how to interpolate the refractive index and absorption values for a given range of wavelengths.
Visualization Example: Provides an example of plotting the refractive index and absorption over a range of wavelengths using the plot method.

Plot the Refractive Index of Optical Material: SF5

Plot the Refractive Index of Optical Material: Silver
Examples: Utility Functions#
This folder contains examples demonstrating the various utility functions provided by the PyOptik.utils module. These utilities are designed to facilitate common tasks such as managing directories, downloading necessary data, and creating custom material definitions. The examples provided here aim to help you leverage these utilities effectively in your workflows.

sphx_glr_gallery_utils_build_library.py

sphx_glr_gallery_utils_download_yml_file.py