Skip to content
Snippets Groups Projects
Tamas Gal's avatar
a6709e88
History

RainbowAlga

Dev Build Status Coverage

Installation

RainbowAlga.jl is not an officially registered Julia package but it's available via the KM3NeT Julia registry. To add the KM3NeT Julia registry to your local Julia registry list, follow the instructions in its README or simply do

git clone https://git.km3net.de/common/julia-registry ~/.julia/registries/KM3NeT

After that, you can add RainbowAlga.jl just like any other Julia package:

julia> import Pkg; Pkg.add("RainbowAlga")

Quickstart

RainbowAlga has a global scene object which can be manipulated using several functions. RainbowAlga.run() can be called to display the scene at any time, usually right after loading the package.

julia> using RainbowAlga, KM3io, KM3NeTTestData

julia> RainbowAlga.run()  # opens the 3D display with the default KM3NeT detector

The function to update (usually replace) objects like the detector, hits or tracks is called update! and can be called with the corresponding objects. It will modify the global scene immediately. Here is an example how to load or update the detector geometry:

julia> d = Detector(datapath("detx", "KM3NeT_00000133_20221025.detx"))

julia> update!(d)

Keybindings

You can use and to go back and forth in time and R to reset the time.

Key Command
Time step back
Time step forward
Faster
Slower
, Decrease ToT cut
. Increase ToT cut
R Reset time to 0
A Toggle auto-rotation
L Toggle loop
D Toggle dark mode
C Toggle hit colouring mode
Space Play/Pause
Q Quit

RainbowAlga Screenshot

Performance

In case your computer is too slow to run a smooth animation and the Julia REPL is not responding quickly enough (or at all), consider lowering the framees per second (FPS) of the animation. It is best to set the FPS before calling RainbowAlga.run(), e.g. to 10 FPS:

julia> setfps!(10)