UltrafastEngine

UltrafastEngine

Nonlinear ultrafast pulse propagation through complete optical systems — stretchers and compressors, amplifiers, multipass cells, interferometers, crystals, plates, gas cells, mirrors and coatings, with some support for single-mode fibre. Built for table-top, open-air optics.

UltrafastEngine answers what does my pulse look like after this system? — spectrum, temporal profile, chirp, energy and losses, B-integral, contrast, fluence against damage thresholds, polarisation, beam size — and shows it the way laboratory instruments would: spectrometer, autocorrelator, FROG, d-scan, photodiode, cross-correlator, polarimeter, camera, each with its own resolution and detector.

 OpticStudio ──(zemax plugin)──┐
                               v
 hand-written / Python ──> system file (.ufs) ──┐
                           run spec (.json)  ───┴──> UltrafastEngine.Core ──> results: summary.json, result.npz, CSV,
                                                     (C#, no dependencies)      instruments, loss budget, provenance
                                                       ^      ^      ^
                                                CLI   Python  C API (C/C++)  .NET

In short

  • One engine, every interface. A C# library with no dependencies (.NET 10 and .NET Framework 4.8), used from the command line, from Python in-process, from C/C++ through a C API, and from any .NET language. System files run unchanged on Windows, macOS and Linux.
  • Physics of the whole chain. Exact linear optics (materials, coatings, gratings, polarisation, losses), Kerr and Raman nonlinearity, fibres, gases with rotational Raman and ionisation, χ(2) crystals, gain media and oscillators, spatial models up to UPPE, beam splitters and interferometers (Branched systems), delayed light (ghosts, echoes) — see Capabilities and limitations.
  • Everything is a replaceable model. Indices, n², Raman responses, beam sizes, coatings, filters, gain media and time-domain responses can be data, expressions or your own functions, set per material, per element or globally from the run spec (Models and overrides).
  • Instruments, not just fields. Every result can be read through a modelled device, with its resolution, sampling and detector.
  • From the design to your lab (fitting plugin): transform elements fitted to your recordings make the model reproduce the real system and carry that to new inputs; a measured output field can be propagated back to the input.
  • Plugins. Element types, instruments, models, run modes, retrieval algorithms, compute back-ends and commands can be added without touching the core (Plugin system).
  • Self-describing options. Every key has a declared type, unit and default: JSON Schemas give editor completion, typos are reported with suggestions, Python gets TypedDicts (Option reference).

Where to go next

I want to... Read
install and build Install and build, then Getting started
learn step by step Tutorials
see what is modelled and what is not Capabilities and limitations
understand the model and conventions Concepts, Model levels
describe a system / a run System file, Run spec
change physics without code Models and overrides
fibres and supercontinuum Fibres
frequency conversion, OPA / OPCPA Crystals
time-bandwidth product, transform limit Pulse calculator
amplifiers and lasers Gain media, Oscillators
diffraction, self-focusing, filaments Spatial models, Ionisation
splitters, interferometers, loops Branched systems
ghosts, echoes, scatter, ring-down Delayed light
model my instruments, compare with measurements Instruments, Measured data
fit the model to my lab, reuse it on new inputs, propagate backward Fitting plugin, example 26
install or check plugins Installing plugins
scan, optimise, retrieve a pulse Studies, Pulse retrieval
plug in my own function or element Extending, Python, C API
export from OpticStudio Zemax plugin
check the validation Testing and validation, paper replications
see what is planned Roadmap
drive it from an AI agent For AI agents
cite it, licence, contact the README: BibTeX, Apache-2.0 and NOTICE, jac318@bath.ac.uk