Skip to content

Releases: DCC-Lab/RayTracing

v1.4.7

16 Apr 16:04
af16300

Choose a tag to compare

- 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

16 Apr 02:51

Choose a tag to compare

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

15 Apr 04:57
fc15667

Choose a tag to compare

- 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

15 Apr 04:40

Choose a tag to compare

- Remove the Conjugation box (object/image popup menus) from the GUI
  until the backend dispatch logic on ImagingPath is wired up

v1.4.3

15 Apr 04:33
f984bf1

Choose a tag to compare

- 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

15 Apr 04:17
ff14f08

Choose a tag to compare

- Fix PyInstaller bundle missing PIL.ImageDraw / PIL.ImageTk (#500)

v1.4.0 — GPU-accelerated ray tracing with OpenCL

01 Mar 02:31
48b40df

Choose a tag to compare

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 found
  • traceManyOpenCL() provides direct GPU access with clear error messages if pyopencl is missing
  • traceManyNative() is the explicit CPU-only path

Compact ray storage for GPU transfer

  • CompactRays: flat numpy structured array (24 bytes/ray) for efficient CPU↔GPU transfer
  • CompactRay: lightweight view into the shared buffer with the same API as Ray
  • Vectorized yValues/thetaValues properties (~100x faster than iteration)
  • Vectorized fillWithRandomUniform() (~85x faster than Python loop)

New trace result classes

  • RayTrace / RayTraces: unified interface for trace results with lastRay / lastRays properties
  • CompactRaytrace / CompactRaytraces: GPU-optimized equivalents

Other improvements

  • Graceful handling of missing pyopencl, tkinter, and mytk dependencies
  • Thorlabs lens catalog merged and consolidated (thorlabs.py)
  • Fixed ABCD matrix multiplication bug in OpenCL kernel
  • Fixed maxCount bug and duplicate entry ray in MatrixGroup.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 pyopencl

Quick 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

1.3.13

30 Mar 16:05

Choose a tag to compare

1.3.11

02 Feb 21:08
120b6c4

Choose a tag to compare

  • Hundreds of new lenses thanks to Alex Tchung
  • Small modifications to allow integration in Tkinter (coming soon!)

1.3.10 Minor bug fixes

30 Jan 20:03

Choose a tag to compare

What's Changed

Full Changelog: 1.3.9...1.3.10