KM3io.jl
is a Julia library which implements high-performance I/O functions
and additional utilities to deal with dataformats used in KM3NeT, e.g.
ROOT (online/offline files),
DETX/DATX
(detector geometry and calibrations) and acoustics (waveforms and hardware). In
contrast to Python, you are free to utilise as many (nested) for
-loops as you
like while still being as fast as in e.g. in C++.
Apropos ROOT and C++, the KM3NeT
Dataformat is defined in C++
and uses the I/O functionality of the ROOT framework to create the online and
offline ROOT files. Luckily, there is a pure Julia library named
UnROOT.jl that provides access the the
ROOT files without the need to install ROOT or the corresponding C++ library.
This allows KM3io.jl
to be completely free from these external dependencies.
The library is still under development so that the API might slightly change. Feedback and contributions are highly welcome!
Check out the Latest Documention which also includes tutorials and examples.
KM3io.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 KM3io.jl
just like any other Julia package:
julia> import Pkg; Pkg.add("KM3io")
julia> using KM3io, KM3NeTTestData
julia> f = ROOTFile(datapath("offline", "numucc.root"))
ROOTFile{OnlineTree (0 events, 0 summaryslices), OfflineTree (10 events)}
julia> f.offline
OfflineTree (10 events)
julia> some_event = f.offline[3]
KM3io.Evt (3680 hits, 28 MC hits, 38 tracks, 12 MC tracks)