Releases: DCC-Lab/RayTracing
Releases · DCC-Lab/RayTracing
v1.4.7
- Accept hyphens in element names: AC254-050-A and AC254_050_A are interchangeable in the GUI (#510) - Fix magnification gating: was gated on fieldOfView instead of isImaging — bare Lens(f=100) showed Inexistent for magnification despite it being -1.0 (#509) - Fix z-tracking for thick elements: get_path_from_ui didn't account for element thickness when computing Spaces, shifting the image plane for doublets (#509) - Guard RESULT_ROWS lambdas with try/except for transient states - macOS code signing and notarization in CI (when secrets are set)
v1.4.6
GUI: draw compound lenses, vendor catalogs, autocomplete, bug fixes - Draw AchromatDoubletLens and Objective in the GUI with native filled arcs (same anti-aliased primitive as thin-lens Oval). Crown and flint rendered as separate glass bodies with cement interface. Meniscus surfaces handled via white carve-outs painted before the adjacent convex body. - Import Thorlabs (~324), Edmund Optics (4), and Olympus (5) vendor catalog parts into the GUI module namespace. Type a part number like AC254_050_A in the Element column — no constructor args needed. - Auto-fill Properties with f=… / diameter=… after instantiation; auto-refreshes when Element changes. - Autocomplete popup for the Element column: filter-as-you-type listbox of ~350 class names, Down arrow to browse, Enter to commit. - Fix AttributeError on principal rays (#506). - Fix Copy script button for arbitrary elements (#507). - Fix SyntaxError cascade from ? placeholders in Properties. - Rim-aligned aperture marks (chord-to-chord, not vertex-to-vertex).
v1.4.5
- Internal cleanup of raytracing_app.py (no behavior change): remove dead code, extract element-drawer dispatch + aperture-marks helper, reshape results table as a data spec, split widget construction into per-section helpers (#502)
v1.4.4
- Remove the Conjugation box (object/image popup menus) from the GUI until the backend dispatch logic on ImagingPath is wired up
v1.4.3
- Move PyPI publish into the build-app workflow so a tag push produces bundles, a GitHub Release, and a PyPI upload in one chain (#501) - Bundle the standalone app with Python 3.12 to avoid a Tk UI quirk on macOS Sonoma (#501)
v1.4.2
- Fix PyInstaller bundle missing PIL.ImageDraw / PIL.ImageTk (#500)
v1.4.0 — GPU-accelerated ray tracing with OpenCL
What's New in v1.4.0
GPU-accelerated ray tracing with OpenCL
Trace 100k–1M+ rays through optical systems with 10–100x speedup using your GPU.
traceMany()automatically uses the GPU when available, and silently falls back to native Python if OpenCL is not installed or no GPU is foundtraceManyOpenCL()provides direct GPU access with clear error messages if pyopencl is missingtraceManyNative()is the explicit CPU-only path
Compact ray storage for GPU transfer
CompactRays: flat numpy structured array (24 bytes/ray) for efficient CPU↔GPU transferCompactRay: lightweight view into the shared buffer with the same API asRay- Vectorized
yValues/thetaValuesproperties (~100x faster than iteration) - Vectorized
fillWithRandomUniform()(~85x faster than Python loop)
New trace result classes
RayTrace/RayTraces: unified interface for trace results withlastRay/lastRayspropertiesCompactRaytrace/CompactRaytraces: GPU-optimized equivalents
Other improvements
- Graceful handling of missing
pyopencl,tkinter, andmytkdependencies - Thorlabs lens catalog merged and consolidated (
thorlabs.py) - Fixed ABCD matrix multiplication bug in OpenCL kernel
- Fixed
maxCountbug and duplicate entry ray inMatrixGroup.trace() - Added Sphinx documentation for OpenCL at raytracing.readthedocs.io
- 675 tests passing
Installation
pip install raytracing==1.4.0
# Optional: for GPU acceleration
pip install pyopenclQuick example
from raytracing import *
path = ImagingPath()
path.append(Space(d=50))
path.append(Lens(f=50, diameter=25))
path.append(Space(d=120))
rays = CompactRays(100000)
rays.fillWithRandomUniform(-10, 10, -0.1, 0.1)
traces = path.traceMany(rays) # Uses GPU if available