Skip to content

About

Graphical user interface (GUI) for BeamletOptics.jl

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

BeamletOpticsGUI.jl logo

BeamletOpticsGUI.jl

Stable Dev CI codecov Aqua QA

Interactive GUI for BeamletOptics.jl: move the components of an optical setup with the mouse and keyboard, and see the beams and detector signals update live. BeamletOptics computes the physics and draws the components; this package arranges them into an interactive window.

using BeamletOptics, BeamletOpticsGUI, GLMakie

m = RoundPlanoMirror(25e-3, 5e-3)
zrotate3d!(m, deg2rad(45))
translate3d!(m, [0, 0.1, 0])
pd = Detector(5e-3)
zrotate3d!(pd, -π / 2)
translate3d!(pd, [0.1, 0.1, 0])

gui = live_view(System([m, pd]), GaussianBeamlet([0.0, 0, 0], [0.0, 1, 0], 1e-6, 0.5e-3);
    layout = :app)
display(gui)

Installation

BeamletOpticsGUI is installed from the General registry:

using Pkg
Pkg.add("BeamletOpticsGUI")

It needs BeamletOptics 0.14 and a Makie backend, preferably GLMakie.

The order of the packages in using makes a difference: load GLMakie last, as above. The window works in any order, but with GLMakie loaded first, Julia compiles about twice as much at the first hover, click or drag, see "Order of loading" in the documentation.

Features

  • live_view: a window with the 3D view, a detector view on the card of each detector (spot diagram, PSF or intensity), cards of the selected component, clip planes, measurements and camera tools, in a compact or an application layout, light or dark
  • a component catalog and add_component!/remove_component! to add and remove components at runtime
  • kinematic_controls! and view_cube! for own Makie scenes
  • own panels, controls and tools (add_panel!, add_controls!, add_tool!) and cards for own component types (card_rows)

See the documentation and the agent skill in skills/beamletopticsgui/ (BeamletOpticsGUI.install_agent_skill()).

Development

main develops against the master branch of BeamletOptics: the [sources] entries in Project.toml, test/Project.toml and docs/Project.toml point to its repository, so BeamletOptics and the GUI change together. The tests run with

julia --project=test -e 'using Pkg; Pkg.instantiate()'   # once, Pkg.update() fetches the latest master
julia --project=test test/runtests.jl

To work against a local checkout of BeamletOptics, dev it in the test environment:

julia --project=test -e 'using Pkg; Pkg.develop("BeamletOptics")'   # or Pkg.develop(path = "...")

Without a path this uses ~/.julia/dev/BeamletOptics (cloned there if missing). Pkg writes the path into test/Project.toml; do not commit that change. A registered version of the GUI uses the registered BeamletOptics; the release steps are in AGENTS.md.

About

Graphical user interface (GUI) for BeamletOptics.jl

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages