Welcome to gtrace’s documentation!
gtrace traces Gaussian beams through an optical system laid out on a bench. You place mirrors and lenses in Python and trace the beams. You look at the result in gtrace’s viewer and move the elements until the layout is right. The viewer runs as a widget inside a Jupyter notebook, or as a standalone HTML page in a web browser. When the layout is finished, you export the drawing to DXF.
Install gtrace with:
pip install "gtrace[notebook]"
This command does not install Jupyter itself. If you do not have Jupyter:
pip install jupyterlab
Then read Introduction. That page builds a bench of a laser, a lens and two mirrors, and opens the bench in the viewer. Tutorial works through a larger example.
The other pages are reference:
Basic Concepts: the objects a layout is made of.
Propagation of a beam: the three ways to move a beam.
Optical layouts: the
OpticalLayoutobject, which holds a whole system.The viewer: the viewer and its controls.
The edit protocol: the messages the viewer sends to change a layout.