Skip to content

tamasgal/RainbowAlga.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RainbowAlga.jl

Dev Build Status Coverage

The RainbowAlga.jl package is an interactive 3D display which visualises events in water and ice Cherenkov neutrino telescopes. The underlying engine is Makie.jl.

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> d = Detector(datapath("detx", "KM3NeT_00000133_20221025.detx"))

julia> update!(d)

julia> RainbowAlga.run()

To manipulate the scene, the update!() and add!() functions can be used which act on the global RainbowAlga instance. As seen in the example above, the detector geometry is "updated" using update!(d). Tracks and hits can be added in a similar way, but using add!(hits). Check out the scripts/vhe_paper.jl script for more inspiration.

Performance Issues

If you encounter any performance issues, you can remove e.g. the detailed DOM rendering by passing simplified_doms=true to update!(detector; ...), like

julia> update!(d; simplified_doms=true)

Make sure not to overuse add!(hits), since each hit cloud adds some overhead to the animation loop, even if not fully displayed.

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 Cycle between hit clouds
1 - 9 Load perspective
Shift1 - 9 Save perspective
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)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages