Skip to content

MazinLab/HerriottCellCalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Herriott Cell Calculator

A static, client-side web calculator for designing Herriott and nested ("modified") Herriott optical delay lines. Enter your requirements — target delay, resolution, cell length, mirror diameter, wavelength, beam waist, reflectivity — and it solves for a feasible mirror geometry, draws the spot pattern and delay comb, and reports the full parameter set.

Runs entirely in the browser: vanilla HTML/CSS/ES modules, no build step, no dependencies, no server-side code. Deployable as-is on GitHub Pages.

Based on:

  • Ou et al., Optics Express 31(3), 4152 (2023)
  • Guo et al., APL Photonics 11, 026103 (2026)

Features

  • Two cell types — standard Herriott (one spherical-mirror pair, a single ring of spots) and nested / "modified" Herriott (concentric-ring patterns on dual-curvature mirrors).
  • Requirements-driven solver — give it max delay, resolution, cell length and mirror diameter; it searches the geometry (n, K, m, d) for a feasible, low-ring-count design, verifies it with an exact ray trace, and ranks alternatives you can click through.
  • Published presets — reproduce the source papers' exact geometries (OE 10 m and 100 m cells, APL 687 ns delay line) for validation.
  • Outer-ring placement control — auto-size the pattern to ≤ 90 % of the rim (leaving material to drill the exit hole), or override it by fill-% of the rim or by gap from the edge (the two are linked).
  • Both-mirror exit option — overlay the interleaved comb you would get with an exit hole in each mirror. This reaches a finer minimum increment (≈ one pass, d/c) but the comb is non-uniform; the reported design resolution stays the uniform single-mirror step (2n·d/c).
  • Live figures — spot pattern coloured by temporal order with the mirror rim, the radius-of-curvature seam, and the exit aperture marked; a face-on mirror schematic; the delay comb; and transmission vs. delay.
  • Delays are expressed as optical path length in metres throughout the UI.

Physics (in brief)

For a nested cell with n concentric rings and K angular "semi-ellipse" rotations of order m, the per-ring half-angle is θ = π/(2n) and the rotation angle is α = 2πm/K. The outer and inner radii of curvature R₁, R₂ follow from θ, α and the mirror separation d. The beam makes 2nK reflections in a closed orbit (nK spots per mirror). A single exit hole on one mirror's outer ring is reached every 2n reflections, so there are K selectable taps with

  • tap step / resolution2n·d/c
  • maximum delay2nK·d/c

Spot sizes use the matched-mode (1/e²) radius on the mirror to check overlap and rim clearance.

Run locally

The app uses native ES modules, so it must be served over HTTP — opening index.html directly via file:// fails the module CORS check in most browsers.

# from the repository root
python3 -m http.server 8000
# then open http://localhost:8000

Any static file server works (npx serve, php -S localhost:8000, etc.).

Tests

Pure-function physics, solver, presets, and render helpers are unit-tested with the Node test runner (no dependencies):

npm test        # → node --test

Requires Node 18+ (developed on Node 25).

Deploy to GitHub Pages

The site is static and lives at the repository root, so no build is needed:

  1. Push to GitHub.
  2. Settings → Pages → Build and deployment → Deploy from a branch.
  3. Choose main and / (root), save.

It will be served at https://<user>.github.io/<repo>/.

Project layout

index.html        markup + two-column instrument layout
css/styles.css    LCARS-inspired theme
js/physics.js     geometry, ABCD propagation, spot size, delay comb (pure functions)
js/solver.js      requirements → ranked, ray-trace-verified candidate geometries
js/render.js      canvas spot pattern / comb / transmission plots + SVG schematic
js/presets.js     published reference designs
js/ui.js          DOM wiring (no framework)
test/             node --test unit tests

References & attribution

The geometry and validation cases come from:

  • Ou et al., Optics Express 31(3), 4152–4167 (2023).
  • Guo et al., APL Photonics 11, 026103 (2026).

The source-paper PDFs are copyrighted and are not included in this repository (they are git-ignored). Please obtain them from the publishers.

The interface theme is an LCARS-inspired homage and is not affiliated with any rights holder.

License

Released under the BSD 3-Clause License — see LICENSE.

About

Modified Herriott Cell Calculator for Optical Delay Line Design

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors