Skip to main content

pyOpTools

pyOpTools is an open-source Python and Cython library for simulating optical systems using 3D non-sequential ray tracing, component modeling, and wavefront calculations.

Originally developed by the technological development team at Combustión Ingenieros S.A.S. and Colombian Imaging Technologies S.A.S..


Features

  • 3D Ray Tracing: Fast 3D non-sequential ray tracing with Eigen-accelerated coordinate transformations and intersection solvers.
  • Optical Component Library: Spherical lenses, aspheric lenses, prisms, mirrors, apertures, stops, detectors, and compound optical systems.
  • Vendor Catalogs: Built-in access to commercial optics catalogs (Thorlabs, Edmund Optics).
  • Wavefront Propagation & Diffraction: Rayleigh-Sommerfeld, Angular Spectrum, and Fractional Fourier Transform methods.
  • Interactive Visualization: 3D interactive system visualization in JupyterLab and Marimo using Plotly and WebGL.

Installation

pyOpTools requires Python 3.10+.

# Add to an existing uv project:
uv add pyoptools

# Or install in your virtual environment:
uv pip install pyoptools

Using pip

pip install pyoptools

Quickstart

Here is a simple example showing how to build an optical system with a spherical lens and trace a ray:

from pyoptools.raytrace.comp_lib import SphericalLens
from pyoptools.raytrace.ray import Ray
from pyoptools.raytrace.system import System

# 1. Define optical components
lens = SphericalLens(
    radius=25.0,
    thickness=5.0,
    curvature_s1=1.0 / 100.0,
    curvature_s2=-1.0 / 100.0,
    material=1.5168,
)

# 2. Assemble the optical system
system = System(complist=[(lens, (0, 0, 50), (0, 0, 0))], n=1.0)

# 3. Define an incident ray and propagate
ray = Ray(origin=(0, 10, 0), direction=(0, 0, 1), wavelength=0.589)
system.ray_add(ray)
system.propagate()

# 4. Inspect traced ray and component hits
final_rays = ray.get_final_rays()
print("Final ray direction:", final_rays[0].direction)
print("Impacts on lens:", len(lens.hit_list))

Documentation

Comprehensive documentation, tutorials, and API reference are available at: https://pyoptools.readthedocs.io/


Contributing & Development

We welcome contributions! Please see:

  • CONTRIBUTING.md for developer setup, testing, and pull request guidelines.
  • AGENTS.md for automated agent and internal architectural guidelines.

To set up a local development environment:

git clone https://github.com/cihologramas/pyoptools.git
cd pyoptools
uv sync
uv run python setup.py build_ext --inplace
uv run pytest

Metadata

Release files for pyoptools 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pyoptools 0.4.1
File
pyoptools-0.4.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
pyoptools-0.4.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
pyoptools-0.4.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
pyoptools-0.4.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pyoptools-0.4.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
pyoptools-0.4.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
pyoptools-0.4.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
pyoptools-0.4.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
pyoptools-0.4.1-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
pyoptools-0.4.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
pyoptools-0.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
pyoptools-0.4.1-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 234.6 MB

Release files / pyoptools-0.4.1-cp313-cp313-win_amd64.whl

Download URL pyoptools-0.4.1-cp313-cp313-win_amd64.whl
Size 14.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
93e75a62f7dc58cb98c33c51f8d09058d72c06e615d590c9ffbc2cdff7605385
BLAKE2b-256 checksum
How to use checksums
c478831b69bd5cabdea288e778a84c25c9d9353ba7aadda704856484f7566b29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyoptools-0.4.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL pyoptools-0.4.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 29.6 MB
Tags CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
33826ff0e109009e8ec434b2ef4446960eeded7fe8f4ce798bfb719c83f2a16d
BLAKE2b-256 checksum
How to use checksums
4211d57f2a16004559d163e5989278d1aa5899285594b568b02eafae010a970a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyoptools-0.4.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL pyoptools-0.4.1-cp313-cp313-macosx_11_0_arm64.whl
Size 14.8 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e8b257deadbce65da972e7093d38256220868ee65750115c1ec353afa8f2c29d
BLAKE2b-256 checksum
How to use checksums
e44faf21388085edec670895a21e2e763fa119d6819455895dbd34b38e34d141
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyoptools-0.4.1-cp312-cp312-win_amd64.whl

Download URL pyoptools-0.4.1-cp312-cp312-win_amd64.whl
Size 14.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
f28b0b5383c8a66e28b01d921daef95d800b035013d56897aea6927ba95a1ed5
BLAKE2b-256 checksum
How to use checksums
de2c1df98a4d082102329ee981340ac52823ff1f6276f2f7c240bfa5c269375e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyoptools-0.4.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL pyoptools-0.4.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 29.8 MB
Tags CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e13752a4756347cf89cb779fddf6e2e3d999d7b0ff75d9ea25806e12069380f7
BLAKE2b-256 checksum
How to use checksums
820d05f1cd7f70099f11ec40aef378511b82b3b477c3a762b895f035f0de7997
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyoptools-0.4.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL pyoptools-0.4.1-cp312-cp312-macosx_11_0_arm64.whl
Size 14.8 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8d9e4a5c07f91f4d9bb9b98ee651d0ff4aaf014e5aea58532a18509cb44295f8
BLAKE2b-256 checksum
How to use checksums
46f4cd7079eae89f4e9331fece0748526c76d6713d4c92adaca6016966a21b9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyoptools-0.4.1-cp311-cp311-win_amd64.whl

Download URL pyoptools-0.4.1-cp311-cp311-win_amd64.whl
Size 14.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
9709029968c153d4d37c8ce1fdb53790a18747ad934cafaab28673452041befa
BLAKE2b-256 checksum
How to use checksums
2348796918a3c7acfbfacd666cc6142debd71300a89a269ce44e6157f3d1721e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyoptools-0.4.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL pyoptools-0.4.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 29.6 MB
Tags CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
bc1cf99f39922414b7cfafb1cc8d7e0773a189b98e11dafda49bb348417d44d3
BLAKE2b-256 checksum
How to use checksums
15953a47d9a61263b30c2a7947827177cd4d761f6e979831a49efec94a7e7211
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyoptools-0.4.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL pyoptools-0.4.1-cp311-cp311-macosx_11_0_arm64.whl
Size 14.8 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
569cf99c7c72433a468b953dee77e0e13090728f677af4770ca4708b97fbf623
BLAKE2b-256 checksum
How to use checksums
bfda3a08ceecc256fe069668cae701d4831c853bb980fdbebad734aceab9874b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyoptools-0.4.1-cp310-cp310-win_amd64.whl

Download URL pyoptools-0.4.1-cp310-cp310-win_amd64.whl
Size 14.4 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
f80f9e42b015a04189743e998a509dd213cd651bfce28f0127e9bac08bae7c87
BLAKE2b-256 checksum
How to use checksums
91bb24b966fd3ed6b24cc08a6d65b47d19b683bdd86e338aeef662ae4ecdce6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyoptools-0.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyoptools-0.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 27.8 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
e7355f646079b62c671892672746f3eb8632d4ad4843456e181eb1ec04fd2322
BLAKE2b-256 checksum
How to use checksums
a8b77694bcf358b0dd5c49763e0c8f7f2917da30ea0cc28b559544a91241555d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pyoptools-0.4.1-cp310-cp310-macosx_11_0_arm64.whl

Download URL pyoptools-0.4.1-cp310-cp310-macosx_11_0_arm64.whl
Size 14.8 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e7483c28786dd5c4a93d86d0de7e969dc7e75d0553c489f5daff94e962f90450
BLAKE2b-256 checksum
How to use checksums
561bca82a15c22556ef3f7248cad98f0594f5fd351779b2f57d9a49703dfd403
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.4.1 This release

12 release files

0.4.0

12 release files

0.3.8

12 release files

0.3.7

12 release files

0.3.6

12 release files

0.3.5

12 release files

0.3.4

12 release files

0.3.3

12 release files

0.3.2

12 release files

0.3.1

12 release files

0.3.0

12 release files

0.2.6

12 release files

0.2.5

12 release files

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page