How unixpenguin/opticsbox works
OpticsBox is a browser-based photonic-circuit simulator, with a parallel Python library for the same transfer-matrix physics. The main workflow is to assemble and configure a circuit, calculate its matrices and output behavior, then inspect or export results. The README documents the browser features, but the HTML source was not sampled, so relationships for that implementation are based on those documented capabilities; the Python excerpt shows its component and circuit APIs.
Main entry points: index.html Circuit solver · opticsbox.py Python Circuit
Components 17
Browser simulator
- Circuit editor
index.html - Parameters and inputs
index.html
Simulation physics
- Component library
index.html - Transfer matrices
index.html - Circuit solver
index.html
Analysis and export
- Spectrum sweep
index.html - Port results
index.html - Field probe
index.html - Matrices tab
index.html - Reference tab
index.html - CSV export
index.html - Python export
index.html - Circuit sharing
index.html
Python library
- Python components
opticsbox.py - Python Circuit
opticsbox.py - Python sweep
opticsbox.py
Other components
- Circuit designer
Connections 16
- Circuit designer → Circuit editor: builds circuit
README.md - Circuit designer → Parameters and inputs: sets inputs
README.md - Circuit editor → Component library: places components
README.md - Parameters and inputs → Circuit solver: configures model
README.md - Component library → Transfer matrices: defines matrices
README.md - Transfer matrices → Circuit solver: forms circuit matrix
README.md - Circuit solver → Port results: calculates ports
README.md - Circuit solver → Spectrum sweep: sweeps wavelengths
README.md - Circuit solver → Field probe: reports fields
README.md - Circuit solver → Matrices tab: provides matrices
README.md - Circuit designer → Reference tab: searches components
README.md - Spectrum sweep → CSV export: exports data
README.md - Circuit designer → Python export: requests export
README.md - Circuit designer → Circuit sharing: shares circuit
README.md - Python components → Python Circuit: adds to circuit
opticsbox.py - Python Circuit → Python sweep: sweeps wavelengths
opticsbox.py