From e5c67bc8f24d6e2135de95cdfcfee31bccff2f91 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" <documenter@juliadocs.github.io> Date: Fri, 9 Feb 2024 09:14:10 +0000 Subject: [PATCH] build based on 9bb3c02 --- dev/.documenter-siteinfo.json | 2 +- dev/api/index.html | 133 ++++++++++++------------ dev/examples/cherenkov.pdf | Bin 28588 -> 28588 bytes dev/examples/cherenkov_times/index.html | 12 +-- dev/examples/controlhost/index.html | 2 +- dev/examples/foo.h5 | Bin 20472 -> 20472 bytes dev/examples/hdf5/index.html | 2 +- dev/examples/offline_data/index.html | 2 +- dev/index.html | 2 +- dev/manual/calibration/index.html | 2 +- dev/manual/detector/index.html | 2 +- dev/manual/hdf5/index.html | 2 +- dev/manual/rootfiles/index.html | 2 +- dev/manual/tools/index.html | 2 +- dev/search_index.js | 2 +- 15 files changed, 84 insertions(+), 83 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index b8220768..caa69eb2 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.8.5","generation_timestamp":"2024-01-26T14:29:37","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.1","generation_timestamp":"2024-02-09T09:14:06","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 7ecceb82..07e6218e 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,75 +1,75 @@ <!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>API · KM3io.jl</title><meta name="title" content="API · KM3io.jl"/><meta property="og:title" content="API · KM3io.jl"/><meta property="twitter:title" content="API · KM3io.jl"/><meta name="description" content="Documentation for KM3io.jl."/><meta property="og:description" content="Documentation for KM3io.jl."/><meta property="twitter:description" content="Documentation for KM3io.jl."/><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../search_index.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/custom.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.svg" alt="KM3io.jl logo"/></a><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><span class="tocitem">Manual</span><ul><li><a class="tocitem" href="../manual/rootfiles/">ROOT Files</a></li><li><a class="tocitem" href="../manual/detector/">Detector and its Components</a></li><li><a class="tocitem" href="../manual/calibration/">Calibration</a></li><li><a class="tocitem" href="../manual/tools/">Tools</a></li></ul></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../examples/offline_data/">Offline data</a></li><li><a class="tocitem" href="../examples/cherenkov_times/">Cherenkov times</a></li><li><a class="tocitem" href="../examples/controlhost/">Accessing Live Data</a></li><li><a class="tocitem" href="../examples/hdf5/">HDF5</a></li></ul></li><li class="is-active"><a class="tocitem" href>API</a><ul class="internal"><li><a class="tocitem" href="#Basic-Data-Structures"><span>Basic Data Structures</span></a></li><li><a class="tocitem" href="#Offline-Format"><span>Offline Format</span></a></li><li><a class="tocitem" href="#Online-Format"><span>Online Format</span></a></li><li><a class="tocitem" href="#HDF5"><span>HDF5</span></a></li><li><a class="tocitem" href="#Hardware"><span>Hardware</span></a></li><li><a class="tocitem" href="#Optical-Data"><span>Optical Data</span></a></li><li><a class="tocitem" href="#Acoustics"><span>Acoustics</span></a></li><li><a class="tocitem" href="#Calibration"><span>Calibration</span></a></li><li><a class="tocitem" href="#Physics"><span>Physics</span></a></li><li><a class="tocitem" href="#Trigger"><span>Trigger</span></a></li><li><a class="tocitem" href="#ControlHost"><span>ControlHost</span></a></li><li><a class="tocitem" href="#Tools"><span>Tools</span></a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>API</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>API</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://git.km3net.de/common/KM3io.jl" title="View the repository"><span class="docs-icon fa-brands">ï¡</span><span class="docs-label is-hidden-touch">Repository</span></a><a class="docs-navbar-link" href="https://git.km3net.de/common/KM3io.jl/blob/main/docs/src/api.md#L" title="Edit source"><span class="docs-icon fa-solid">ï„</span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="API"><a class="docs-heading-anchor" href="#API">API</a><a id="API-1"></a><a class="docs-heading-anchor-permalink" href="#API" title="Permalink"></a></h1><ul><li><a href="#KM3io.AcousticSignal"><code>KM3io.AcousticSignal</code></a></li><li><a href="#KM3io.AcousticsTriggerParameter"><code>KM3io.AcousticsTriggerParameter</code></a></li><li><a href="#KM3io.CHClient"><code>KM3io.CHClient</code></a></li><li><a href="#KM3io.CalibratedHit"><code>KM3io.CalibratedHit</code></a></li><li><a href="#KM3io.CalibratedMCHit"><code>KM3io.CalibratedMCHit</code></a></li><li><a href="#KM3io.CherenkovPhoton"><code>KM3io.CherenkovPhoton</code></a></li><li><a href="#KM3io.DAQEvent"><code>KM3io.DAQEvent</code></a></li><li><a href="#KM3io.Detector"><code>KM3io.Detector</code></a></li><li><a href="#KM3io.DetectorModule"><code>KM3io.DetectorModule</code></a></li><li><a href="#KM3io.Direction"><code>KM3io.Direction</code></a></li><li><a href="#KM3io.EventHeader"><code>KM3io.EventHeader</code></a></li><li><a href="#KM3io.Evt"><code>KM3io.Evt</code></a></li><li><a href="#KM3io.H5CompoundDataset"><code>KM3io.H5CompoundDataset</code></a></li><li><a href="#KM3io.H5File"><code>KM3io.H5File</code></a></li><li><a href="#KM3io.Hydrophone"><code>KM3io.Hydrophone</code></a></li><li><a href="#KM3io.K40Rates"><code>KM3io.K40Rates</code></a></li><li><a href="#KM3io.Location"><code>KM3io.Location</code></a></li><li><a href="#KM3io.MCTrk"><code>KM3io.MCTrk</code></a></li><li><a href="#KM3io.PMT"><code>KM3io.PMT</code></a></li><li><a href="#KM3io.Position"><code>KM3io.Position</code></a></li><li><a href="#KM3io.RecStageRange"><code>KM3io.RecStageRange</code></a></li><li><a href="#KM3io.SnapshotHit"><code>KM3io.SnapshotHit</code></a></li><li><a href="#KM3io.StringMechanics"><code>KM3io.StringMechanics</code></a></li><li><a href="#KM3io.StringMechanicsParameters"><code>KM3io.StringMechanicsParameters</code></a></li><li><a href="#KM3io.SummaryFrame"><code>KM3io.SummaryFrame</code></a></li><li><a href="#KM3io.Summaryslice"><code>KM3io.Summaryslice</code></a></li><li><a href="#KM3io.SummarysliceHeader"><code>KM3io.SummarysliceHeader</code></a></li><li><a href="#KM3io.TriggeredHit"><code>KM3io.TriggeredHit</code></a></li><li><a href="#KM3io.Tripod"><code>KM3io.Tripod</code></a></li><li><a href="#KM3io.Trk"><code>KM3io.Trk</code></a></li><li><a href="#KM3io.UTCExtended"><code>KM3io.UTCExtended</code></a></li><li><a href="#KM3io.UTCTime"><code>KM3io.UTCTime</code></a></li><li><a href="#KM3io.Waveform"><code>KM3io.Waveform</code></a></li><li><a href="#Base.flush"><code>Base.flush</code></a></li><li><a href="#Base.read-Tuple{AbstractString, Type{Tripod}}"><code>Base.read</code></a></li><li><a href="#Base.read-Tuple{AbstractString, Type{AcousticsTriggerParameter}}"><code>Base.read</code></a></li><li><a href="#Base.read-Tuple{AbstractString, Type{StringMechanics}}"><code>Base.read</code></a></li><li><a href="#Base.read-Tuple{AbstractString, Type{Waveform}}"><code>Base.read</code></a></li><li><a href="#Base.read-Tuple{AbstractString, Type{Hydrophone}}"><code>Base.read</code></a></li><li><a href="#Base.write-Tuple{AbstractString, Detector}"><code>Base.write</code></a></li><li><a href="#Base.write-Tuple{IO, Detector}"><code>Base.write</code></a></li><li><a href="#Base.write-Tuple{AbstractString, Vector{Tripod}}"><code>Base.write</code></a></li><li><a href="#HDF5.create_dataset"><code>HDF5.create_dataset</code></a></li><li><a href="#KM3io.addmeta"><code>KM3io.addmeta</code></a></li><li><a href="#KM3io.azimuth"><code>KM3io.azimuth</code></a></li><li><a href="#KM3io.bestaashower"><code>KM3io.bestaashower</code></a></li><li><a href="#KM3io.bestjppmuon"><code>KM3io.bestjppmuon</code></a></li><li><a href="#KM3io.bestjppshower"><code>KM3io.bestjppshower</code></a></li><li><a href="#KM3io.besttrack"><code>KM3io.besttrack</code></a></li><li><a href="#KM3io.calibrate"><code>KM3io.calibrate</code></a></li><li><a href="#KM3io.categorize"><code>KM3io.categorize</code></a></li><li><a href="#KM3io.center"><code>KM3io.center</code></a></li><li><a href="#KM3io.cherenkov"><code>KM3io.cherenkov</code></a></li><li><a href="#KM3io.combine"><code>KM3io.combine</code></a></li><li><a href="#KM3io.count_active_channels"><code>KM3io.count_active_channels</code></a></li><li><a href="#KM3io.count_fifostatus"><code>KM3io.count_fifostatus</code></a></li><li><a href="#KM3io.count_hrvstatus"><code>KM3io.count_hrvstatus</code></a></li><li><a href="#KM3io.fifostatus"><code>KM3io.fifostatus</code></a></li><li><a href="#KM3io.floordist"><code>KM3io.floordist</code></a></li><li><a href="#KM3io.getmodule"><code>KM3io.getmodule</code></a></li><li><a href="#KM3io.getpmt"><code>KM3io.getpmt</code></a></li><li><a href="#KM3io.hashistory"><code>KM3io.hashistory</code></a></li><li><a href="#KM3io.hasudptrailer"><code>KM3io.hasudptrailer</code></a></li><li><a href="#KM3io.hrvstatus"><code>KM3io.hrvstatus</code></a></li><li><a href="#KM3io.hydrophoneenabled"><code>KM3io.hydrophoneenabled</code></a></li><li><a href="#KM3io.is3dmuon"><code>KM3io.is3dmuon</code></a></li><li><a href="#KM3io.is3dshower"><code>KM3io.is3dshower</code></a></li><li><a href="#KM3io.ismxshower"><code>KM3io.ismxshower</code></a></li><li><a href="#KM3io.isnb"><code>KM3io.isnb</code></a></li><li><a href="#KM3io.maximal_udp_sequence_number"><code>KM3io.maximal_udp_sequence_number</code></a></li><li><a href="#KM3io.modules"><code>KM3io.modules</code></a></li><li><a href="#KM3io.most_frequent"><code>KM3io.most_frequent</code></a></li><li><a href="#KM3io.nthbitset"><code>KM3io.nthbitset</code></a></li><li><a href="#KM3io.number_of_udp_packets_received"><code>KM3io.number_of_udp_packets_received</code></a></li><li><a href="#KM3io.phi"><code>KM3io.phi</code></a></li><li><a href="#KM3io.piezoenabled"><code>KM3io.piezoenabled</code></a></li><li><a href="#KM3io.pmtrate"><code>KM3io.pmtrate</code></a></li><li><a href="#KM3io.pmtrates"><code>KM3io.pmtrates</code></a></li><li><a href="#KM3io.slew"><code>KM3io.slew</code></a></li><li><a href="#KM3io.status"><code>KM3io.status</code></a></li><li><a href="#KM3io.tdcstatus"><code>KM3io.tdcstatus</code></a></li><li><a href="#KM3io.theta"><code>KM3io.theta</code></a></li><li><a href="#KM3io.triggered"><code>KM3io.triggered</code></a></li><li><a href="#KM3io.wrstatus"><code>KM3io.wrstatus</code></a></li><li><a href="#KM3io.zenith"><code>KM3io.zenith</code></a></li></ul><h2 id="Basic-Data-Structures"><a class="docs-heading-anchor" href="#Basic-Data-Structures">Basic Data Structures</a><a id="Basic-Data-Structures-1"></a><a class="docs-heading-anchor-permalink" href="#Basic-Data-Structures" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Position" href="#KM3io.Position"><code>KM3io.Position</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Position{T} <: StaticArraysCore.FieldVector{3, T}</code></pre><p>A vector to represent a position in 3D.</p><p><strong>Fields</strong></p><ul><li><p><code>x::Any</code></p></li><li><p><code>y::Any</code></p></li><li><p><code>z::Any</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/types.jl#LL7">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Direction" href="#KM3io.Direction"><code>KM3io.Direction</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Direction{T<:AbstractFloat} <: StaticArraysCore.FieldVector{3, T<:AbstractFloat}</code></pre><p>A vector to represent a direction in 3D.</p><p><strong>Fields</strong></p><ul><li><p><code>x::AbstractFloat</code></p></li><li><p><code>y::AbstractFloat</code></p></li><li><p><code>z::AbstractFloat</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/types.jl#LL16">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Location" href="#KM3io.Location"><code>KM3io.Location</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Location</code></pre><p>A module's location in the detector where string represents the detection unit identifier and floor counts from 0 from the bottom to top. Base modules are sitting on floor 0 and optical modules on floor 1 and higher.</p><p><strong>Fields</strong></p><ul><li><p><code>string::Int32</code></p></li><li><p><code>floor::Int8</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL27">source</a></section></article><h2 id="Offline-Format"><a class="docs-heading-anchor" href="#Offline-Format">Offline Format</a><a id="Offline-Format-1"></a><a class="docs-heading-anchor-permalink" href="#Offline-Format" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Evt" href="#KM3io.Evt"><code>KM3io.Evt</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Evt</code></pre><p>An offline event.</p><p><strong>Fields</strong></p><ul><li><p><code>id::Int64</code></p></li><li><p><code>det_id::Int64</code></p></li><li><p><code>mc_id::Int64</code></p></li><li><p><code>run_id::Int64</code></p></li><li><p><code>mc_run_id::Int64</code></p></li><li><p><code>frame_index::Int64</code></p></li><li><p><code>trigger_mask::UInt64</code></p></li><li><p><code>trigger_counter::UInt64</code></p></li><li><p><code>overlays::UInt64</code></p></li><li><p><code>t::UTCTime</code></p></li><li><p><code>hits::Vector{CalibratedHit}</code></p></li><li><p><code>trks::Vector{Trk}</code></p></li><li><p><code>w::Vector{Float64}</code></p></li><li><p><code>w2list::Vector{Float64}</code></p></li><li><p><code>w3list::Vector{Float64}</code></p></li><li><p><code>mc_event_time::UTCTime</code></p></li><li><p><code>mc_t::Float64</code></p></li><li><p><code>mc_hits::Vector{CalibratedMCHit}</code></p></li><li><p><code>mc_trks::Vector{MCTrk}</code></p></li><li><p><code>index::Int64</code></p></li><li><p><code>flags::Int64</code></p></li><li><p><code>usr::Dict{String, Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/root/offline.jl#LL72">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.CalibratedHit" href="#KM3io.CalibratedHit"><code>KM3io.CalibratedHit</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct CalibratedHit <: AbstractCalibratedHit</code></pre><p>A calibrated hit of the offline dataformat. Caveat: the <code>position</code>, <code>direction</code> and <code>t</code> fields might still be <code>0</code> due to the design philosophy of the offline format (one class for all).</p><p><strong>Fields</strong></p><ul><li><p><code>dom_id::Int32</code></p></li><li><p><code>channel_id::UInt32</code></p></li><li><p><code>tdc::UInt32</code></p></li><li><p><code>tot::UInt32</code></p></li><li><p><code>trigger_mask::UInt64</code></p></li><li><p><code>t::Float64</code></p></li><li><p><code>pos::Position{Float64}</code></p></li><li><p><code>dir::Direction{Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/root/offline.jl#LL1">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.CalibratedMCHit" href="#KM3io.CalibratedMCHit"><code>KM3io.CalibratedMCHit</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct CalibratedMCHit</code></pre><p>A calibrated MC hit of the offline dataformat. Caveat: the <code>position</code> and <code>direction</code> fields might still be <code>0</code> due to the design philosophy of the offline format (one class for all).</p><p><strong>Fields</strong></p><ul><li><p><code>pmt_id::Int32</code></p></li><li><p><code>t::Float64</code></p></li><li><p><code>a::Float64</code></p></li><li><p><code>type::Int32</code></p></li><li><p><code>origin::Int32</code></p></li><li><p><code>pos::Position{Float64}</code></p></li><li><p><code>dir::Direction{Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/root/offline.jl#LL21">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Trk" href="#KM3io.Trk"><code>KM3io.Trk</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Trk</code></pre><p>Represents a reconstructed "track", which can be e.g. a muon track but also a shower.</p><p><strong>Fields</strong></p><ul><li><p><code>id::Int64</code></p></li><li><p><code>pos::Position{Float64}</code></p></li><li><p><code>dir::Direction{Float64}</code></p></li><li><p><code>t::Float64</code></p></li><li><p><code>E::Float64</code></p></li><li><p><code>len::Float64</code></p></li><li><p><code>lik::Float64</code></p></li><li><p><code>rec_type::Int32</code></p></li><li><p><code>rec_stages::Vector{Int32}</code></p></li><li><p><code>fitinf::Vector{Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/root/offline.jl#LL40">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.MCTrk" href="#KM3io.MCTrk"><code>KM3io.MCTrk</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct MCTrk</code></pre><p>A simulated (Monte Carlo, hence "MC") track (or shower).</p><p><strong>Fields</strong></p><ul><li><p><code>id::Int64</code></p></li><li><p><code>pos::Position{Float64}</code></p></li><li><p><code>dir::Direction{Float64}</code></p></li><li><p><code>t::Float64</code></p></li><li><p><code>E::Float64</code></p></li><li><p><code>len::Float64</code></p></li><li><p><code>type::Int32</code></p></li><li><p><code>status::Int32</code></p></li><li><p><code>mother_id::Int32</code></p></li><li><p><code>counter::Int32</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/root/offline.jl#LL56">source</a></section></article><h2 id="Online-Format"><a class="docs-heading-anchor" href="#Online-Format">Online Format</a><a id="Online-Format-1"></a><a class="docs-heading-anchor-permalink" href="#Online-Format" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.DAQEvent" href="#KM3io.DAQEvent"><code>KM3io.DAQEvent</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct DAQEvent</code></pre><p>A (triggered) event holding snapshot hits and triggered hits. The triggered hits are a subset of the snapshot hits.</p><p><strong>Fields</strong></p><ul><li><p><code>header::EventHeader</code></p></li><li><p><code>snapshot_hits::Vector{SnapshotHit}</code></p></li><li><p><code>triggered_hits::Vector{TriggeredHit}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/types.jl#LL164">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.EventHeader" href="#KM3io.EventHeader"><code>KM3io.EventHeader</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct EventHeader</code></pre><p>The header of an event.</p><p><strong>Fields</strong></p><ul><li><p><code>detector_id::Int32</code></p></li><li><p><code>run::Int32</code></p></li><li><p><code>frame_index::Int32</code></p></li><li><p><code>t::UTCExtended</code></p></li><li><p><code>trigger_counter::UInt64</code></p></li><li><p><code>trigger_mask::UInt64</code></p></li><li><p><code>overlays::UInt32</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/types.jl#LL149">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.SnapshotHit" href="#KM3io.SnapshotHit"><code>KM3io.SnapshotHit</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct SnapshotHit <: KM3io.AbstractDAQHit</code></pre><p>A snapshot hit.</p><p><strong>Fields</strong></p><ul><li><p><code>dom_id::UInt32</code></p></li><li><p><code>channel_id::UInt8</code></p></li><li><p><code>t::Int32</code></p></li><li><p><code>tot::UInt8</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/types.jl#LL49">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.TriggeredHit" href="#KM3io.TriggeredHit"><code>KM3io.TriggeredHit</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct TriggeredHit <: KM3io.AbstractDAQHit</code></pre><p>A hit which was triggered.</p><p><strong>Fields</strong></p><ul><li><p><code>dom_id::Int32</code></p></li><li><p><code>channel_id::UInt8</code></p></li><li><p><code>t::Int32</code></p></li><li><p><code>tot::UInt8</code></p></li><li><p><code>trigger_mask::UInt64</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/types.jl#LL61">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.UTCTime" href="#KM3io.UTCTime"><code>KM3io.UTCTime</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct UTCTime</code></pre><p>A basic time structure with seconds and nanoseconds. The seconds are counting from the start of the epoch, just like the UNIX time.</p><p><strong>Fields</strong></p><ul><li><p><code>s::UInt64</code></p></li><li><p><code>ns::UInt64</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/types.jl#LL88">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.UTCExtended" href="#KM3io.UTCExtended"><code>KM3io.UTCExtended</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct UTCExtended</code></pre><p>An extended time structure which contains the White Rabbit time synchronisation status. <code>wr_status == 0</code> means that the synchronisation is OK.</p><p><strong>Fields</strong></p><ul><li><p><code>s::UInt32</code></p></li><li><p><code>ns::UInt32</code></p></li><li><p><code>wr_status::Int64</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/types.jl#LL100">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Summaryslice" href="#KM3io.Summaryslice"><code>KM3io.Summaryslice</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Summaryslice</code></pre><p>A summaryslice is a condensed timeslice with the header information of the corresponding timeslice and a summary frame for each optical module. The hit information of the original timeslice is reduced so that for each PMT a single byte is used to encode the hit rate.</p><p><strong>Fields</strong></p><ul><li><p><code>header::SummarysliceHeader</code></p></li><li><p><code>frames::Vector{SummaryFrame}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/root/online.jl#LL97">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.SummarysliceHeader" href="#KM3io.SummarysliceHeader"><code>KM3io.SummarysliceHeader</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct SummarysliceHeader</code></pre><p>The header of a summaryslice.</p><p><strong>Fields</strong></p><ul><li><p><code>detector_id::Int32</code></p></li><li><p><code>run::Int32</code></p></li><li><p><code>frame_index::Int32</code></p></li><li><p><code>t::UTCExtended</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/types.jl#LL137">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.SummaryFrame" href="#KM3io.SummaryFrame"><code>KM3io.SummaryFrame</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct SummaryFrame</code></pre><p>A <code>SummaryFrame</code> contains reduced timeslice data from an optical module.</p><p>The PMT <code>rates</code> are encoded as single bytes and can be converted to real hit rates using the <code>rates(s::SummaryFrame)</code> function.</p><p><strong>Fields</strong></p><ul><li><p><code>dom_id::Int32</code></p></li><li><p><code>daq::UInt32</code></p></li><li><p><code>status::UInt32</code></p></li><li><p><code>fifo::UInt32</code></p></li><li><p><code>status3::UInt32</code></p></li><li><p><code>status4::UInt32</code></p></li><li><p><code>rates::StaticArraysCore.SVector{31, UInt8}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/types.jl#LL119">source</a></section></article><h2 id="HDF5"><a class="docs-heading-anchor" href="#HDF5">HDF5</a><a id="HDF5-1"></a><a class="docs-heading-anchor-permalink" href="#HDF5" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.H5File" href="#KM3io.H5File"><code>KM3io.H5File</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct H5File</code></pre><p>A wrapper for an HDF5 file used in KM3NeT.</p><p><strong>Fields</strong></p><ul><li><p><code>_h5f::HDF5.File</code></p></li><li><p><code>_datasets::Dict{String, H5CompoundDataset}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hdf5/hdf5.jl#LL35">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.H5CompoundDataset" href="#KM3io.H5CompoundDataset"><code>KM3io.H5CompoundDataset</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct H5CompoundDataset{T}</code></pre><p>A flat HDF5 compound dataset which is essentially a vector of structs. It has a cache which is filled when elements are pushed to it. The cache is automatically written to the target HDF5 path when full.</p><p><strong>Fields</strong></p><ul><li><p><code>dset::HDF5.Dataset</code></p></li><li><p><code>cache::KM3io.H5CompoundDatasetCache</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hdf5/hdf5.jl#LL6">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.addmeta" href="#KM3io.addmeta"><code>KM3io.addmeta</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">addmeta( +<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>API · KM3io.jl</title><meta name="title" content="API · KM3io.jl"/><meta property="og:title" content="API · KM3io.jl"/><meta property="twitter:title" content="API · KM3io.jl"/><meta name="description" content="Documentation for KM3io.jl."/><meta property="og:description" content="Documentation for KM3io.jl."/><meta property="twitter:description" content="Documentation for KM3io.jl."/><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../search_index.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/custom.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.svg" alt="KM3io.jl logo"/></a><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><span class="tocitem">Manual</span><ul><li><a class="tocitem" href="../manual/rootfiles/">ROOT Files</a></li><li><a class="tocitem" href="../manual/detector/">Detector and its Components</a></li><li><a class="tocitem" href="../manual/calibration/">Calibration</a></li><li><a class="tocitem" href="../manual/tools/">Tools</a></li></ul></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../examples/offline_data/">Offline data</a></li><li><a class="tocitem" href="../examples/cherenkov_times/">Cherenkov times</a></li><li><a class="tocitem" href="../examples/controlhost/">Accessing Live Data</a></li><li><a class="tocitem" href="../examples/hdf5/">HDF5</a></li></ul></li><li class="is-active"><a class="tocitem" href>API</a><ul class="internal"><li><a class="tocitem" href="#Basic-Data-Structures"><span>Basic Data Structures</span></a></li><li><a class="tocitem" href="#Offline-Format"><span>Offline Format</span></a></li><li><a class="tocitem" href="#Online-Format"><span>Online Format</span></a></li><li><a class="tocitem" href="#HDF5"><span>HDF5</span></a></li><li><a class="tocitem" href="#Hardware"><span>Hardware</span></a></li><li><a class="tocitem" href="#Optical-Data"><span>Optical Data</span></a></li><li><a class="tocitem" href="#Acoustics"><span>Acoustics</span></a></li><li><a class="tocitem" href="#Calibration"><span>Calibration</span></a></li><li><a class="tocitem" href="#Physics"><span>Physics</span></a></li><li><a class="tocitem" href="#Trigger"><span>Trigger</span></a></li><li><a class="tocitem" href="#ControlHost"><span>ControlHost</span></a></li><li><a class="tocitem" href="#Tools"><span>Tools</span></a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>API</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>API</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://git.km3net.de/common/KM3io.jl" title="View the repository"><span class="docs-icon fa-brands">ï¡</span><span class="docs-label is-hidden-touch">Repository</span></a><a class="docs-navbar-link" href="https://git.km3net.de/common/KM3io.jl/blob/main/docs/src/api.md#L" title="Edit source"><span class="docs-icon fa-solid">ï„</span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="API"><a class="docs-heading-anchor" href="#API">API</a><a id="API-1"></a><a class="docs-heading-anchor-permalink" href="#API" title="Permalink"></a></h1><ul><li><a href="#KM3io.AcousticSignal"><code>KM3io.AcousticSignal</code></a></li><li><a href="#KM3io.AcousticsTriggerParameter"><code>KM3io.AcousticsTriggerParameter</code></a></li><li><a href="#KM3io.CHClient"><code>KM3io.CHClient</code></a></li><li><a href="#KM3io.CalibratedHit"><code>KM3io.CalibratedHit</code></a></li><li><a href="#KM3io.CalibratedMCHit"><code>KM3io.CalibratedMCHit</code></a></li><li><a href="#KM3io.CherenkovPhoton"><code>KM3io.CherenkovPhoton</code></a></li><li><a href="#KM3io.DAQEvent"><code>KM3io.DAQEvent</code></a></li><li><a href="#KM3io.Detector"><code>KM3io.Detector</code></a></li><li><a href="#KM3io.DetectorModule"><code>KM3io.DetectorModule</code></a></li><li><a href="#KM3io.Direction"><code>KM3io.Direction</code></a></li><li><a href="#KM3io.EventHeader"><code>KM3io.EventHeader</code></a></li><li><a href="#KM3io.Evt"><code>KM3io.Evt</code></a></li><li><a href="#KM3io.H5CompoundDataset"><code>KM3io.H5CompoundDataset</code></a></li><li><a href="#KM3io.H5File"><code>KM3io.H5File</code></a></li><li><a href="#KM3io.Hydrophone"><code>KM3io.Hydrophone</code></a></li><li><a href="#KM3io.K40Rates"><code>KM3io.K40Rates</code></a></li><li><a href="#KM3io.Location"><code>KM3io.Location</code></a></li><li><a href="#KM3io.MCTrk"><code>KM3io.MCTrk</code></a></li><li><a href="#KM3io.PMT"><code>KM3io.PMT</code></a></li><li><a href="#KM3io.Position"><code>KM3io.Position</code></a></li><li><a href="#KM3io.RecStageRange"><code>KM3io.RecStageRange</code></a></li><li><a href="#KM3io.SnapshotHit"><code>KM3io.SnapshotHit</code></a></li><li><a href="#KM3io.StringMechanics"><code>KM3io.StringMechanics</code></a></li><li><a href="#KM3io.StringMechanicsParameters"><code>KM3io.StringMechanicsParameters</code></a></li><li><a href="#KM3io.SummaryFrame"><code>KM3io.SummaryFrame</code></a></li><li><a href="#KM3io.Summaryslice"><code>KM3io.Summaryslice</code></a></li><li><a href="#KM3io.SummarysliceHeader"><code>KM3io.SummarysliceHeader</code></a></li><li><a href="#KM3io.TriggeredHit"><code>KM3io.TriggeredHit</code></a></li><li><a href="#KM3io.Tripod"><code>KM3io.Tripod</code></a></li><li><a href="#KM3io.Trk"><code>KM3io.Trk</code></a></li><li><a href="#KM3io.UTCExtended"><code>KM3io.UTCExtended</code></a></li><li><a href="#KM3io.UTCTime"><code>KM3io.UTCTime</code></a></li><li><a href="#KM3io.Waveform"><code>KM3io.Waveform</code></a></li><li><a href="#Base.angle"><code>Base.angle</code></a></li><li><a href="#Base.flush"><code>Base.flush</code></a></li><li><a href="#Base.read-Tuple{AbstractString, Type{StringMechanics}}"><code>Base.read</code></a></li><li><a href="#Base.read-Tuple{AbstractString, Type{AcousticsTriggerParameter}}"><code>Base.read</code></a></li><li><a href="#Base.read-Tuple{AbstractString, Type{Hydrophone}}"><code>Base.read</code></a></li><li><a href="#Base.read-Tuple{AbstractString, Type{Waveform}}"><code>Base.read</code></a></li><li><a href="#Base.read-Tuple{AbstractString, Type{Tripod}}"><code>Base.read</code></a></li><li><a href="#Base.write-Tuple{IO, Detector}"><code>Base.write</code></a></li><li><a href="#Base.write-Tuple{AbstractString, Detector}"><code>Base.write</code></a></li><li><a href="#Base.write-Tuple{AbstractString, Vector{Tripod}}"><code>Base.write</code></a></li><li><a href="#HDF5.create_dataset"><code>HDF5.create_dataset</code></a></li><li><a href="#KM3io.addmeta"><code>KM3io.addmeta</code></a></li><li><a href="#KM3io.azimuth"><code>KM3io.azimuth</code></a></li><li><a href="#KM3io.bestaashower"><code>KM3io.bestaashower</code></a></li><li><a href="#KM3io.bestjppmuon"><code>KM3io.bestjppmuon</code></a></li><li><a href="#KM3io.bestjppshower"><code>KM3io.bestjppshower</code></a></li><li><a href="#KM3io.besttrack"><code>KM3io.besttrack</code></a></li><li><a href="#KM3io.calibrate"><code>KM3io.calibrate</code></a></li><li><a href="#KM3io.categorize"><code>KM3io.categorize</code></a></li><li><a href="#KM3io.center"><code>KM3io.center</code></a></li><li><a href="#KM3io.cherenkov"><code>KM3io.cherenkov</code></a></li><li><a href="#KM3io.combine"><code>KM3io.combine</code></a></li><li><a href="#KM3io.count_active_channels"><code>KM3io.count_active_channels</code></a></li><li><a href="#KM3io.count_fifostatus"><code>KM3io.count_fifostatus</code></a></li><li><a href="#KM3io.count_hrvstatus"><code>KM3io.count_hrvstatus</code></a></li><li><a href="#KM3io.fifostatus"><code>KM3io.fifostatus</code></a></li><li><a href="#KM3io.floordist"><code>KM3io.floordist</code></a></li><li><a href="#KM3io.getmodule"><code>KM3io.getmodule</code></a></li><li><a href="#KM3io.getpmt"><code>KM3io.getpmt</code></a></li><li><a href="#KM3io.hashistory"><code>KM3io.hashistory</code></a></li><li><a href="#KM3io.hasudptrailer"><code>KM3io.hasudptrailer</code></a></li><li><a href="#KM3io.hrvstatus"><code>KM3io.hrvstatus</code></a></li><li><a href="#KM3io.hydrophoneenabled"><code>KM3io.hydrophoneenabled</code></a></li><li><a href="#KM3io.is3dmuon"><code>KM3io.is3dmuon</code></a></li><li><a href="#KM3io.is3dshower"><code>KM3io.is3dshower</code></a></li><li><a href="#KM3io.ismxshower"><code>KM3io.ismxshower</code></a></li><li><a href="#KM3io.isnb"><code>KM3io.isnb</code></a></li><li><a href="#KM3io.maximal_udp_sequence_number"><code>KM3io.maximal_udp_sequence_number</code></a></li><li><a href="#KM3io.modules"><code>KM3io.modules</code></a></li><li><a href="#KM3io.most_frequent"><code>KM3io.most_frequent</code></a></li><li><a href="#KM3io.nthbitset"><code>KM3io.nthbitset</code></a></li><li><a href="#KM3io.number_of_udp_packets_received"><code>KM3io.number_of_udp_packets_received</code></a></li><li><a href="#KM3io.phi"><code>KM3io.phi</code></a></li><li><a href="#KM3io.piezoenabled"><code>KM3io.piezoenabled</code></a></li><li><a href="#KM3io.pmtrate"><code>KM3io.pmtrate</code></a></li><li><a href="#KM3io.pmtrates"><code>KM3io.pmtrates</code></a></li><li><a href="#KM3io.slew"><code>KM3io.slew</code></a></li><li><a href="#KM3io.status"><code>KM3io.status</code></a></li><li><a href="#KM3io.tdcstatus"><code>KM3io.tdcstatus</code></a></li><li><a href="#KM3io.theta"><code>KM3io.theta</code></a></li><li><a href="#KM3io.triggered"><code>KM3io.triggered</code></a></li><li><a href="#KM3io.wrstatus"><code>KM3io.wrstatus</code></a></li><li><a href="#KM3io.zenith"><code>KM3io.zenith</code></a></li></ul><h2 id="Basic-Data-Structures"><a class="docs-heading-anchor" href="#Basic-Data-Structures">Basic Data Structures</a><a id="Basic-Data-Structures-1"></a><a class="docs-heading-anchor-permalink" href="#Basic-Data-Structures" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Position" href="#KM3io.Position"><code>KM3io.Position</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Position{T} <: StaticArraysCore.FieldVector{3, T}</code></pre><p>A vector to represent a position in 3D.</p><p><strong>Fields</strong></p><ul><li><p><code>x::Any</code></p></li><li><p><code>y::Any</code></p></li><li><p><code>z::Any</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/types.jl#LL7">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Direction" href="#KM3io.Direction"><code>KM3io.Direction</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Direction{T<:AbstractFloat} <: StaticArraysCore.FieldVector{3, T<:AbstractFloat}</code></pre><p>A vector to represent a direction in 3D.</p><p><strong>Fields</strong></p><ul><li><p><code>x::AbstractFloat</code></p></li><li><p><code>y::AbstractFloat</code></p></li><li><p><code>z::AbstractFloat</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/types.jl#LL16">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Location" href="#KM3io.Location"><code>KM3io.Location</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Location</code></pre><p>A module's location in the detector where string represents the detection unit identifier and floor counts from 0 from the bottom to top. Base modules are sitting on floor 0 and optical modules on floor 1 and higher.</p><p><strong>Fields</strong></p><ul><li><p><code>string::Int32</code></p></li><li><p><code>floor::Int8</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL27">source</a></section></article><h2 id="Offline-Format"><a class="docs-heading-anchor" href="#Offline-Format">Offline Format</a><a id="Offline-Format-1"></a><a class="docs-heading-anchor-permalink" href="#Offline-Format" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Evt" href="#KM3io.Evt"><code>KM3io.Evt</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Evt</code></pre><p>An offline event.</p><p><strong>Fields</strong></p><ul><li><p><code>id::Int64</code></p></li><li><p><code>det_id::Int64</code></p></li><li><p><code>mc_id::Int64</code></p></li><li><p><code>run_id::Int64</code></p></li><li><p><code>mc_run_id::Int64</code></p></li><li><p><code>frame_index::Int64</code></p></li><li><p><code>trigger_mask::UInt64</code></p></li><li><p><code>trigger_counter::UInt64</code></p></li><li><p><code>overlays::UInt64</code></p></li><li><p><code>t::UTCTime</code></p></li><li><p><code>hits::Vector{CalibratedHit}</code></p></li><li><p><code>trks::Vector{Trk}</code></p></li><li><p><code>w::Vector{Float64}</code></p></li><li><p><code>w2list::Vector{Float64}</code></p></li><li><p><code>w3list::Vector{Float64}</code></p></li><li><p><code>mc_event_time::UTCTime</code></p></li><li><p><code>mc_t::Float64</code></p></li><li><p><code>mc_hits::Vector{CalibratedMCHit}</code></p></li><li><p><code>mc_trks::Vector{MCTrk}</code></p></li><li><p><code>index::Int64</code></p></li><li><p><code>flags::Int64</code></p></li><li><p><code>usr::Dict{String, Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/root/offline.jl#LL72">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.CalibratedHit" href="#KM3io.CalibratedHit"><code>KM3io.CalibratedHit</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct CalibratedHit <: AbstractCalibratedHit</code></pre><p>A calibrated hit of the offline dataformat. Caveat: the <code>position</code>, <code>direction</code> and <code>t</code> fields might still be <code>0</code> due to the design philosophy of the offline format (one class for all).</p><p><strong>Fields</strong></p><ul><li><p><code>dom_id::Int32</code></p></li><li><p><code>channel_id::UInt32</code></p></li><li><p><code>tdc::UInt32</code></p></li><li><p><code>tot::UInt32</code></p></li><li><p><code>trigger_mask::UInt64</code></p></li><li><p><code>t::Float64</code></p></li><li><p><code>pos::Position{Float64}</code></p></li><li><p><code>dir::Direction{Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/root/offline.jl#LL1">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.CalibratedMCHit" href="#KM3io.CalibratedMCHit"><code>KM3io.CalibratedMCHit</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct CalibratedMCHit</code></pre><p>A calibrated MC hit of the offline dataformat. Caveat: the <code>position</code> and <code>direction</code> fields might still be <code>0</code> due to the design philosophy of the offline format (one class for all).</p><p><strong>Fields</strong></p><ul><li><p><code>pmt_id::Int32</code></p></li><li><p><code>t::Float64</code></p></li><li><p><code>a::Float64</code></p></li><li><p><code>type::Int32</code></p></li><li><p><code>origin::Int32</code></p></li><li><p><code>pos::Position{Float64}</code></p></li><li><p><code>dir::Direction{Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/root/offline.jl#LL21">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Trk" href="#KM3io.Trk"><code>KM3io.Trk</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Trk</code></pre><p>Represents a reconstructed "track", which can be e.g. a muon track but also a shower.</p><p><strong>Fields</strong></p><ul><li><p><code>id::Int64</code></p></li><li><p><code>pos::Position{Float64}</code></p></li><li><p><code>dir::Direction{Float64}</code></p></li><li><p><code>t::Float64</code></p></li><li><p><code>E::Float64</code></p></li><li><p><code>len::Float64</code></p></li><li><p><code>lik::Float64</code></p></li><li><p><code>rec_type::Int32</code></p></li><li><p><code>rec_stages::Vector{Int32}</code></p></li><li><p><code>fitinf::Vector{Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/root/offline.jl#LL40">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.MCTrk" href="#KM3io.MCTrk"><code>KM3io.MCTrk</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct MCTrk</code></pre><p>A simulated (Monte Carlo, hence "MC") track (or shower).</p><p><strong>Fields</strong></p><ul><li><p><code>id::Int64</code></p></li><li><p><code>pos::Position{Float64}</code></p></li><li><p><code>dir::Direction{Float64}</code></p></li><li><p><code>t::Float64</code></p></li><li><p><code>E::Float64</code></p></li><li><p><code>len::Float64</code></p></li><li><p><code>type::Int32</code></p></li><li><p><code>status::Int32</code></p></li><li><p><code>mother_id::Int32</code></p></li><li><p><code>counter::Int32</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/root/offline.jl#LL56">source</a></section></article><h2 id="Online-Format"><a class="docs-heading-anchor" href="#Online-Format">Online Format</a><a id="Online-Format-1"></a><a class="docs-heading-anchor-permalink" href="#Online-Format" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.DAQEvent" href="#KM3io.DAQEvent"><code>KM3io.DAQEvent</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct DAQEvent</code></pre><p>A (triggered) event holding snapshot hits and triggered hits. The triggered hits are a subset of the snapshot hits.</p><p><strong>Fields</strong></p><ul><li><p><code>header::EventHeader</code></p></li><li><p><code>snapshot_hits::Vector{SnapshotHit}</code></p></li><li><p><code>triggered_hits::Vector{TriggeredHit}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/types.jl#LL164">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.EventHeader" href="#KM3io.EventHeader"><code>KM3io.EventHeader</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct EventHeader</code></pre><p>The header of an event.</p><p><strong>Fields</strong></p><ul><li><p><code>detector_id::Int32</code></p></li><li><p><code>run::Int32</code></p></li><li><p><code>frame_index::Int32</code></p></li><li><p><code>t::UTCExtended</code></p></li><li><p><code>trigger_counter::UInt64</code></p></li><li><p><code>trigger_mask::UInt64</code></p></li><li><p><code>overlays::UInt32</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/types.jl#LL149">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.SnapshotHit" href="#KM3io.SnapshotHit"><code>KM3io.SnapshotHit</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct SnapshotHit <: KM3io.AbstractDAQHit</code></pre><p>A snapshot hit.</p><p><strong>Fields</strong></p><ul><li><p><code>dom_id::UInt32</code></p></li><li><p><code>channel_id::UInt8</code></p></li><li><p><code>t::Int32</code></p></li><li><p><code>tot::UInt8</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/types.jl#LL49">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.TriggeredHit" href="#KM3io.TriggeredHit"><code>KM3io.TriggeredHit</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct TriggeredHit <: KM3io.AbstractDAQHit</code></pre><p>A hit which was triggered.</p><p><strong>Fields</strong></p><ul><li><p><code>dom_id::Int32</code></p></li><li><p><code>channel_id::UInt8</code></p></li><li><p><code>t::Int32</code></p></li><li><p><code>tot::UInt8</code></p></li><li><p><code>trigger_mask::UInt64</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/types.jl#LL61">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.UTCTime" href="#KM3io.UTCTime"><code>KM3io.UTCTime</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct UTCTime</code></pre><p>A basic time structure with seconds and nanoseconds. The seconds are counting from the start of the epoch, just like the UNIX time.</p><p><strong>Fields</strong></p><ul><li><p><code>s::UInt64</code></p></li><li><p><code>ns::UInt64</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/types.jl#LL88">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.UTCExtended" href="#KM3io.UTCExtended"><code>KM3io.UTCExtended</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct UTCExtended</code></pre><p>An extended time structure which contains the White Rabbit time synchronisation status. <code>wr_status == 0</code> means that the synchronisation is OK.</p><p><strong>Fields</strong></p><ul><li><p><code>s::UInt32</code></p></li><li><p><code>ns::UInt32</code></p></li><li><p><code>wr_status::Int64</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/types.jl#LL100">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Summaryslice" href="#KM3io.Summaryslice"><code>KM3io.Summaryslice</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Summaryslice</code></pre><p>A summaryslice is a condensed timeslice with the header information of the corresponding timeslice and a summary frame for each optical module. The hit information of the original timeslice is reduced so that for each PMT a single byte is used to encode the hit rate.</p><p><strong>Fields</strong></p><ul><li><p><code>header::SummarysliceHeader</code></p></li><li><p><code>frames::Vector{SummaryFrame}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/root/online.jl#LL97">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.SummarysliceHeader" href="#KM3io.SummarysliceHeader"><code>KM3io.SummarysliceHeader</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct SummarysliceHeader</code></pre><p>The header of a summaryslice.</p><p><strong>Fields</strong></p><ul><li><p><code>detector_id::Int32</code></p></li><li><p><code>run::Int32</code></p></li><li><p><code>frame_index::Int32</code></p></li><li><p><code>t::UTCExtended</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/types.jl#LL137">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.SummaryFrame" href="#KM3io.SummaryFrame"><code>KM3io.SummaryFrame</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct SummaryFrame</code></pre><p>A <code>SummaryFrame</code> contains reduced timeslice data from an optical module.</p><p>The PMT <code>rates</code> are encoded as single bytes and can be converted to real hit rates using the <code>rates(s::SummaryFrame)</code> function.</p><p><strong>Fields</strong></p><ul><li><p><code>dom_id::Int32</code></p></li><li><p><code>daq::UInt32</code></p></li><li><p><code>status::UInt32</code></p></li><li><p><code>fifo::UInt32</code></p></li><li><p><code>status3::UInt32</code></p></li><li><p><code>status4::UInt32</code></p></li><li><p><code>rates::StaticArraysCore.SVector{31, UInt8}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/types.jl#LL119">source</a></section></article><h2 id="HDF5"><a class="docs-heading-anchor" href="#HDF5">HDF5</a><a id="HDF5-1"></a><a class="docs-heading-anchor-permalink" href="#HDF5" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.H5File" href="#KM3io.H5File"><code>KM3io.H5File</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct H5File</code></pre><p>A wrapper for an HDF5 file used in KM3NeT.</p><p><strong>Fields</strong></p><ul><li><p><code>_h5f::HDF5.File</code></p></li><li><p><code>_datasets::Dict{String, H5CompoundDataset}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hdf5/hdf5.jl#LL35">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.H5CompoundDataset" href="#KM3io.H5CompoundDataset"><code>KM3io.H5CompoundDataset</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct H5CompoundDataset{T}</code></pre><p>A flat HDF5 compound dataset which is essentially a vector of structs. It has a cache which is filled when elements are pushed to it. The cache is automatically written to the target HDF5 path when full.</p><p><strong>Fields</strong></p><ul><li><p><code>dset::HDF5.Dataset</code></p></li><li><p><code>cache::KM3io.H5CompoundDatasetCache</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hdf5/hdf5.jl#LL6">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.addmeta" href="#KM3io.addmeta"><code>KM3io.addmeta</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">addmeta( dset::Union{HDF5.Dataset, HDF5.Datatype, HDF5.File, HDF5.Group}, object ) -</code></pre><p>Attaches key-value-pair meta entries to an HDF5 instance for each field of the given object.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hdf5/hdf5.jl#LL94">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="HDF5.create_dataset" href="#HDF5.create_dataset"><code>HDF5.create_dataset</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">create_dataset( +</code></pre><p>Attaches key-value-pair meta entries to an HDF5 instance for each field of the given object.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hdf5/hdf5.jl#LL94">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="HDF5.create_dataset" href="#HDF5.create_dataset"><code>HDF5.create_dataset</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">create_dataset( f::H5File, path::AbstractString, ::Type{T}; cache_size ) -> H5CompoundDataset -</code></pre><p>Creates a one-dimensional compound dataset <a href="#KM3io.H5CompoundDataset"><code>H5CompoundDataset</code></a> of a given type which can be extended one-by-one. The cache is used to accumulate data and reduce the number of dataset extensions. Each time the cache is full, the HDF5 dataset will be extended, the buffer written and cleared.</p><p>To force the writing, use <a href="#Base.flush"><code>flush</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hdf5/hdf5.jl#LL72">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.flush" href="#Base.flush"><code>Base.flush</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">flush(d::H5CompoundDataset) -> Vector -</code></pre><p>Forces the cache to be written to the HDF5 file.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hdf5/hdf5.jl#LL21">source</a></section></article><h2 id="Hardware"><a class="docs-heading-anchor" href="#Hardware">Hardware</a><a id="Hardware-1"></a><a class="docs-heading-anchor-permalink" href="#Hardware" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.PMT" href="#KM3io.PMT"><code>KM3io.PMT</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct PMT</code></pre><p>The photomultiplier tube of an optical module. The <code>id</code> stands for the DAQ channel ID.</p><p>A non-zero status means the PMT is "not OK". Individual bits can be read out to identify the problem (see definitions/pmt_status.jl for the bit positions and check them using the <code>nthbitset()</code> function).</p><p><strong>Fields</strong></p><ul><li><p><code>id::Int32</code></p></li><li><p><code>pos::Position{Float64}</code></p></li><li><p><code>dir::Direction{Float64}</code></p></li><li><p><code>tâ‚€::Float64</code></p></li><li><p><code>status::Union{Missing, Int32}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL1">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.DetectorModule" href="#KM3io.DetectorModule"><code>KM3io.DetectorModule</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct DetectorModule</code></pre><p>Either a base module or an optical module. A non-zero status means the module is "not OK". Individual bits can be read out to identify the problem (see definitions/module_status.jl for the bit positions and check them using the <code>nthbitset()</code> function).</p><p><strong>Fields</strong></p><ul><li><p><code>id::Int32</code></p></li><li><p><code>pos::Position{Float64}</code></p></li><li><p><code>location::Location</code></p></li><li><p><code>n_pmts::Int8</code></p></li><li><p><code>pmts::Vector{PMT}</code></p></li><li><p><code>q::Union{Missing, Quaternion{Float64}}</code></p></li><li><p><code>status::Int32</code></p></li><li><p><code>tâ‚€::Float64</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL41">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Detector" href="#KM3io.Detector"><code>KM3io.Detector</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Detector</code></pre><p>A KM3NeT detector.</p><p><strong>Fields</strong></p><ul><li><p><code>version::Int8</code></p></li><li><p><code>id::Int32</code></p></li><li><p><code>validity::Union{Missing, KM3io.DateRange}</code></p></li><li><p><code>pos::Union{Missing, UTMPosition{Float64}}</code></p></li><li><p><code>utm_ref_grid::Union{Missing, String}</code></p></li><li><p><code>n_modules::Int32</code></p></li><li><p><code>modules::Dict{Int32, DetectorModule}</code></p></li><li><p><code>locations::Dict{Tuple{Int64, Int64}, DetectorModule}</code></p></li><li><p><code>strings::Vector{Int64}</code></p></li><li><p><code>comments::Vector{String}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL263">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.modules" href="#KM3io.modules"><code>KM3io.modules</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">modules(d::Detector) -> Vector{DetectorModule} -</code></pre><p>Return a vector of all modules of a given detector.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL279">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.getmodule" href="#KM3io.getmodule"><code>KM3io.getmodule</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">getmodule( +</code></pre><p>Creates a one-dimensional compound dataset <a href="#KM3io.H5CompoundDataset"><code>H5CompoundDataset</code></a> of a given type which can be extended one-by-one. The cache is used to accumulate data and reduce the number of dataset extensions. Each time the cache is full, the HDF5 dataset will be extended, the buffer written and cleared.</p><p>To force the writing, use <a href="#Base.flush"><code>flush</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hdf5/hdf5.jl#LL72">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.flush" href="#Base.flush"><code>Base.flush</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">flush(d::H5CompoundDataset) -> Vector +</code></pre><p>Forces the cache to be written to the HDF5 file.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hdf5/hdf5.jl#LL21">source</a></section></article><h2 id="Hardware"><a class="docs-heading-anchor" href="#Hardware">Hardware</a><a id="Hardware-1"></a><a class="docs-heading-anchor-permalink" href="#Hardware" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.PMT" href="#KM3io.PMT"><code>KM3io.PMT</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct PMT</code></pre><p>The photomultiplier tube of an optical module. The <code>id</code> stands for the DAQ channel ID.</p><p>A non-zero status means the PMT is "not OK". Individual bits can be read out to identify the problem (see definitions/pmt_status.jl for the bit positions and check them using the <code>nthbitset()</code> function).</p><p><strong>Fields</strong></p><ul><li><p><code>id::Int32</code></p></li><li><p><code>pos::Position{Float64}</code></p></li><li><p><code>dir::Direction{Float64}</code></p></li><li><p><code>tâ‚€::Float64</code></p></li><li><p><code>status::Union{Missing, Int32}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL1">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.DetectorModule" href="#KM3io.DetectorModule"><code>KM3io.DetectorModule</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct DetectorModule</code></pre><p>Either a base module or an optical module. A non-zero status means the module is "not OK". Individual bits can be read out to identify the problem (see definitions/module_status.jl for the bit positions and check them using the <code>nthbitset()</code> function).</p><p><strong>Fields</strong></p><ul><li><p><code>id::Int32</code></p></li><li><p><code>pos::Position{Float64}</code></p></li><li><p><code>location::Location</code></p></li><li><p><code>n_pmts::Int8</code></p></li><li><p><code>pmts::Vector{PMT}</code></p></li><li><p><code>q::Union{Missing, Quaternion{Float64}}</code></p></li><li><p><code>status::Int32</code></p></li><li><p><code>tâ‚€::Float64</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL41">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Detector" href="#KM3io.Detector"><code>KM3io.Detector</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Detector</code></pre><p>A KM3NeT detector.</p><p><strong>Fields</strong></p><ul><li><p><code>version::Int8</code></p></li><li><p><code>id::Int32</code></p></li><li><p><code>validity::Union{Missing, KM3io.DateRange}</code></p></li><li><p><code>pos::Union{Missing, UTMPosition{Float64}}</code></p></li><li><p><code>utm_ref_grid::Union{Missing, String}</code></p></li><li><p><code>n_modules::Int32</code></p></li><li><p><code>modules::Dict{Int32, DetectorModule}</code></p></li><li><p><code>locations::Dict{Tuple{Int64, Int64}, DetectorModule}</code></p></li><li><p><code>strings::Vector{Int64}</code></p></li><li><p><code>comments::Vector{String}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL263">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.modules" href="#KM3io.modules"><code>KM3io.modules</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">modules(d::Detector) -> Vector{DetectorModule} +</code></pre><p>Return a vector of all modules of a given detector.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL279">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.getmodule" href="#KM3io.getmodule"><code>KM3io.getmodule</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">getmodule( d::Detector, string::Integer, floor::Integer ) -> DetectorModule -</code></pre><p>Return the detector module for a given string and floor.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL296">source</a></section><section><div><pre><code class="language-julia hljs">getmodule( +</code></pre><p>Return the detector module for a given string and floor.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL296">source</a></section><section><div><pre><code class="language-julia hljs">getmodule( d::Detector, loc::Tuple{T<:Integer, T<:Integer} ) -> DetectorModule -</code></pre><p>Return the detector module for a given string and floor (as <code>Tuple</code>).</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL300">source</a></section><section><div><pre><code class="language-julia hljs">getmodule(d::Detector, loc::Location) -> DetectorModule -</code></pre><p>Return the detector module for a given location.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL304">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.getpmt" href="#KM3io.getpmt"><code>KM3io.getpmt</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">getpmt(d::DetectorModule, channel_id::Integer) -> Any -</code></pre><p>Get the PMT for a given DAQ channel ID (TDC)</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL86">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.write-Tuple{AbstractString, Detector}" href="#Base.write-Tuple{AbstractString, Detector}"><code>Base.write</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">write(filename::AbstractString, d::Detector; version) -</code></pre><p>Writes the detector definition to a file, according to the DETX format specification. The <code>version</code> parameter can be a version number or <code>:same</code>, which is the default value and writes the same version as the provided detector has.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL557">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.write-Tuple{IO, Detector}" href="#Base.write-Tuple{IO, Detector}"><code>Base.write</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">write(io::IO, d::Detector; version) -</code></pre><pre><code class="nohighlight hljs">function write(io::IO, d::Detector; version=:same)</code></pre><p>Writes the detector to a DETX formatted file. The target version can be specified via the <code>version</code> keyword. Note that if converting to higher versions, missing parameters will be filled with reasonable default values. In case of downgrading, information will be lost.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL573">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Hydrophone" href="#KM3io.Hydrophone"><code>KM3io.Hydrophone</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Hydrophone</code></pre><p>A hydrophone, typically installed in the base module of a KM3NeT detector's string.</p><p><strong>Fields</strong></p><ul><li><p><code>location::Location</code></p></li><li><p><code>pos::Position{Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL137">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.read-Tuple{AbstractString, Type{Hydrophone}}" href="#Base.read-Tuple{AbstractString, Type{Hydrophone}}"><code>Base.read</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">read( +</code></pre><p>Return the detector module for a given string and floor (as <code>Tuple</code>).</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL300">source</a></section><section><div><pre><code class="language-julia hljs">getmodule(d::Detector, loc::Location) -> DetectorModule +</code></pre><p>Return the detector module for a given location.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL304">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.getpmt" href="#KM3io.getpmt"><code>KM3io.getpmt</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">getpmt(d::DetectorModule, channel_id::Integer) -> Any +</code></pre><p>Get the PMT for a given DAQ channel ID (TDC)</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL86">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.write-Tuple{AbstractString, Detector}" href="#Base.write-Tuple{AbstractString, Detector}"><code>Base.write</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">write(filename::AbstractString, d::Detector; version) +</code></pre><p>Writes the detector definition to a file, according to the DETX format specification. The <code>version</code> parameter can be a version number or <code>:same</code>, which is the default value and writes the same version as the provided detector has.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL557">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.write-Tuple{IO, Detector}" href="#Base.write-Tuple{IO, Detector}"><code>Base.write</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">write(io::IO, d::Detector; version) +</code></pre><pre><code class="nohighlight hljs">function write(io::IO, d::Detector; version=:same)</code></pre><p>Writes the detector to a DETX formatted file. The target version can be specified via the <code>version</code> keyword. Note that if converting to higher versions, missing parameters will be filled with reasonable default values. In case of downgrading, information will be lost.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL573">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Hydrophone" href="#KM3io.Hydrophone"><code>KM3io.Hydrophone</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Hydrophone</code></pre><p>A hydrophone, typically installed in the base module of a KM3NeT detector's string.</p><p><strong>Fields</strong></p><ul><li><p><code>location::Location</code></p></li><li><p><code>pos::Position{Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL137">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.read-Tuple{AbstractString, Type{Hydrophone}}" href="#Base.read-Tuple{AbstractString, Type{Hydrophone}}"><code>Base.read</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">read( filename::AbstractString, T::Type{Hydrophone} ) -> Vector{Hydrophone} -</code></pre><pre><code class="nohighlight hljs">function read(filename::AbstractString, T::Type{Hydrophone})</code></pre><p>Reads a vector of <code>Hydrophone</code>s from an ASCII file.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL146">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Tripod" href="#KM3io.Tripod"><code>KM3io.Tripod</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Tripod</code></pre><p>A tripod installed on the seabed which sends acoustic signals to modules.</p><p><strong>Fields</strong></p><ul><li><p><code>id::Int8</code></p></li><li><p><code>pos::Position{Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL164">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.read-Tuple{AbstractString, Type{Tripod}}" href="#Base.read-Tuple{AbstractString, Type{Tripod}}"><code>Base.read</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">read( +</code></pre><pre><code class="nohighlight hljs">function read(filename::AbstractString, T::Type{Hydrophone})</code></pre><p>Reads a vector of <code>Hydrophone</code>s from an ASCII file.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL146">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Tripod" href="#KM3io.Tripod"><code>KM3io.Tripod</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Tripod</code></pre><p>A tripod installed on the seabed which sends acoustic signals to modules.</p><p><strong>Fields</strong></p><ul><li><p><code>id::Int8</code></p></li><li><p><code>pos::Position{Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL164">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.read-Tuple{AbstractString, Type{Tripod}}" href="#Base.read-Tuple{AbstractString, Type{Tripod}}"><code>Base.read</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">read( filename::AbstractString, T::Type{Tripod} ) -> Vector{Tripod} -</code></pre><pre><code class="nohighlight hljs">function read(filename:AbstractString, T::Type{Tripod})</code></pre><p>Reads a vector of <code>Tripod</code>s from an ASCII file.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL171">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.write-Tuple{AbstractString, Vector{Tripod}}" href="#Base.write-Tuple{AbstractString, Vector{Tripod}}"><code>Base.write</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">write(filename::AbstractString, tripods::Vector{Tripod}) -</code></pre><pre><code class="nohighlight hljs">function write(filename::AbstractString, tripods::Dict{Int8, Tripod})</code></pre><p>Writes the position of tripods out into an ASCII file.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL189">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.piezoenabled" href="#KM3io.piezoenabled"><code>KM3io.piezoenabled</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">piezoenabled(m::DetectorModule) -> Bool -</code></pre><pre><code class="nohighlight hljs">function piezoenabled(m::DetectorModule)</code></pre><p>Return <code>true</code> if the piezo is enabled, <code>false</code> otherwise.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/acoustics.jl#LL47">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.hydrophoneenabled" href="#KM3io.hydrophoneenabled"><code>KM3io.hydrophoneenabled</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">hydrophoneenabled(m::DetectorModule) -> Bool -</code></pre><pre><code class="nohighlight hljs">function hydrophonenabled(m::DetectorModule)</code></pre><p>Return <code>true</code> if the hydrophone is enabled, <code>false</code> otherwise.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/acoustics.jl#LL54">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.center" href="#KM3io.center"><code>KM3io.center</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">center(m::DetectorModule) -> Position{Float64} -</code></pre><p>Calculate the centre of a module by fitting the crossing point of the PMT axes.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL91">source</a></section><section><div><pre><code class="language-julia hljs">center(d::Detector) -> Position{Float64} -</code></pre><p>Calculate the center of the detector based on the location of the optical modules.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL327">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.StringMechanics" href="#KM3io.StringMechanics"><code>KM3io.StringMechanics</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct StringMechanics</code></pre><p>A container structure which holds the mechanical model parameters for multiple strings, including a default value for strings which have specific parameters.</p><p><strong>Fields</strong></p><ul><li><p><code>default::StringMechanicsParameters</code></p></li><li><p><code>stringparams::Dict{Int64, StringMechanicsParameters}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL667">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.StringMechanicsParameters" href="#KM3io.StringMechanicsParameters"><code>KM3io.StringMechanicsParameters</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct StringMechanicsParameters</code></pre><p>Data structure for parameters of the mechanical model of strings. This data structure is used to calculate the effective height conform to the mechanical model of the string.</p><p><strong>Fields</strong></p><ul><li><p><code>a::Float64</code></p></li><li><p><code>b::Float64</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL655">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.read-Tuple{AbstractString, Type{StringMechanics}}" href="#Base.read-Tuple{AbstractString, Type{StringMechanics}}"><code>Base.read</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">read( +</code></pre><pre><code class="nohighlight hljs">function read(filename:AbstractString, T::Type{Tripod})</code></pre><p>Reads a vector of <code>Tripod</code>s from an ASCII file.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL171">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.write-Tuple{AbstractString, Vector{Tripod}}" href="#Base.write-Tuple{AbstractString, Vector{Tripod}}"><code>Base.write</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">write(filename::AbstractString, tripods::Vector{Tripod}) +</code></pre><pre><code class="nohighlight hljs">function write(filename::AbstractString, tripods::Dict{Int8, Tripod})</code></pre><p>Writes the position of tripods out into an ASCII file.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL189">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.piezoenabled" href="#KM3io.piezoenabled"><code>KM3io.piezoenabled</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">piezoenabled(m::DetectorModule) -> Bool +</code></pre><pre><code class="nohighlight hljs">function piezoenabled(m::DetectorModule)</code></pre><p>Return <code>true</code> if the piezo is enabled, <code>false</code> otherwise.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/acoustics.jl#LL47">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.hydrophoneenabled" href="#KM3io.hydrophoneenabled"><code>KM3io.hydrophoneenabled</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">hydrophoneenabled(m::DetectorModule) -> Bool +</code></pre><pre><code class="nohighlight hljs">function hydrophonenabled(m::DetectorModule)</code></pre><p>Return <code>true</code> if the hydrophone is enabled, <code>false</code> otherwise.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/acoustics.jl#LL54">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.center" href="#KM3io.center"><code>KM3io.center</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">center(m::DetectorModule) -> Position{Float64} +</code></pre><p>Calculate the centre of a module by fitting the crossing point of the PMT axes.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL91">source</a></section><section><div><pre><code class="language-julia hljs">center(d::Detector) -> Position{Float64} +</code></pre><p>Calculate the center of the detector based on the location of the optical modules.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL327">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.StringMechanics" href="#KM3io.StringMechanics"><code>KM3io.StringMechanics</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct StringMechanics</code></pre><p>A container structure which holds the mechanical model parameters for multiple strings, including a default value for strings which have specific parameters.</p><p><strong>Fields</strong></p><ul><li><p><code>default::StringMechanicsParameters</code></p></li><li><p><code>stringparams::Dict{Int64, StringMechanicsParameters}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL667">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.StringMechanicsParameters" href="#KM3io.StringMechanicsParameters"><code>KM3io.StringMechanicsParameters</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct StringMechanicsParameters</code></pre><p>Data structure for parameters of the mechanical model of strings. This data structure is used to calculate the effective height conform to the mechanical model of the string.</p><p><strong>Fields</strong></p><ul><li><p><code>a::Float64</code></p></li><li><p><code>b::Float64</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL655">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.read-Tuple{AbstractString, Type{StringMechanics}}" href="#Base.read-Tuple{AbstractString, Type{StringMechanics}}"><code>Base.read</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">read( filename::AbstractString, T::Type{StringMechanics} ) -> StringMechanics -</code></pre><p>Reads the mechanical models from a text file.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL680">source</a></section></article><h2 id="Optical-Data"><a class="docs-heading-anchor" href="#Optical-Data">Optical Data</a><a id="Optical-Data-1"></a><a class="docs-heading-anchor-permalink" href="#Optical-Data" title="Permalink"></a></h2><h2 id="Acoustics"><a class="docs-heading-anchor" href="#Acoustics">Acoustics</a><a id="Acoustics-1"></a><a class="docs-heading-anchor-permalink" href="#Acoustics" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Waveform" href="#KM3io.Waveform"><code>KM3io.Waveform</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Waveform</code></pre><p>Waveform translates Emitter ID to Tripod ID.</p><p><strong>Fields</strong></p><ul><li><code>ids::Dict{Int8, Int8}</code></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL208">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.read-Tuple{AbstractString, Type{Waveform}}" href="#Base.read-Tuple{AbstractString, Type{Waveform}}"><code>Base.read</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">read( +</code></pre><p>Reads the mechanical models from a text file.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL680">source</a></section></article><h2 id="Optical-Data"><a class="docs-heading-anchor" href="#Optical-Data">Optical Data</a><a id="Optical-Data-1"></a><a class="docs-heading-anchor-permalink" href="#Optical-Data" title="Permalink"></a></h2><h2 id="Acoustics"><a class="docs-heading-anchor" href="#Acoustics">Acoustics</a><a id="Acoustics-1"></a><a class="docs-heading-anchor-permalink" href="#Acoustics" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.Waveform" href="#KM3io.Waveform"><code>KM3io.Waveform</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct Waveform</code></pre><p>Waveform translates Emitter ID to Tripod ID.</p><p><strong>Fields</strong></p><ul><li><code>ids::Dict{Int8, Int8}</code></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL208">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.read-Tuple{AbstractString, Type{Waveform}}" href="#Base.read-Tuple{AbstractString, Type{Waveform}}"><code>Base.read</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">read( filename::AbstractString, T::Type{Waveform} ) -> Waveform -</code></pre><pre><code class="nohighlight hljs">function read(filename::AbstractString, T::Type{Waveform})</code></pre><p>Reads the waveform ASCII file.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL214">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.AcousticSignal" href="#KM3io.AcousticSignal"><code>KM3io.AcousticSignal</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct AcousticSignal</code></pre><p>AcousticSignal is a custom type with four fields to store all the information inside the raw acoustic binary files.</p><ul><li>dom_id::Int32 ID of the module</li><li>utc_seconds:: UInt32 storing the first 4 Bytes and is a UNIX time stamp</li><li>ns_cycles:: UInt32 storing the second 4 Bytes</li><li>samples:: UInt32 storing the third 4 Bytes, corresponding to the number of data points accuired during the measring window</li><li>pcm:: Vector of Float32 of length frame_length, storing all other 4 Byte blocks. Each entry is a data point of the acoustic signal.</li></ul><p><strong>Fields</strong></p><ul><li><p><code>dom_id::Int32</code></p></li><li><p><code>utc_seconds::UInt32</code></p></li><li><p><code>ns_cycles::UInt32</code></p></li><li><p><code>samples::UInt32</code></p></li><li><p><code>pcm::Vector{Float32}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/acoustics.jl#LL8">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.AcousticsTriggerParameter" href="#KM3io.AcousticsTriggerParameter"><code>KM3io.AcousticsTriggerParameter</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct AcousticsTriggerParameter</code></pre><p>Certain parameters which define an acoustic event.</p><p><strong>Fields</strong></p><ul><li><p><code>q::Float64</code></p></li><li><p><code>tmax::Float64</code></p></li><li><p><code>nmin::Int32</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL235">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.read-Tuple{AbstractString, Type{AcousticsTriggerParameter}}" href="#Base.read-Tuple{AbstractString, Type{AcousticsTriggerParameter}}"><code>Base.read</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">read( +</code></pre><pre><code class="nohighlight hljs">function read(filename::AbstractString, T::Type{Waveform})</code></pre><p>Reads the waveform ASCII file.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL214">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.AcousticSignal" href="#KM3io.AcousticSignal"><code>KM3io.AcousticSignal</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct AcousticSignal</code></pre><p>AcousticSignal is a custom type with four fields to store all the information inside the raw acoustic binary files.</p><ul><li>dom_id::Int32 ID of the module</li><li>utc_seconds:: UInt32 storing the first 4 Bytes and is a UNIX time stamp</li><li>ns_cycles:: UInt32 storing the second 4 Bytes</li><li>samples:: UInt32 storing the third 4 Bytes, corresponding to the number of data points accuired during the measring window</li><li>pcm:: Vector of Float32 of length frame_length, storing all other 4 Byte blocks. Each entry is a data point of the acoustic signal.</li></ul><p><strong>Fields</strong></p><ul><li><p><code>dom_id::Int32</code></p></li><li><p><code>utc_seconds::UInt32</code></p></li><li><p><code>ns_cycles::UInt32</code></p></li><li><p><code>samples::UInt32</code></p></li><li><p><code>pcm::Vector{Float32}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/acoustics.jl#LL8">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.AcousticsTriggerParameter" href="#KM3io.AcousticsTriggerParameter"><code>KM3io.AcousticsTriggerParameter</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct AcousticsTriggerParameter</code></pre><p>Certain parameters which define an acoustic event.</p><p><strong>Fields</strong></p><ul><li><p><code>q::Float64</code></p></li><li><p><code>tmax::Float64</code></p></li><li><p><code>nmin::Int32</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL235">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.read-Tuple{AbstractString, Type{AcousticsTriggerParameter}}" href="#Base.read-Tuple{AbstractString, Type{AcousticsTriggerParameter}}"><code>Base.read</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">read( filename::AbstractString, T::Type{AcousticsTriggerParameter} ) -> AcousticsTriggerParameter -</code></pre><pre><code class="nohighlight hljs">function read(filename::AbstractString, T::Type{AcousticsTriggerParameter})</code></pre><p>Reads the 'acoustics<em>trigger</em>parameters.txt' file.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/hardware.jl#LL243">source</a></section></article><h2 id="Calibration"><a class="docs-heading-anchor" href="#Calibration">Calibration</a><a id="Calibration-1"></a><a class="docs-heading-anchor-permalink" href="#Calibration" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.calibrate" href="#KM3io.calibrate"><code>KM3io.calibrate</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">calibrate(det::Detector, hits) -> Vector{XCalibratedHit} -</code></pre><p>Apply geometry and time calibration to given hits.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/calibration.jl#LL1">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.combine" href="#KM3io.combine"><code>KM3io.combine</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">combine( +</code></pre><pre><code class="nohighlight hljs">function read(filename::AbstractString, T::Type{AcousticsTriggerParameter})</code></pre><p>Reads the 'acoustics<em>trigger</em>parameters.txt' file.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/hardware.jl#LL243">source</a></section></article><h2 id="Calibration"><a class="docs-heading-anchor" href="#Calibration">Calibration</a><a id="Calibration-1"></a><a class="docs-heading-anchor-permalink" href="#Calibration" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.calibrate" href="#KM3io.calibrate"><code>KM3io.calibrate</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">calibrate(det::Detector, hits) -> Vector{XCalibratedHit} +</code></pre><p>Apply geometry and time calibration to given hits.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/calibration.jl#LL1">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.combine" href="#KM3io.combine"><code>KM3io.combine</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">combine( snapshot_hits::Vector{SnapshotHit}, triggered_hits::Vector{TriggeredHit} ) -> Vector{TriggeredHit} -</code></pre><p>Combine snapshot and triggered hits to a single hits-vector.</p><p>This should be used to transfer the trigger information to the snapshot hits from a DAQEvent. The triggered hits are a subset of the snapshot hits.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/calibration.jl#LL28">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.floordist" href="#KM3io.floordist"><code>KM3io.floordist</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">floordist(det::Detector) -> Float64 -</code></pre><p>Calculates the average floor distance between neighboured modules.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/calibration.jl#LL55">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.slew" href="#KM3io.slew"><code>KM3io.slew</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">slew(tot::Integer) -> Any -</code></pre><p>Return the time slewing for a ToT.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/calibration.jl#LL69">source</a></section></article><h2 id="Physics"><a class="docs-heading-anchor" href="#Physics">Physics</a><a id="Physics-1"></a><a class="docs-heading-anchor-permalink" href="#Physics" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.azimuth" href="#KM3io.azimuth"><code>KM3io.azimuth</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">azimuth(d::Direction) -> Any -</code></pre><p>Calculates the azimuth from a given <a href="#KM3io.Direction"><code>Direction</code></a> according to KM3NeT conventions.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/physics.jl#LL54">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.zenith" href="#KM3io.zenith"><code>KM3io.zenith</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">zenith(d::Direction) -> Any -</code></pre><p>Calculates the zenith from a given <a href="#KM3io.Direction"><code>Direction</code></a> according to KM3NeT conventions.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/physics.jl#LL61">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.phi" href="#KM3io.phi"><code>KM3io.phi</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">phi(d::Direction) -> Any -</code></pre><p>Calculate the phi angle for a given direction</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/physics.jl#LL77">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.theta" href="#KM3io.theta"><code>KM3io.theta</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">theta(d::Direction) -> Any -</code></pre><p>Calculate the theta angle for a given direction</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/physics.jl#LL68">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.cherenkov" href="#KM3io.cherenkov"><code>KM3io.cherenkov</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">cherenkov( +</code></pre><p>Combine snapshot and triggered hits to a single hits-vector.</p><p>This should be used to transfer the trigger information to the snapshot hits from a DAQEvent. The triggered hits are a subset of the snapshot hits.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/calibration.jl#LL28">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.floordist" href="#KM3io.floordist"><code>KM3io.floordist</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">floordist(det::Detector) -> Float64 +</code></pre><p>Calculates the average floor distance between neighboured modules.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/calibration.jl#LL55">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.slew" href="#KM3io.slew"><code>KM3io.slew</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">slew(tot::Integer) -> Any +</code></pre><p>Return the time slewing for a ToT.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/calibration.jl#LL69">source</a></section></article><h2 id="Physics"><a class="docs-heading-anchor" href="#Physics">Physics</a><a id="Physics-1"></a><a class="docs-heading-anchor-permalink" href="#Physics" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.azimuth" href="#KM3io.azimuth"><code>KM3io.azimuth</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">azimuth(d::Direction) -> Any +</code></pre><p>Calculates the azimuth from a given <a href="#KM3io.Direction"><code>Direction</code></a> according to KM3NeT conventions.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/physics.jl#LL54">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.zenith" href="#KM3io.zenith"><code>KM3io.zenith</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">zenith(d::Direction) -> Any +</code></pre><p>Calculates the zenith from a given <a href="#KM3io.Direction"><code>Direction</code></a> according to KM3NeT conventions.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/physics.jl#LL61">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.phi" href="#KM3io.phi"><code>KM3io.phi</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">phi(d::Direction) -> Any +</code></pre><p>Calculate the phi angle for a given direction</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/physics.jl#LL77">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.theta" href="#KM3io.theta"><code>KM3io.theta</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">theta(d::Direction) -> Any +</code></pre><p>Calculate the theta angle for a given direction</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/physics.jl#LL68">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.cherenkov" href="#KM3io.cherenkov"><code>KM3io.cherenkov</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">cherenkov( track, hits::Array{T<:AbstractCalibratedHit, 1} ) -> Any -</code></pre><p>Calculates the parameters of cherenkov photons emitted from a track and hitting the PMTs represented as (calibrated) hits. The returned cherenkov photons hold information about the closest distance to track, the time residual, arrival time, impact angle, photon travel distance, track travel distance and photon travel direction. See <a href="#KM3io.CherenkovPhoton"><code>CherenkovPhoton</code></a> for more information.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/physics.jl#LL18">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.CherenkovPhoton" href="#KM3io.CherenkovPhoton"><code>KM3io.CherenkovPhoton</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct CherenkovPhoton</code></pre><p>A Cherenkov photon with parameters calculated from its inducing track. See <a href="#KM3io.cherenkov"><code>cherenkov()</code></a> for more information.</p><p><strong>Fields</strong></p><ul><li><p><code>d_closest::Float64</code></p></li><li><p><code>d_photon::Float64</code></p></li><li><p><code>d_track::Float64</code></p></li><li><p><code>t::Float64</code></p></li><li><p><code>Δt::Float64</code></p></li><li><p><code>impact_angle::Float64</code></p></li><li><p><code>dir::Direction{Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/physics.jl#LL1">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.K40Rates" href="#KM3io.K40Rates"><code>KM3io.K40Rates</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct K40Rates</code></pre><p>K40 rates with L0 and higher level rates (with increasing multiplicities).</p><p><strong>Fields</strong></p><ul><li><p><code>L0::Float64</code></p></li><li><p><code>L1::Vector{Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/physics.jl#LL83">source</a></section></article><h2 id="Trigger"><a class="docs-heading-anchor" href="#Trigger">Trigger</a><a id="Trigger-1"></a><a class="docs-heading-anchor-permalink" href="#Trigger" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.triggered" href="#KM3io.triggered"><code>KM3io.triggered</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">triggered(e) -> Vector -</code></pre><p>Return <code>true</code> if the passed object (hit, event, ...) was triggered by any trigger algorithm.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/trigger.jl#LL1">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.is3dmuon" href="#KM3io.is3dmuon"><code>KM3io.is3dmuon</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">is3dmuon(e::DAQEvent) -> Bool -</code></pre><pre><code class="language-julia hljs">is3dmuon(e)</code></pre><p>defined at <a href="https://github.com//tree/8caed419168cd1dd520264bc70b986191c3f52a7//src/tools/trigger.jl#L12"><code>/builds/common/KM3io.jl/src/tools/trigger.jl:12</code></a>.</p><p>Return <code>true</code> the 3D Muon trigger bit is set.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/trigger.jl#LL7-L11">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.is3dshower" href="#KM3io.is3dshower"><code>KM3io.is3dshower</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">is3dshower(e::DAQEvent) -> Bool -</code></pre><pre><code class="language-julia hljs">is3dshower(e)</code></pre><p>defined at <a href="https://github.com//tree/8caed419168cd1dd520264bc70b986191c3f52a7//src/tools/trigger.jl#L20"><code>/builds/common/KM3io.jl/src/tools/trigger.jl:20</code></a>.</p><p>Return <code>true</code> if the 3D Shower trigger bit is set.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/trigger.jl#LL15-L19">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.ismxshower" href="#KM3io.ismxshower"><code>KM3io.ismxshower</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">ismxshower(x) -> Bool -</code></pre><pre><code class="language-julia hljs">ismxshower(x)</code></pre><p>defined at <a href="https://github.com//tree/8caed419168cd1dd520264bc70b986191c3f52a7//src/tools/trigger.jl#L28"><code>/builds/common/KM3io.jl/src/tools/trigger.jl:28</code></a>.</p><pre><code class="language-julia hljs">ismxshower(e)</code></pre><p>defined at <a href="https://github.com//tree/8caed419168cd1dd520264bc70b986191c3f52a7//src/tools/trigger.jl#L29"><code>/builds/common/KM3io.jl/src/tools/trigger.jl:29</code></a>.</p><p>Return <code>true</code> if the MX Shower trigger bit is set.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/trigger.jl#LL23-L27">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.isnb" href="#KM3io.isnb"><code>KM3io.isnb</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">isnb(x) -> Bool -</code></pre><pre><code class="language-julia hljs">isnb(x)</code></pre><p>defined at <a href="https://github.com//tree/8caed419168cd1dd520264bc70b986191c3f52a7//src/tools/trigger.jl#L36"><code>/builds/common/KM3io.jl/src/tools/trigger.jl:36</code></a>.</p><pre><code class="language-julia hljs">isnb(e)</code></pre><p>defined at <a href="https://github.com//tree/8caed419168cd1dd520264bc70b986191c3f52a7//src/tools/trigger.jl#L37"><code>/builds/common/KM3io.jl/src/tools/trigger.jl:37</code></a>.</p><p>Return <code>true</code> if the NanoBeacon trigger bit is set.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/trigger.jl#LL31-L35">source</a></section></article><h2 id="ControlHost"><a class="docs-heading-anchor" href="#ControlHost">ControlHost</a><a id="ControlHost-1"></a><a class="docs-heading-anchor-permalink" href="#ControlHost" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.CHClient" href="#KM3io.CHClient"><code>KM3io.CHClient</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct CHClient{T}</code></pre><p>A ControlHost client which can communicate with a Ligier dispatcher to receive messages for all the subscribed tags.</p><p>To connect to a Ligier which is receiving triggered DAQ events e.g. in the KM3NeT monitoring system or in a test setup consisting of a <a href="https://common.pages.km3net.de/jpp/#JLigier">JLigier</a> dispatcher and a <a href="https://common.pages.km3net.de/jpp/#JRegurgitate">JRegurgitate</a> instance which is redispatching DAQ events (<code>JDAQEvent</code>) from a ROOT file in online format to the <code>JLigier</code>, a <code>CHClient</code> can be created to subscribe the event messages with</p><pre><code class="language-julia-repl hljs">julia> using KM3io +</code></pre><p>Calculates the parameters of cherenkov photons emitted from a track and hitting the PMTs represented as (calibrated) hits. The returned cherenkov photons hold information about the closest distance to track, the time residual, arrival time, impact angle, photon travel distance, track travel distance and photon travel direction. See <a href="#KM3io.CherenkovPhoton"><code>CherenkovPhoton</code></a> for more information.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/physics.jl#LL18">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.CherenkovPhoton" href="#KM3io.CherenkovPhoton"><code>KM3io.CherenkovPhoton</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct CherenkovPhoton</code></pre><p>A Cherenkov photon with parameters calculated from its inducing track. See <a href="#KM3io.cherenkov"><code>cherenkov()</code></a> for more information.</p><p><strong>Fields</strong></p><ul><li><p><code>d_closest::Float64</code></p></li><li><p><code>d_photon::Float64</code></p></li><li><p><code>d_track::Float64</code></p></li><li><p><code>t::Float64</code></p></li><li><p><code>Δt::Float64</code></p></li><li><p><code>impact_angle::Float64</code></p></li><li><p><code>dir::Direction{Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/physics.jl#LL1">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.K40Rates" href="#KM3io.K40Rates"><code>KM3io.K40Rates</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct K40Rates</code></pre><p>K40 rates with L0 and higher level rates (with increasing multiplicities).</p><p><strong>Fields</strong></p><ul><li><p><code>L0::Float64</code></p></li><li><p><code>L1::Vector{Float64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/physics.jl#LL83">source</a></section></article><h2 id="Trigger"><a class="docs-heading-anchor" href="#Trigger">Trigger</a><a id="Trigger-1"></a><a class="docs-heading-anchor-permalink" href="#Trigger" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.triggered" href="#KM3io.triggered"><code>KM3io.triggered</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">triggered(e) -> Vector +</code></pre><p>Return <code>true</code> if the passed object (hit, event, ...) was triggered by any trigger algorithm.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/trigger.jl#LL1">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.is3dmuon" href="#KM3io.is3dmuon"><code>KM3io.is3dmuon</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">is3dmuon(e::DAQEvent) -> Bool +</code></pre><pre><code class="language-julia hljs">is3dmuon(e)</code></pre><p>defined at <a href="https://github.com//tree/9bb3c02c219c2c0c288233fdce775a4de9d3ac29//src/tools/trigger.jl#L12"><code>/builds/common/KM3io.jl/src/tools/trigger.jl:12</code></a>.</p><p>Return <code>true</code> the 3D Muon trigger bit is set.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/trigger.jl#LL7-L11">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.is3dshower" href="#KM3io.is3dshower"><code>KM3io.is3dshower</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">is3dshower(e::DAQEvent) -> Bool +</code></pre><pre><code class="language-julia hljs">is3dshower(e)</code></pre><p>defined at <a href="https://github.com//tree/9bb3c02c219c2c0c288233fdce775a4de9d3ac29//src/tools/trigger.jl#L20"><code>/builds/common/KM3io.jl/src/tools/trigger.jl:20</code></a>.</p><p>Return <code>true</code> if the 3D Shower trigger bit is set.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/trigger.jl#LL15-L19">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.ismxshower" href="#KM3io.ismxshower"><code>KM3io.ismxshower</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">ismxshower(x) -> Bool +</code></pre><pre><code class="language-julia hljs">ismxshower(x)</code></pre><p>defined at <a href="https://github.com//tree/9bb3c02c219c2c0c288233fdce775a4de9d3ac29//src/tools/trigger.jl#L28"><code>/builds/common/KM3io.jl/src/tools/trigger.jl:28</code></a>.</p><pre><code class="language-julia hljs">ismxshower(e)</code></pre><p>defined at <a href="https://github.com//tree/9bb3c02c219c2c0c288233fdce775a4de9d3ac29//src/tools/trigger.jl#L29"><code>/builds/common/KM3io.jl/src/tools/trigger.jl:29</code></a>.</p><p>Return <code>true</code> if the MX Shower trigger bit is set.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/trigger.jl#LL23-L27">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.isnb" href="#KM3io.isnb"><code>KM3io.isnb</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">isnb(x) -> Bool +</code></pre><pre><code class="language-julia hljs">isnb(x)</code></pre><p>defined at <a href="https://github.com//tree/9bb3c02c219c2c0c288233fdce775a4de9d3ac29//src/tools/trigger.jl#L36"><code>/builds/common/KM3io.jl/src/tools/trigger.jl:36</code></a>.</p><pre><code class="language-julia hljs">isnb(e)</code></pre><p>defined at <a href="https://github.com//tree/9bb3c02c219c2c0c288233fdce775a4de9d3ac29//src/tools/trigger.jl#L37"><code>/builds/common/KM3io.jl/src/tools/trigger.jl:37</code></a>.</p><p>Return <code>true</code> if the NanoBeacon trigger bit is set.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/trigger.jl#LL31-L35">source</a></section></article><h2 id="ControlHost"><a class="docs-heading-anchor" href="#ControlHost">ControlHost</a><a id="ControlHost-1"></a><a class="docs-heading-anchor-permalink" href="#ControlHost" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.CHClient" href="#KM3io.CHClient"><code>KM3io.CHClient</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct CHClient{T}</code></pre><p>A ControlHost client which can communicate with a Ligier dispatcher to receive messages for all the subscribed tags.</p><p>To connect to a Ligier which is receiving triggered DAQ events e.g. in the KM3NeT monitoring system or in a test setup consisting of a <a href="https://common.pages.km3net.de/jpp/#JLigier">JLigier</a> dispatcher and a <a href="https://common.pages.km3net.de/jpp/#JRegurgitate">JRegurgitate</a> instance which is redispatching DAQ events (<code>JDAQEvent</code>) from a ROOT file in online format to the <code>JLigier</code>, a <code>CHClient</code> can be created to subscribe the event messages with</p><pre><code class="language-julia-repl hljs">julia> using KM3io julia> c = CHClient{DAQEvent}(ip"127.0.0.1", 5553) @@ -82,7 +82,7 @@ e = KM3io.DAQEvent with 154 snapshot and 8 triggered hits e = KM3io.DAQEvent with 152 snapshot and 6 triggered hits ... ... -...</code></pre><p><strong>Fields</strong></p><ul><li><p><code>ip::Sockets.IPv4</code></p></li><li><p><code>port::UInt16</code></p></li><li><p><code>tags::Vector{CHTag}</code></p></li><li><p><code>socket::Sockets.TCPSocket</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/controlhost.jl#LL57">source</a></section></article><h2 id="Tools"><a class="docs-heading-anchor" href="#Tools">Tools</a><a id="Tools-1"></a><a class="docs-heading-anchor-permalink" href="#Tools" title="Permalink"></a></h2><h3 id="General-tools"><a class="docs-heading-anchor" href="#General-tools">General tools</a><a id="General-tools-1"></a><a class="docs-heading-anchor-permalink" href="#General-tools" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.categorize" href="#KM3io.categorize"><code>KM3io.categorize</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">categorize(field::Symbol, elements::Vector) -> Dict +...</code></pre><p><strong>Fields</strong></p><ul><li><p><code>ip::Sockets.IPv4</code></p></li><li><p><code>port::UInt16</code></p></li><li><p><code>tags::Vector{CHTag}</code></p></li><li><p><code>socket::Sockets.TCPSocket</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/controlhost.jl#LL57">source</a></section></article><h2 id="Tools"><a class="docs-heading-anchor" href="#Tools">Tools</a><a id="Tools-1"></a><a class="docs-heading-anchor-permalink" href="#Tools" title="Permalink"></a></h2><h3 id="General-tools"><a class="docs-heading-anchor" href="#General-tools">General tools</a><a id="General-tools-1"></a><a class="docs-heading-anchor-permalink" href="#General-tools" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.categorize" href="#KM3io.categorize"><code>KM3io.categorize</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">categorize(field::Symbol, elements::Vector) -> Dict </code></pre><p>Categorise the struct elements of a vector by a given field into a dictionary of <code>T.field => Vector{T}</code>.</p><p><strong>Examples</strong></p><pre><code class="nohighlight hljs">julia> using KM3io julia> struct PMT # just an ad-hoc PMT struct for demonstration purposes @@ -95,41 +95,41 @@ julia> pmts = [PMT(2, 10.4), PMT(4, 23.5), PMT(2, 42.0)]; julia> categorize(:dom_id, pmts) Dict{Any, Vector{PMT}} with 2 entries: 4 => [PMT(4, 23.5)] - 2 => [PMT(2, 10.4), PMT(2, 42.0)]</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/general.jl#LL56">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.nthbitset" href="#KM3io.nthbitset"><code>KM3io.nthbitset</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">nthbitset(n, a) -> Any -</code></pre><p>Return <code>true</code> if the n-th bit of <code>a</code> is set, <code>false</code> otherwise.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/general.jl#LL1">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.most_frequent" href="#KM3io.most_frequent"><code>KM3io.most_frequent</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">most_frequent(iterable) -> Any -</code></pre><p>Return the most frequent value of a given iterable.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/general.jl#LL7">source</a></section><section><div><pre><code class="language-julia hljs">most_frequent(f::Function, iterable; rettype) -> Int64 -</code></pre><p>Return the most frequent value of a given iterable based on the return value of a function <code>f</code> which returns (hashable) values of <code>rettype</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/general.jl#LL30">source</a></section></article><h3 id="DAQ"><a class="docs-heading-anchor" href="#DAQ">DAQ</a><a id="DAQ-1"></a><a class="docs-heading-anchor-permalink" href="#DAQ" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.pmtrate" href="#KM3io.pmtrate"><code>KM3io.pmtrate</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">pmtrate(r::UInt8) -> Float64 -</code></pre><p>Calculate the PMT hit rate from the raw byte stored in a summary frame.</p><p>The rate of each PMT is encoded in a single byte to reduce the size of the summary frame, therefore only 256 values are possible which are mapped to an exponential function. The values are precalculated by the <code>_getrate()</code> function for the best performance.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL6">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.pmtrates" href="#KM3io.pmtrates"><code>KM3io.pmtrates</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">pmtrates( + 2 => [PMT(2, 10.4), PMT(2, 42.0)]</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/general.jl#LL56">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.nthbitset" href="#KM3io.nthbitset"><code>KM3io.nthbitset</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">nthbitset(n, a) -> Any +</code></pre><p>Return <code>true</code> if the n-th bit of <code>a</code> is set, <code>false</code> otherwise.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/general.jl#LL1">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.most_frequent" href="#KM3io.most_frequent"><code>KM3io.most_frequent</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">most_frequent(iterable) -> Any +</code></pre><p>Return the most frequent value of a given iterable.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/general.jl#LL7">source</a></section><section><div><pre><code class="language-julia hljs">most_frequent(f::Function, iterable; rettype) -> Int64 +</code></pre><p>Return the most frequent value of a given iterable based on the return value of a function <code>f</code> which returns (hashable) values of <code>rettype</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/general.jl#LL30">source</a></section></article><h3 id="DAQ"><a class="docs-heading-anchor" href="#DAQ">DAQ</a><a id="DAQ-1"></a><a class="docs-heading-anchor-permalink" href="#DAQ" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.pmtrate" href="#KM3io.pmtrate"><code>KM3io.pmtrate</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">pmtrate(r::UInt8) -> Float64 +</code></pre><p>Calculate the PMT hit rate from the raw byte stored in a summary frame.</p><p>The rate of each PMT is encoded in a single byte to reduce the size of the summary frame, therefore only 256 values are possible which are mapped to an exponential function. The values are precalculated by the <code>_getrate()</code> function for the best performance.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL6">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.pmtrates" href="#KM3io.pmtrates"><code>KM3io.pmtrates</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">pmtrates( s::SummaryFrame ) -> StaticArraysCore.SVector{31, Float64} -</code></pre><p>Return the actual rates (in Hz) for each PMT in a summary frame.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL19">source</a></section><section><div><pre><code class="language-julia hljs">pmtrates( +</code></pre><p>Return the actual rates (in Hz) for each PMT in a summary frame.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL19">source</a></section><section><div><pre><code class="language-julia hljs">pmtrates( s::Summaryslice ) -> Dict{Int32, StaticArraysCore.SVector{31, Float64}} -</code></pre><p>Return a dictionary of DOM IDs as keys and PMT rates [Hz] as values (<code>Vector{Float64}</code>).</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL26">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.hrvstatus" href="#KM3io.hrvstatus"><code>KM3io.hrvstatus</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">hrvstatus(f::SummaryFrame, tdc) -> Any -</code></pre><p>Return <code>true</code> if the TDC is in high rate veto.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL35">source</a></section><section><div><pre><code class="language-julia hljs">hrvstatus(f::SummaryFrame) -> Bool -</code></pre><p>Return <code>true</code> if any of the TDCs is in high rate veto.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL42">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.fifostatus" href="#KM3io.fifostatus"><code>KM3io.fifostatus</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">fifostatus(f::SummaryFrame, tdc) -> Any -</code></pre><p>Return <code>true</code> if the TDC has FIFO almost full.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL63">source</a></section><section><div><pre><code class="language-julia hljs">fifostatus(f::SummaryFrame) -> Bool -</code></pre><p>Return <code>true</code> if any of the TDCs is in high rate veto.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL70">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.tdcstatus" href="#KM3io.tdcstatus"><code>KM3io.tdcstatus</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">tdcstatus(f::SummaryFrame) -> Bool -</code></pre><p>Return <code>true</code> if TDC status is OK.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL49">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.wrstatus" href="#KM3io.wrstatus"><code>KM3io.wrstatus</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">wrstatus(f::SummaryFrame) -> Bool -</code></pre><p>Return <code>true</code> if White Rabbit status is OK.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL56">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.hasudptrailer" href="#KM3io.hasudptrailer"><code>KM3io.hasudptrailer</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">hasudptrailer(f::SummaryFrame) -> Bool -</code></pre><p>Return <code>true</code> if the UDP trailer is present.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL77">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.count_active_channels" href="#KM3io.count_active_channels"><code>KM3io.count_active_channels</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">count_active_channels(f::SummaryFrame) -> Int64 -</code></pre><p>Number of TDCs without high rate veto or FIFO almost full.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL84">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.count_fifostatus" href="#KM3io.count_fifostatus"><code>KM3io.count_fifostatus</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">count_fifostatus(f::SummaryFrame) -> Int64 -</code></pre><p>Number of TDCs with FIFO almost full.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL100">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.count_hrvstatus" href="#KM3io.count_hrvstatus"><code>KM3io.count_hrvstatus</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">count_hrvstatus(f::SummaryFrame) -> Int64 -</code></pre><p>Number of TDCs with high rate veto.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL116">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.status" href="#KM3io.status"><code>KM3io.status</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">status(f::SummaryFrame) -> Bool -</code></pre><p>Return <code>true</code> if TDC and White Rabbit status are OK.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL132">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.number_of_udp_packets_received" href="#KM3io.number_of_udp_packets_received"><code>KM3io.number_of_udp_packets_received</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">number_of_udp_packets_received(f::SummaryFrame) -> Int32 -</code></pre><p>Number of received UDP packets (excluding the trailer).</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL147">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.maximal_udp_sequence_number" href="#KM3io.maximal_udp_sequence_number"><code>KM3io.maximal_udp_sequence_number</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">maximal_udp_sequence_number(f::SummaryFrame) -> Int32 -</code></pre><p>Maximal sequence number of all received UDP packets.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/daq.jl#LL140">source</a></section></article><h3 id="Reconstruction"><a class="docs-heading-anchor" href="#Reconstruction">Reconstruction</a><a id="Reconstruction-1"></a><a class="docs-heading-anchor-permalink" href="#Reconstruction" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.besttrack" href="#KM3io.besttrack"><code>KM3io.besttrack</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">besttrack( +</code></pre><p>Return a dictionary of DOM IDs as keys and PMT rates [Hz] as values (<code>Vector{Float64}</code>).</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL26">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.hrvstatus" href="#KM3io.hrvstatus"><code>KM3io.hrvstatus</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">hrvstatus(f::SummaryFrame, tdc) -> Any +</code></pre><p>Return <code>true</code> if the TDC is in high rate veto.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL35">source</a></section><section><div><pre><code class="language-julia hljs">hrvstatus(f::SummaryFrame) -> Bool +</code></pre><p>Return <code>true</code> if any of the TDCs is in high rate veto.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL42">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.fifostatus" href="#KM3io.fifostatus"><code>KM3io.fifostatus</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">fifostatus(f::SummaryFrame, tdc) -> Any +</code></pre><p>Return <code>true</code> if the TDC has FIFO almost full.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL63">source</a></section><section><div><pre><code class="language-julia hljs">fifostatus(f::SummaryFrame) -> Bool +</code></pre><p>Return <code>true</code> if any of the TDCs is in high rate veto.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL70">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.tdcstatus" href="#KM3io.tdcstatus"><code>KM3io.tdcstatus</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">tdcstatus(f::SummaryFrame) -> Bool +</code></pre><p>Return <code>true</code> if TDC status is OK.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL49">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.wrstatus" href="#KM3io.wrstatus"><code>KM3io.wrstatus</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">wrstatus(f::SummaryFrame) -> Bool +</code></pre><p>Return <code>true</code> if White Rabbit status is OK.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL56">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.hasudptrailer" href="#KM3io.hasudptrailer"><code>KM3io.hasudptrailer</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">hasudptrailer(f::SummaryFrame) -> Bool +</code></pre><p>Return <code>true</code> if the UDP trailer is present.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL77">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.count_active_channels" href="#KM3io.count_active_channels"><code>KM3io.count_active_channels</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">count_active_channels(f::SummaryFrame) -> Int64 +</code></pre><p>Number of TDCs without high rate veto or FIFO almost full.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL84">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.count_fifostatus" href="#KM3io.count_fifostatus"><code>KM3io.count_fifostatus</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">count_fifostatus(f::SummaryFrame) -> Int64 +</code></pre><p>Number of TDCs with FIFO almost full.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL100">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.count_hrvstatus" href="#KM3io.count_hrvstatus"><code>KM3io.count_hrvstatus</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">count_hrvstatus(f::SummaryFrame) -> Int64 +</code></pre><p>Number of TDCs with high rate veto.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL116">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.status" href="#KM3io.status"><code>KM3io.status</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">status(f::SummaryFrame) -> Bool +</code></pre><p>Return <code>true</code> if TDC and White Rabbit status are OK.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL132">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.number_of_udp_packets_received" href="#KM3io.number_of_udp_packets_received"><code>KM3io.number_of_udp_packets_received</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">number_of_udp_packets_received(f::SummaryFrame) -> Int32 +</code></pre><p>Number of received UDP packets (excluding the trailer).</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL147">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.maximal_udp_sequence_number" href="#KM3io.maximal_udp_sequence_number"><code>KM3io.maximal_udp_sequence_number</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">maximal_udp_sequence_number(f::SummaryFrame) -> Int32 +</code></pre><p>Maximal sequence number of all received UDP packets.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/daq.jl#LL140">source</a></section></article><h3 id="Reconstruction"><a class="docs-heading-anchor" href="#Reconstruction">Reconstruction</a><a id="Reconstruction-1"></a><a class="docs-heading-anchor-permalink" href="#Reconstruction" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.besttrack" href="#KM3io.besttrack"><code>KM3io.besttrack</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">besttrack( e::Evt, rec_type::Integer, rsr::RecStageRange ) -> Union{Missing, Trk} -</code></pre><p>Return the best reconstructed track for a given reconstruction type and reconstruction stage range. If no track could be found, <code>missing</code> is returned.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/reconstruction.jl#LL69">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.bestjppmuon" href="#KM3io.bestjppmuon"><code>KM3io.bestjppmuon</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">bestjppmuon(e::Evt) -> Union{Missing, Trk} -</code></pre><p>Returns the best reconstructed JMuon track of an event or <code>missing</code> if there are none.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/reconstruction.jl#LL89">source</a></section><section><div><pre><code class="language-julia hljs">bestjppmuon(trks::Vector{Trk}) -> Union{Missing, Trk} -</code></pre><p>Returns the best reconstructed JMuon track or <code>missing</code> if there are none.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/reconstruction.jl#LL93">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.bestjppshower" href="#KM3io.bestjppshower"><code>KM3io.bestjppshower</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">bestjppshower(e::Evt) -> Union{Missing, Trk} -</code></pre><p>Returns the best reconstructed JShower "track" of an event or <code>missing</code> if there are none.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/reconstruction.jl#LL97">source</a></section><section><div><pre><code class="language-julia hljs">bestjppshower(trks::Vector{Trk}) -> Union{Missing, Trk} -</code></pre><p>Returns the best reconstructed JShower "track" or <code>missing</code> if there are none.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/reconstruction.jl#LL101">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.bestaashower" href="#KM3io.bestaashower"><code>KM3io.bestaashower</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">bestaashower(e::Evt) -> Union{Missing, Trk} -</code></pre><p>Returns the best reconstructed aashower "track" of an event or <code>missing</code> if there are none.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/reconstruction.jl#LL105">source</a></section><section><div><pre><code class="language-julia hljs">bestaashower(trks::Vector{Trk}) -> Union{Missing, Trk} -</code></pre><p>Returns the best reconstructed aashower "track" or <code>missing</code> if there are none.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/reconstruction.jl#LL109">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.RecStageRange" href="#KM3io.RecStageRange"><code>KM3io.RecStageRange</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct RecStageRange{T<:Integer}</code></pre><p>This struct is used to represent a range of reconstruction stages. These are well-defined integers (see <a href="https://git.km3net.de/common/km3net-dataformat/-/blob/master/definitions/reconstruction.csv">KM3NeT Dataformat</a>) for each reconstruction algorithm and are stored in a vector named <code>rec_stages</code> of each <a href="#KM3io.Trk"><code>Trk</code></a>.</p><pre><code class="language-julia-repl hljs">julia> using KM3io +</code></pre><p>Return the best reconstructed track for a given reconstruction type and reconstruction stage range. If no track could be found, <code>missing</code> is returned.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/reconstruction.jl#LL69">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.bestjppmuon" href="#KM3io.bestjppmuon"><code>KM3io.bestjppmuon</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">bestjppmuon(e::Evt) -> Union{Missing, Trk} +</code></pre><p>Returns the best reconstructed JMuon track of an event or <code>missing</code> if there are none.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/reconstruction.jl#LL89">source</a></section><section><div><pre><code class="language-julia hljs">bestjppmuon(trks::Vector{Trk}) -> Union{Missing, Trk} +</code></pre><p>Returns the best reconstructed JMuon track or <code>missing</code> if there are none.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/reconstruction.jl#LL93">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.bestjppshower" href="#KM3io.bestjppshower"><code>KM3io.bestjppshower</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">bestjppshower(e::Evt) -> Union{Missing, Trk} +</code></pre><p>Returns the best reconstructed JShower "track" of an event or <code>missing</code> if there are none.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/reconstruction.jl#LL97">source</a></section><section><div><pre><code class="language-julia hljs">bestjppshower(trks::Vector{Trk}) -> Union{Missing, Trk} +</code></pre><p>Returns the best reconstructed JShower "track" or <code>missing</code> if there are none.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/reconstruction.jl#LL101">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.bestaashower" href="#KM3io.bestaashower"><code>KM3io.bestaashower</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">bestaashower(e::Evt) -> Union{Missing, Trk} +</code></pre><p>Returns the best reconstructed aashower "track" of an event or <code>missing</code> if there are none.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/reconstruction.jl#LL105">source</a></section><section><div><pre><code class="language-julia hljs">bestaashower(trks::Vector{Trk}) -> Union{Missing, Trk} +</code></pre><p>Returns the best reconstructed aashower "track" or <code>missing</code> if there are none.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/reconstruction.jl#LL109">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.RecStageRange" href="#KM3io.RecStageRange"><code>KM3io.RecStageRange</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct RecStageRange{T<:Integer}</code></pre><p>This struct is used to represent a range of reconstruction stages. These are well-defined integers (see <a href="https://git.km3net.de/common/km3net-dataformat/-/blob/master/definitions/reconstruction.csv">KM3NeT Dataformat</a>) for each reconstruction algorithm and are stored in a vector named <code>rec_stages</code> of each <a href="#KM3io.Trk"><code>Trk</code></a>.</p><pre><code class="language-julia-repl hljs">julia> using KM3io julia> rsr = RecStageRange(KM3io.RECONSTRUCTION.JMUONBEGIN, KM3io.RECONSTRUCTION.JMUONEND) RecStageRange{Int64}(0, 99) @@ -144,14 +144,15 @@ julia> 23 ∈ rsr true julia> 523 ∈ rsr -false</code></pre><p><strong>Fields</strong></p><ul><li><p><code>lower::Integer</code></p></li><li><p><code>upper::Integer</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/reconstruction.jl#LL1">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.hashistory" href="#KM3io.hashistory"><code>KM3io.hashistory</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">hashistory( +false</code></pre><p><strong>Fields</strong></p><ul><li><p><code>lower::Integer</code></p></li><li><p><code>upper::Integer</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/reconstruction.jl#LL1">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="KM3io.hashistory" href="#KM3io.hashistory"><code>KM3io.hashistory</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">hashistory( t::Trk, rec_type::Integer, rsr::RecStageRange ) -> Bool -</code></pre><p>Returns <code>true</code> if a track with a given <code>rec_type</code> contains all the reconstruction stages in <code>rsr::RecStageRange</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/reconstruction.jl#LL34">source</a></section><section><div><pre><code class="language-julia hljs">hashistory( +</code></pre><p>Returns <code>true</code> if a track with a given <code>rec_type</code> contains all the reconstruction stages in <code>rsr::RecStageRange</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/reconstruction.jl#LL34">source</a></section><section><div><pre><code class="language-julia hljs">hashistory( t::Trk, rec_type::Integer, rec_stage::Integer ) -> Bool -</code></pre><p>Returns <code>true</code> if a track with a given <code>rec_type</code> contains the <code>rec_stage</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/8caed419168cd1dd520264bc70b986191c3f52a7/src/tools/reconstruction.jl#LL45">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../examples/hdf5/">« HDF5</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 January 2024 14:29">Friday 26 January 2024</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +</code></pre><p>Returns <code>true</code> if a track with a given <code>rec_type</code> contains the <code>rec_stage</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/reconstruction.jl#LL45">source</a></section></article><h3 id="Math"><a class="docs-heading-anchor" href="#Math">Math</a><a id="Math-1"></a><a class="docs-heading-anchor-permalink" href="#Math" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.angle" href="#Base.angle"><code>Base.angle</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">angle(d1::Direction, d2::Direction) -> Any +</code></pre><p>Calculate the angle between two vectors.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/9bb3c02c219c2c0c288233fdce775a4de9d3ac29/src/tools/math.jl#LL1">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../examples/hdf5/">« HDF5</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 9 February 2024 09:14">Friday 9 February 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/examples/cherenkov.pdf b/dev/examples/cherenkov.pdf index 23d4c2423b593ce726885440d87e39a73006f9a5..046ffcd5538b6f8a8c8f43d56dc360654830f5f2 100644 GIT binary patch delta 117 zcmZ2;pK;B7#tqjqIgJb~4J-|fO${bL$P_{FHvi4s#NuXbU}j?G=H}vLX6j^QWMJy* i<Z5hWVC3fPYT#nvV(w_CU_)3*?BtE?a+8JgX955cp&-5h delta 117 zcmZ2;pK;B7#tqjqISq}>3{8wI4b3M%$P_{FHvi4s#NuXRW@6-M;9_B5X6j^UWNP5# i>ga6h<mTw+XkcJs;$~>4U_)3*?BtE?a+8JgX955U>>!W; diff --git a/dev/examples/cherenkov_times/index.html b/dev/examples/cherenkov_times/index.html index 6f17780c..7a7524ce 100644 --- a/dev/examples/cherenkov_times/index.html +++ b/dev/examples/cherenkov_times/index.html @@ -4,20 +4,20 @@ f = ROOTFile(datapath("offline", "mcv6.0.gsg_muon_highE-CC_50-500GeV.km3sim.jterbr00008357.jorcarec.aanet.905.root"))</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">ROOTFile{OfflineTree (140 events)}</code></pre><p>Each event holds a vector of reconstructed tracks (<code>Vector{Trk}</code>) behind the <code>.trks</code> field. This vector contains different stages of reconstruction results from a variety of reconstruction algorithms (<code>JMuon</code>, <code>JShower</code>, <code>aashower</code> etc.). <code>KM3io.jl</code> exports helper functions to pick the best reconstructed track for a given reconstruction algorithm. The logic is based on the reference implementation in <a href="https://git.km3net.de/common/km3net-dataformat/-/blob/master/tools/reconstruction.hh">KM3NeT DataFormat tools</a>. The function <code>bestjppmuon()</code> can be used to select the best reconstructed <code>JMuon</code> for a given event:</p><pre><code class="language-julia hljs">evt = f.offline[1] best_muon = bestjppmuon(evt)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">Trk(1, [472.38683488288035, 526.1421552520982, 198.52185151902515], [0.14146977403136585, 0.9861486218588713, 0.0865863652162581], 5.8796099548102595e7, 544.9525806125414, 0.0, 40.55672709261793, 4000, Int32[1, 2, 5, 3, 5, 4], [0.014885871185356527, 0.010385140089653992, -40.55672709261793, 21.0, 544.9525806125414, 62.53353460788458, 3.9927948910593534, 14.0, 0.0, 8.658344340729155, 45.03600640024326, 0.0, 0.0, 1501.6459845444228, -60.9373245973645, 602.0, 18.0])</code></pre><p>We now use this track as a seed to calculate the Cherenkov photon (see <a href="../../api/#KM3io.CherenkovPhoton"><code>CherenkovPhoton</code></a>) parameters using <a href="../../api/#KM3io.cherenkov"><code>cherenkov()</code></a> for each hit triggered hit in the event. To select only triggered hits, we use the <a href="../../api/#KM3io.triggered"><code>triggered()</code></a> function together withe <code>filter()</code> which returns a new vector of triggered hits:</p><pre><code class="language-julia hljs">cherenkov(best_muon, filter(triggered, evt.hits))</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">18-element Vector{CherenkovPhoton}: CherenkovPhoton(27.456056524385705, 40.873619315665835, 23.01132932189433, 5.879636441354458e7, -3.3185445815324783, -0.6308750235550007, [-0.5280726983220052, 0.8386645132949296, -0.1333456389489177]) - CherenkovPhoton(19.58954108346994, 29.162798528739586, 34.06689497770607, 5.879634739559217e7, -3.233592174947262, -0.5615835242962761, [-0.10332584557538863, 0.815965010737073, -0.5687924673279168]) - CherenkovPhoton(10.86335249693419, 16.17218896884211, 44.610162820726416, 5.879632277897501e7, -13.470975004136562, -0.7747565822537268, [-0.2741635374885427, 0.8327626017287887, -0.48097900564750967]) - CherenkovPhoton(10.95865811567447, 16.314069707453438, 44.59234480366249, 5.879632337250174e7, -12.580501735210419, -0.12671424342178972, [-0.26996965838456793, 0.8324204577911081, -0.4839344635408413]) + CherenkovPhoton(19.589541083469918, 29.162798528739554, 34.066894977706106, 5.879634739559217e7, -3.233592174947262, -0.5615835242962758, [-0.10332584557538887, 0.8159650107370725, -0.5687924673279173]) + CherenkovPhoton(10.86335249693415, 16.17218896884205, 44.610162820726465, 5.879632277897501e7, -13.470975004136562, -0.7747565822537276, [-0.2741635374885438, 0.8327626017287875, -0.48097900564751106]) + CherenkovPhoton(10.958658115674492, 16.31406970745347, 44.59234480366246, 5.879632337250174e7, -12.580501735210419, -0.12671424342178933, [-0.2699696583845673, 0.8324204577911087, -0.4839344635408405]) CherenkovPhoton(10.944182695875304, 16.29252026178632, 44.40568465253136, 5.879632265069598e7, 3.0913040190935135, -0.9323746132442533, [-0.28061324969503537, 0.8332805365263898, -0.4763399537534972]) CherenkovPhoton(11.17928745250317, 16.642518897357846, 44.22007515662778, 5.8796323642327406e7, 15.824672594666481, 0.13091951330569712, [-0.28166643233811883, 0.8333641475329505, -0.47557146518750953]) CherenkovPhoton(10.90295605293336, 16.23114647681559, 44.79747555408915, 5.8796323675116315e7, 23.333883680403233, 0.21074029444645023, [-0.27966746730903425, 0.8332052197790003, -0.4770274305131501]) - CherenkovPhoton(10.834690812223194, 16.129520540155625, 44.74122710381231, 5.879632301979044e7, 35.40920955687761, -0.5058063194444703, [-0.2759143497206357, 0.8329041936340709, -0.4797310453212477]) + CherenkovPhoton(10.834690812223172, 16.129520540155593, 44.741227103812335, 5.879632301979044e7, 35.40920955687761, -0.5058063194444712, [-0.27591434972063633, 0.8329041936340702, -0.4797310453212485]) CherenkovPhoton(38.84032185176909, 57.82128719239538, -7.3748303011806655, 5.879634105250908e7, 2.452490918338299, -0.869871832680696, [-0.49768036486114947, 0.8411698501975048, -0.21153613769372911]) CherenkovPhoton(28.22562353198971, 42.01926777682648, 4.187186042072117, 5.879630689544618e7, 0.01255381852388382, 0.010809985106091385, [-0.20536281574231854, 0.826660216630483, -0.5238883470271404]) CherenkovPhoton(14.785344110263079, 22.01082759562596, 20.557497574678035, 5.8796269418408036e7, 1.031591959297657, -0.8687222096306455, [-0.49539706637778913, 0.8412721768556203, -0.2164321396486352]) CherenkovPhoton(14.88094434135218, 22.153146921365803, 20.51061784167785, 5.879626991701378e7, 6.563986226916313, -0.3270806917438915, [-0.49376584703803356, 0.8413399367600128, -0.21986904991715162]) CherenkovPhoton(15.035038797101658, 22.382546147629952, 20.413422353617566, 5.8796270648541935e7, 10.363458067178726, 0.45681008948052304, [-0.49501594042850555, 0.841288399552909, -0.21723960849575105]) CherenkovPhoton(35.48962576204839, 52.8331317997193, -2.014094840107113, 5.879633597758977e7, 1.9564102292060852, -0.4138351012632555, [0.2341920351405915, 0.7697450484845674, -0.5938405939393154]) - CherenkovPhoton(35.322525552364354, 52.584371008011026, -1.7938275339033467, 5.879633556747952e7, 3.269520476460457, -0.8429145215271237, [0.2345171627347877, 0.7696930575084194, -0.5937796709269915]) + CherenkovPhoton(35.32252555236435, 52.58437100801102, -1.7938275339033325, 5.879633556747952e7, 3.269520476460457, -0.8429145215271237, [0.23451716273478773, 0.7696930575084193, -0.5937796709269916]) CherenkovPhoton(25.877763469142074, 38.52402663285318, 9.45499183787367, 5.8796308381212674e7, -0.5812126770615578, -0.9686719491474437, [0.27451879989430933, 0.7631813220745428, -0.5849732456626894]) CherenkovPhoton(26.084505456694867, 38.83180183313701, 9.19462645688342, 5.8796308929165296e7, 2.361834704875946, -0.39414201377088814, [0.2777981674998186, 0.7626371978873142, -0.5841341306004368]) CherenkovPhoton(17.507053914837183, 26.062615963014824, 19.40524417300148, 5.8796284221979275e7, 1.8830207213759422, -0.9165095376090591, [0.3547191740867844, 0.7494025149884511, -0.5590797600201369])</code></pre><p>To obtain more statistics, we iterate through all the events and calculate the Cherenkov time residuals for each set of hits based on the best reconstruction track. We fill the time residuals in a 1D histogram using the <a href="https://github.com/Moelf/FHist.jl">FHist</a> package.</p><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>This example uses <a href="https://github.com/KristofferC/PGFPlotsX.jl">PGFPlotsX</a> which is a wrapper for the LaTeX library PGFPlots. Feel free to adapt the example to use your favourite plotting library.</p></div></div><pre><code class="language-julia hljs">using FHist @@ -40,4 +40,4 @@ axis = @pgf Axis( }, PlotInc(Coordinates(bincenters(Δts), bincounts(Δts)), raw"\closedcycle") ) -axis</code></pre><p><a href="../cherenkov.pdf">[.pdf]</a>, <a href="../cherenkov.tex">[generated .tex]</a></p><p><img src="../cherenkov.svg" alt/></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../offline_data/">« Offline data</a><a class="docs-footer-nextpage" href="../controlhost/">Accessing Live Data »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 January 2024 14:29">Friday 26 January 2024</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +axis</code></pre><p><a href="../cherenkov.pdf">[.pdf]</a>, <a href="../cherenkov.tex">[generated .tex]</a></p><p><img src="../cherenkov.svg" alt/></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../offline_data/">« Offline data</a><a class="docs-footer-nextpage" href="../controlhost/">Accessing Live Data »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 9 February 2024 09:14">Friday 9 February 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/examples/controlhost/index.html b/dev/examples/controlhost/index.html index 697620f6..8eaad870 100644 --- a/dev/examples/controlhost/index.html +++ b/dev/examples/controlhost/index.html @@ -31,4 +31,4 @@ e = DAQEvent with 149 snapshot and 6 triggered hits e = DAQEvent with 136 snapshot and 6 triggered hits ... ... -...</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../cherenkov_times/">« Cherenkov times</a><a class="docs-footer-nextpage" href="../hdf5/">HDF5 »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 January 2024 14:29">Friday 26 January 2024</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +...</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../cherenkov_times/">« Cherenkov times</a><a class="docs-footer-nextpage" href="../hdf5/">HDF5 »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 9 February 2024 09:14">Friday 9 February 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/examples/foo.h5 b/dev/examples/foo.h5 index 6f14708e70146d6f2cfd44156913cc6b25de0302..90cb56589245b02c637a7b8eb38cc9db88e10c1c 100644 GIT binary patch delta 25 hcmew{pYg|h#trGrjK-TYm`zxjFTFXsc|J#^I{=Hi3RVCB delta 25 hcmew{pYg|h#trGrj7FO?m`zxj4<6jSc|J#^I{=A_3I_lH diff --git a/dev/examples/hdf5/index.html b/dev/examples/hdf5/index.html index 7a572eb7..0f7240a3 100644 --- a/dev/examples/hdf5/index.html +++ b/dev/examples/hdf5/index.html @@ -62,4 +62,4 @@ attributes(f)</code></pre><pre class="documenter-example-output"><code class="no ├─ ðŸ·ï¸ can_height ├─ ðŸ·ï¸ can_radius ├─ ðŸ·ï¸ maximum_energy -└─ ðŸ·ï¸ minimum_energy</code></pre><p>To access individual attributes, use <code>HDF5.read_attribute</code>:</p><pre><code class="language-julia hljs">read_attribute(f, "can_radius")</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">200</code></pre><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>It is possible to add metadata to datasets and groups too. Make sure that the struct you pass to <code>addmeta()</code> only contains primitive types or strings in their fields. Arrays and other nested or compound fieldtypes are not supported by HDF5.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../controlhost/">« Accessing Live Data</a><a class="docs-footer-nextpage" href="../../api/">API »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 January 2024 14:29">Friday 26 January 2024</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +└─ ðŸ·ï¸ minimum_energy</code></pre><p>To access individual attributes, use <code>HDF5.read_attribute</code>:</p><pre><code class="language-julia hljs">read_attribute(f, "can_radius")</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">200</code></pre><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>It is possible to add metadata to datasets and groups too. Make sure that the struct you pass to <code>addmeta()</code> only contains primitive types or strings in their fields. Arrays and other nested or compound fieldtypes are not supported by HDF5.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../controlhost/">« Accessing Live Data</a><a class="docs-footer-nextpage" href="../../api/">API »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 9 February 2024 09:14">Friday 9 February 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/examples/offline_data/index.html b/dev/examples/offline_data/index.html index 5c3ccfc9..0b90e3c0 100644 --- a/dev/examples/offline_data/index.html +++ b/dev/examples/offline_data/index.html @@ -44,4 +44,4 @@ f.offline[1].usr</code></pre><pre class="documenter-example-output"><code class= "RecoNDF" => 37.0 "FirstPartPosZ" => 135.295 "CoC" => 118.63 - "ChargeAbove" => 176.0</code></pre><pre><code class="language-julia hljs">close(f)</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../manual/tools/">« Tools</a><a class="docs-footer-nextpage" href="../cherenkov_times/">Cherenkov times »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 January 2024 14:29">Friday 26 January 2024</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> + "ChargeAbove" => 176.0</code></pre><pre><code class="language-julia hljs">close(f)</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../manual/tools/">« Tools</a><a class="docs-footer-nextpage" href="../cherenkov_times/">Cherenkov times »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 9 February 2024 09:14">Friday 9 February 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/index.html b/dev/index.html index 4d7caa4c..885ec2a4 100644 --- a/dev/index.html +++ b/dev/index.html @@ -8,4 +8,4 @@ julia> f.offline OfflineTree (10 events) julia> some_event = f.offline[3] -KM3io.Evt (3680 hits, 28 MC hits, 38 tracks, 12 MC tracks)</code></pre><h2 id="Acknowledgements"><a class="docs-heading-anchor" href="#Acknowledgements">Acknowledgements</a><a id="Acknowledgements-1"></a><a class="docs-heading-anchor-permalink" href="#Acknowledgements" title="Permalink"></a></h2><p>Thanks to <a href="https://git.km3net.de/jschumann">Johannes Schumann</a> for providing the awesome project logo!</p></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="manual/rootfiles/">ROOT Files »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 January 2024 14:29">Friday 26 January 2024</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +KM3io.Evt (3680 hits, 28 MC hits, 38 tracks, 12 MC tracks)</code></pre><h2 id="Acknowledgements"><a class="docs-heading-anchor" href="#Acknowledgements">Acknowledgements</a><a id="Acknowledgements-1"></a><a class="docs-heading-anchor-permalink" href="#Acknowledgements" title="Permalink"></a></h2><p>Thanks to <a href="https://git.km3net.de/jschumann">Johannes Schumann</a> for providing the awesome project logo!</p></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="manual/rootfiles/">ROOT Files »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 9 February 2024 09:14">Friday 9 February 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/manual/calibration/index.html b/dev/manual/calibration/index.html index 2f036bcf..00c1c167 100644 --- a/dev/manual/calibration/index.html +++ b/dev/manual/calibration/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Calibration · KM3io.jl</title><meta name="title" content="Calibration · KM3io.jl"/><meta property="og:title" content="Calibration · KM3io.jl"/><meta property="twitter:title" content="Calibration · KM3io.jl"/><meta name="description" content="Documentation for KM3io.jl."/><meta property="og:description" content="Documentation for KM3io.jl."/><meta property="twitter:description" content="Documentation for KM3io.jl."/><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../search_index.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/custom.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.svg" alt="KM3io.jl logo"/></a><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">Manual</span><ul><li><a class="tocitem" href="../rootfiles/">ROOT Files</a></li><li><a class="tocitem" href="../detector/">Detector and its Components</a></li><li class="is-active"><a class="tocitem" href>Calibration</a></li><li><a class="tocitem" href="../tools/">Tools</a></li></ul></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../../examples/offline_data/">Offline data</a></li><li><a class="tocitem" href="../../examples/cherenkov_times/">Cherenkov times</a></li><li><a class="tocitem" href="../../examples/controlhost/">Accessing Live Data</a></li><li><a class="tocitem" href="../../examples/hdf5/">HDF5</a></li></ul></li><li><a class="tocitem" href="../../api/">API</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Manual</a></li><li class="is-active"><a href>Calibration</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Calibration</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://git.km3net.de/common/KM3io.jl" title="View the repository"><span class="docs-icon fa-brands">ï¡</span><span class="docs-label is-hidden-touch">Repository</span></a><a class="docs-navbar-link" href="https://git.km3net.de/common/KM3io.jl/blob/main/docs/src/manual/calibration.md#L" title="Edit source"><span class="docs-icon fa-solid">ï„</span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="Calibration"><a class="docs-heading-anchor" href="#Calibration">Calibration</a><a id="Calibration-1"></a><a class="docs-heading-anchor-permalink" href="#Calibration" title="Permalink"></a></h1><p>It's implemented but not documented here yet. Check out the docs <code>calibrate</code> function's docstring!</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../detector/">« Detector and its Components</a><a class="docs-footer-nextpage" href="../tools/">Tools »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 January 2024 14:29">Friday 26 January 2024</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Calibration · KM3io.jl</title><meta name="title" content="Calibration · KM3io.jl"/><meta property="og:title" content="Calibration · KM3io.jl"/><meta property="twitter:title" content="Calibration · KM3io.jl"/><meta name="description" content="Documentation for KM3io.jl."/><meta property="og:description" content="Documentation for KM3io.jl."/><meta property="twitter:description" content="Documentation for KM3io.jl."/><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../search_index.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/custom.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.svg" alt="KM3io.jl logo"/></a><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">Manual</span><ul><li><a class="tocitem" href="../rootfiles/">ROOT Files</a></li><li><a class="tocitem" href="../detector/">Detector and its Components</a></li><li class="is-active"><a class="tocitem" href>Calibration</a></li><li><a class="tocitem" href="../tools/">Tools</a></li></ul></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../../examples/offline_data/">Offline data</a></li><li><a class="tocitem" href="../../examples/cherenkov_times/">Cherenkov times</a></li><li><a class="tocitem" href="../../examples/controlhost/">Accessing Live Data</a></li><li><a class="tocitem" href="../../examples/hdf5/">HDF5</a></li></ul></li><li><a class="tocitem" href="../../api/">API</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Manual</a></li><li class="is-active"><a href>Calibration</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Calibration</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://git.km3net.de/common/KM3io.jl" title="View the repository"><span class="docs-icon fa-brands">ï¡</span><span class="docs-label is-hidden-touch">Repository</span></a><a class="docs-navbar-link" href="https://git.km3net.de/common/KM3io.jl/blob/main/docs/src/manual/calibration.md#L" title="Edit source"><span class="docs-icon fa-solid">ï„</span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="Calibration"><a class="docs-heading-anchor" href="#Calibration">Calibration</a><a id="Calibration-1"></a><a class="docs-heading-anchor-permalink" href="#Calibration" title="Permalink"></a></h1><p>It's implemented but not documented here yet. Check out the docs <code>calibrate</code> function's docstring!</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../detector/">« Detector and its Components</a><a class="docs-footer-nextpage" href="../tools/">Tools »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 9 February 2024 09:14">Friday 9 February 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/manual/detector/index.html b/dev/manual/detector/index.html index bc37ba83..08407697 100644 --- a/dev/manual/detector/index.html +++ b/dev/manual/detector/index.html @@ -182,4 +182,4 @@ Detectormodule (optical, 31 PMTs) on string 9 floor 17</code></pre><div class="a PMT(787, [474.215, 583.27, 161.646], [0.326696, -0.897925, -0.294947], 208298.439, 0) PMT(7293, [474.277, 583.343, 161.594], [0.63711, -0.534814, -0.555035], 208297.429, 0) PMT(7161, [474.306, 583.507, 161.594], [0.781616, 0.284399, -0.555151], 208298.477, 0) - PMT(5068, [474.338, 583.417, 161.646], [0.940928, -0.166018, -0.295123], 208297.061, 0)</code></pre><p>To access a specific PMT with a given channel ID (TDC ID), use the <code>getpmt(m::DetectorModule, channel_id::Integer)</code> function. Here, we access the PMT at DAQ channel 0 of our previously obtained detector module:</p><pre><code class="language-julia hljs">getpmt(detector_module, 0)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">PMT(891, [474.314, 583.421, 161.816], [0.819287, -0.144441, 0.554893], 208297.659, 0)</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../rootfiles/">« ROOT Files</a><a class="docs-footer-nextpage" href="../calibration/">Calibration »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 January 2024 14:29">Friday 26 January 2024</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> + PMT(5068, [474.338, 583.417, 161.646], [0.940928, -0.166018, -0.295123], 208297.061, 0)</code></pre><p>To access a specific PMT with a given channel ID (TDC ID), use the <code>getpmt(m::DetectorModule, channel_id::Integer)</code> function. Here, we access the PMT at DAQ channel 0 of our previously obtained detector module:</p><pre><code class="language-julia hljs">getpmt(detector_module, 0)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">PMT(891, [474.314, 583.421, 161.816], [0.819287, -0.144441, 0.554893], 208297.659, 0)</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../rootfiles/">« ROOT Files</a><a class="docs-footer-nextpage" href="../calibration/">Calibration »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 9 February 2024 09:14">Friday 9 February 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/manual/hdf5/index.html b/dev/manual/hdf5/index.html index fe616897..dffb9d9a 100644 --- a/dev/manual/hdf5/index.html +++ b/dev/manual/hdf5/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>HDF5 Files · KM3io.jl</title><meta name="title" content="HDF5 Files · KM3io.jl"/><meta property="og:title" content="HDF5 Files · KM3io.jl"/><meta property="twitter:title" content="HDF5 Files · KM3io.jl"/><meta name="description" content="Documentation for KM3io.jl."/><meta property="og:description" content="Documentation for KM3io.jl."/><meta property="twitter:description" content="Documentation for KM3io.jl."/><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../search_index.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/custom.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.svg" alt="KM3io.jl logo"/></a><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">Manual</span><ul><li><a class="tocitem" href="../rootfiles/">ROOT Files</a></li><li><a class="tocitem" href="../detector/">Detector and its Components</a></li><li><a class="tocitem" href="../calibration/">Calibration</a></li><li><a class="tocitem" href="../tools/">Tools</a></li></ul></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../../examples/offline_data/">Offline data</a></li><li><a class="tocitem" href="../../examples/cherenkov_times/">Cherenkov times</a></li><li><a class="tocitem" href="../../examples/controlhost/">Accessing Live Data</a></li><li><a class="tocitem" href="../../examples/hdf5/">HDF5</a></li></ul></li><li><a class="tocitem" href="../../api/">API</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>HDF5 Files</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>HDF5 Files</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://git.km3net.de/common/KM3io.jl" title="View the repository"><span class="docs-icon fa-brands">ï¡</span><span class="docs-label is-hidden-touch">Repository</span></a><a class="docs-navbar-link" href="https://git.km3net.de/common/KM3io.jl/blob/main/docs/src/manual/hdf5.md#L" title="Edit source"><span class="docs-icon fa-solid">ï„</span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="HDF5-Files"><a class="docs-heading-anchor" href="#HDF5-Files">HDF5 Files</a><a id="HDF5-Files-1"></a><a class="docs-heading-anchor-permalink" href="#HDF5-Files" title="Permalink"></a></h1><p>...</p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 January 2024 14:29">Friday 26 January 2024</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>HDF5 Files · KM3io.jl</title><meta name="title" content="HDF5 Files · KM3io.jl"/><meta property="og:title" content="HDF5 Files · KM3io.jl"/><meta property="twitter:title" content="HDF5 Files · KM3io.jl"/><meta name="description" content="Documentation for KM3io.jl."/><meta property="og:description" content="Documentation for KM3io.jl."/><meta property="twitter:description" content="Documentation for KM3io.jl."/><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../search_index.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/custom.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.svg" alt="KM3io.jl logo"/></a><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">Manual</span><ul><li><a class="tocitem" href="../rootfiles/">ROOT Files</a></li><li><a class="tocitem" href="../detector/">Detector and its Components</a></li><li><a class="tocitem" href="../calibration/">Calibration</a></li><li><a class="tocitem" href="../tools/">Tools</a></li></ul></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../../examples/offline_data/">Offline data</a></li><li><a class="tocitem" href="../../examples/cherenkov_times/">Cherenkov times</a></li><li><a class="tocitem" href="../../examples/controlhost/">Accessing Live Data</a></li><li><a class="tocitem" href="../../examples/hdf5/">HDF5</a></li></ul></li><li><a class="tocitem" href="../../api/">API</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>HDF5 Files</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>HDF5 Files</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://git.km3net.de/common/KM3io.jl" title="View the repository"><span class="docs-icon fa-brands">ï¡</span><span class="docs-label is-hidden-touch">Repository</span></a><a class="docs-navbar-link" href="https://git.km3net.de/common/KM3io.jl/blob/main/docs/src/manual/hdf5.md#L" title="Edit source"><span class="docs-icon fa-solid">ï„</span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="HDF5-Files"><a class="docs-heading-anchor" href="#HDF5-Files">HDF5 Files</a><a id="HDF5-Files-1"></a><a class="docs-heading-anchor-permalink" href="#HDF5-Files" title="Permalink"></a></h1><p>...</p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 9 February 2024 09:14">Friday 9 February 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/manual/rootfiles/index.html b/dev/manual/rootfiles/index.html index 9db38a41..fb5c3ddd 100644 --- a/dev/manual/rootfiles/index.html +++ b/dev/manual/rootfiles/index.html @@ -181,4 +181,4 @@ PMT 29: HRV(false) FIFO(true) PMT 30: HRV(true) FIFO(false)</code></pre><h2 id="xrootd-access"><a class="docs-heading-anchor" href="#xrootd-access">xrootd access</a><a id="xrootd-access-1"></a><a class="docs-heading-anchor-permalink" href="#xrootd-access" title="Permalink"></a></h2><p>You can access files directly via <code>xrootd</code> by providing the URL on e.g. HPSS. Be aware that URL has to be typed correctly, <code>/</code> instead of <code>//</code> results in an error!), so it should always start with something like <code>root://ccxroot:1999//hpss/...</code>.</p><pre><code class="language-julia hljs">julia> using KM3io julia> f = ROOTFile("root://ccxroot:1999//hpss/in2p3.fr/group/km3net/data/raw/sea/KM3NeT_00000132/14/KM3NeT_00000132_00014481.root") -ROOTFile{OnlineTree (136335 events, 107632 summaryslices)}</code></pre><p>Now you can use it as if it was on your local filesystem. <code>UnROOT.jl</code> will take care of loading only the needed data from the server.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../">« Home</a><a class="docs-footer-nextpage" href="../detector/">Detector and its Components »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 January 2024 14:29">Friday 26 January 2024</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +ROOTFile{OnlineTree (136335 events, 107632 summaryslices)}</code></pre><p>Now you can use it as if it was on your local filesystem. <code>UnROOT.jl</code> will take care of loading only the needed data from the server.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../">« Home</a><a class="docs-footer-nextpage" href="../detector/">Detector and its Components »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 9 February 2024 09:14">Friday 9 February 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/manual/tools/index.html b/dev/manual/tools/index.html index f5fa349e..e4e07dbe 100644 --- a/dev/manual/tools/index.html +++ b/dev/manual/tools/index.html @@ -5,4 +5,4 @@ f = ROOTFile(datapath("offline", "km3net_offline.root"))</co Trk(1, [465.0566061903734, 532.6821160545169, 80.73206374676195], [-0.17513834417756996, 0.5213137941218786, -0.8351996698137462], 8.106927901568094e7, 99.10458562488608, 0.0, 96.75133289411137, 4000, Int32[1, 3, 5, 4], [0.01837814570268761, 0.009401304503949024, -96.75133289411137, 72.0, 99.10458562488608, 1.7976931348623157e308, 259.2943164149993, 59.0, 16.87128649083537, 24.773873409176925, 59.43893182922881, 0.0, 0.0, 344.9767431592819, -178.51901912484058, 790.0, 54.0]) Trk(1, [456.97627814791457, 592.7509917096395, 193.82544167917783], [-0.08167688401007625, -0.12212161487029954, -0.989148723802379], 2.128187723727164e7, 99.10458562488608, 0.0, 560.2775306614813, 4000, Int32[1, 3, 5, 4], [0.0022862363916181096, 0.0015619992272287897, -560.2775306614813, 261.0, 99.10458562488608, 1.7976931348623157e308, 5.84464995424756, 52.0, 91.37269495454369, 148.1224810941145, 165.70400027827318, 0.0, 0.0, 344.9767431592819, -654.1882814711497, 2526.0, 198.0]) Trk(1, [439.7470230806774, 590.4753779242533, 203.83469855517993], [-0.10236158585739397, -0.23020978384961455, -0.9677425076747808], 1.6513108700491736e7, 37.8551524925863, 0.0, 278.2872951665753, 4000, Int32[1, 3, 5, 4], [0.006041091149104179, 0.0035514113196960105, -278.2872951665753, 118.0, 37.8551524925863, 265.5559310077148, 52.601849588228035, 53.0, 40.65396902507262, 46.54735947527185, 97.27912085164719, 0.0, 0.0, 141.61500301253315, -Inf, 2713.0, 88.0]) - Trk(1, [439.7429669399687, 546.3344243172004, 58.644786708814664], [0.18720483239615998, 0.5400660706130554, -0.8205382319551601], 4.717893801990337e7, 99.10458562488608, 0.0, 99.59098153341449, 4000, Int32[1, 3, 5, 4], [0.024623519864386552, 0.014331655995648987, -99.59098153341449, 47.0, 99.10458562488608, 1.7976931348623157e308, 64.29114949672314, 51.0, 22.75185164189341, 22.75185164189341, 33.78774068100958, 0.0, 0.0, 344.9767431592819, -115.80151219196675, 480.0, 35.0])</code></pre><p>Let's close our file <code>;)</code></p><pre><code class="language-julia hljs">close(f)</code></pre><h2 id="Trigger-masks/flags"><a class="docs-heading-anchor" href="#Trigger-masks/flags">Trigger masks/flags</a><a id="Trigger-masks/flags-1"></a><a class="docs-heading-anchor-permalink" href="#Trigger-masks/flags" title="Permalink"></a></h2><p>KM3NeT uses a 64bit integer type to store information about which triggers have fired for a given event or hit. The index of the bit which indicates if a specific trigger has fired is defined in the <a href="https://git.km3net.de/common/km3net-dataformat">KM3NeT Dataformat</a> specification which is used in <code>KM3io.jl</code>.</p><p>Functions to check if a trigger has fired are for example</p><ul><li><a href="../../api/#KM3io.is3dmuon"><code>is3dmuon()</code></a></li><li><a href="../../api/#KM3io.is3dshower"><code>is3dshower()</code></a></li><li><a href="../../api/#KM3io.ismxshower"><code>ismxshower()</code></a></li><li><a href="../../api/#KM3io.isnb"><code>isnb()</code></a></li></ul><p>which all accept either an event is input or something which has a <code>.trigger_mask</code> field, like a triggered hit.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../calibration/">« Calibration</a><a class="docs-footer-nextpage" href="../../examples/offline_data/">Offline data »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 January 2024 14:29">Friday 26 January 2024</span>. Using Julia version 1.8.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> + Trk(1, [439.7429669399687, 546.3344243172004, 58.644786708814664], [0.18720483239615998, 0.5400660706130554, -0.8205382319551601], 4.717893801990337e7, 99.10458562488608, 0.0, 99.59098153341449, 4000, Int32[1, 3, 5, 4], [0.024623519864386552, 0.014331655995648987, -99.59098153341449, 47.0, 99.10458562488608, 1.7976931348623157e308, 64.29114949672314, 51.0, 22.75185164189341, 22.75185164189341, 33.78774068100958, 0.0, 0.0, 344.9767431592819, -115.80151219196675, 480.0, 35.0])</code></pre><p>Let's close our file <code>;)</code></p><pre><code class="language-julia hljs">close(f)</code></pre><h2 id="Trigger-masks/flags"><a class="docs-heading-anchor" href="#Trigger-masks/flags">Trigger masks/flags</a><a id="Trigger-masks/flags-1"></a><a class="docs-heading-anchor-permalink" href="#Trigger-masks/flags" title="Permalink"></a></h2><p>KM3NeT uses a 64bit integer type to store information about which triggers have fired for a given event or hit. The index of the bit which indicates if a specific trigger has fired is defined in the <a href="https://git.km3net.de/common/km3net-dataformat">KM3NeT Dataformat</a> specification which is used in <code>KM3io.jl</code>.</p><p>Functions to check if a trigger has fired are for example</p><ul><li><a href="../../api/#KM3io.is3dmuon"><code>is3dmuon()</code></a></li><li><a href="../../api/#KM3io.is3dshower"><code>is3dshower()</code></a></li><li><a href="../../api/#KM3io.ismxshower"><code>ismxshower()</code></a></li><li><a href="../../api/#KM3io.isnb"><code>isnb()</code></a></li></ul><p>which all accept either an event is input or something which has a <code>.trigger_mask</code> field, like a triggered hit.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../calibration/">« Calibration</a><a class="docs-footer-nextpage" href="../../examples/offline_data/">Offline data »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 9 February 2024 09:14">Friday 9 February 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/search_index.js b/dev/search_index.js index 402a7ba1..1ca6f08c 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"manual/detector/#Detector-and-its-Components","page":"Detector and its Components","title":"Detector and its Components","text":"","category":"section"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"In this example, we will explore the components of a KM3NeT detector, which is represented by the Detector type in KM3io.jl. The detector description is stored in so-called DETX and DATX files, named after their filename extensions .detx (ASCII) and .datx (binary) respectively. By time of writing this example, v5 is the latest format version.","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"note: Note\nKM3io.jl offers conversions between the different DETX format versions. Typically, each major version brings a new set of parameters. Downgrading is therefore not lossless. When when upgrading from one version to another, the new parameters needs to be filled in. Some of these can be calculated from existing ones, like the module position, which was introduced in v4 and is equal to the crossing point of the PMT axes. Otherwise, these parameters are either set to meaningful default values or to missing.","category":"page"},{"location":"manual/detector/#Loading-a-DETX/DATX-File","page":"Detector and its Components","title":"Loading a DETX/DATX File","text":"","category":"section"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"The Detector type has a constructor which takes a filepath to a DETX or DATX file. The KM3NeTTestData.jl offers a collection of detector sample files, so let's pick one of them:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"using KM3io, KM3NeTTestData\n\ndet = Detector(datapath(\"detx\", \"detx_v5.detx\"))","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"A detector configuration (format version 5) has been loaded with 6 strings (sometimes also called detection unit or DU) holding a total 114 modules.","category":"page"},{"location":"manual/detector/#Accessing-Modules","page":"Detector and its Components","title":"Accessing Modules","text":"","category":"section"},{"location":"manual/detector/#Iterating-over-all-modules","page":"Detector and its Components","title":"Iterating over all modules","text":"","category":"section"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"There are multiple ways to access modules within a Detector. One of them is iterating over it, which yields DetectorModule instances in no specific order:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"for m in det\n println(m)\nend","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"warning: Warning\nmodule is a reserved keyword in Julia and mod is the \"modulo function\", so keep this in mind when chosing a variable name for a DetectorModule. Most of the time m is fine, or just be verbose with detector_module and use your editors tab-completion.","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"As we can see in the output, there are two types of modules: optical modules and base modules. The main difference between the two in the detector file context is that base modules do not contain PMTs and are always sitting on floor 0.","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"note: Note\nAlthough iterating over a Detector feels like iterating over a vector, accessing single elements via det[idx] will not work as such since it requires the idx to be a module ID. This design was chosen since the detector dataformat specification does not specify module ordering, so there is no such thing as the \"n-th module\". Accessing modules by their module ID however is the standard use case, see below.","category":"page"},{"location":"manual/detector/#Detector-Modules","page":"Detector and its Components","title":"Detector Modules","text":"","category":"section"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"Modules have a unique identification number called module ID (sometimes also called \"DOM ID\", where DOM stands for \"Digital Optical Module\") and we can use this ID to access individual modules within a Detector instance.","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"The .modules field is a dictionary which maps the modules to their module IDs:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"det.modules","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"A flat vector of modules can be obtained with:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"modules(det)","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"To access a module with a given module ID, one can either use the dictionary or index the Detector directly, which is the recommended way:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"detector_module = det[808468425]","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"Or for a given string and floor:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"det[3, 15]","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"It is possible to select all modules for a given floor on all strings using the : syntax. Here we select all the base modules on each string:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"det[:, 0]","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"Another way is using the getmodule(d::Detector, string::Integer, floor::Integer) function to access a module on a given string and floor:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"detector_module = getmodule(det, 3, 15)","category":"page"},{"location":"manual/detector/#PMTs","page":"Detector and its Components","title":"PMTs","text":"","category":"section"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"Each optical module consists of PMTs, which can be access using the getpmts(m::DetectorModule) function:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"getpmts(detector_module)","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"To access a specific PMT with a given channel ID (TDC ID), use the getpmt(m::DetectorModule, channel_id::Integer) function. Here, we access the PMT at DAQ channel 0 of our previously obtained detector module:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"getpmt(detector_module, 0)","category":"page"},{"location":"manual/calibration/#Calibration","page":"Calibration","title":"Calibration","text":"","category":"section"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"It's implemented but not documented here yet. Check out the docs calibrate function's docstring!","category":"page"},{"location":"examples/controlhost/#Accessing-Live-Data","page":"Accessing Live Data","title":"Accessing Live Data","text":"","category":"section"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"This example shows how to access and process live data (events) from the KM3NeT DAQ system. We will use two Jpp command line tools (JLigier and JRegurgitate) to create a ligier dispatcher and send triggered DAQ events to it.","category":"page"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"This example uses Jpp v14.4.3 and real data from a KM3NeT detector (online ROOT format) with the filename KM3NeT_00000075_00010275.root which can be found on the HPSS storage.","category":"page"},{"location":"examples/controlhost/#Launching-JLigier","page":"Accessing Live Data","title":"Launching JLigier","text":"","category":"section"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"We open a terminal and launch the JLigier process with a high debug level. This ligier is the central communication point and it will receive messages which are tagged with short label of maximum 8 characters.","category":"page"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"$ JLigier -P 5553 -d 3\nPort 5553\nMemory limit 16760735744\nQueue limit 100","category":"page"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"The ligier is now running and and listening on port 5553 of all host IP addresses (including the localhost 127.0.0.1). Clients can connect to it and subscribe for a given set of message tags. Leave this terminal open.","category":"page"},{"location":"examples/controlhost/#Simulating-the-DAQ","page":"Accessing Live Data","title":"Simulating the DAQ","text":"","category":"section"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"The first client we start in new terminal session is the JRegurgitate process which takes a ROOT file (in online format), a class identifier, a few other parameters like the frequency and timeout of the messages and also the IP and port of the ligier to send to. We will use this application to simulate the KM3NeT DAQ – at least the output of the JDataFilter which is responsible for triggering events and sending them downstreams to a JLigier so that they can be picked up by the JDataWriter to store them in ROOT files (online format).","category":"page"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"$ JRegurgitate -f /data/sea/KM3NeT_00000075_00010275.root -C JDAQEvent -R 2 -T 10000000 -H 127.0.0.1:5553","category":"page"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"This program is fairly quite but if you look at the terminal where the JLigier is running, you'll see a flood of messages, showing that a new client has connected and data is received (tagged with IO_EVT). It also prints the number of bytes of each message:","category":"page"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"$ JLigier -P 5553 -d 3\nPort 30001\nMemory limit 16760735744\nQueue limit 100\nNew client[4]\nClient[4].read(0,1,1756)\nClient[4].read(1,2,0)\nMessage[4] IO_EVT 1772\nClient[4].read(0,1,1394)\nClient[4].read(1,2,0)\nMessage[4] IO_EVT 1410\nClient[4].read(0,1,1716)\n...\n...\n...","category":"page"},{"location":"examples/controlhost/#Retrieving-Events","page":"Accessing Live Data","title":"Retrieving Events","text":"","category":"section"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"Now open a thrid terminal and fire up the Julia REPL. With a few lines, we will able to connect to the ligier and receive DAQ events interactively.","category":"page"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"julia> using KM3io\n\njulia> c = CHClient{KM3io.DAQEvent}(ip\"127.0.0.1\", 5553)\nCHClient{DAQEvent}(ip\"127.0.0.1\", 0x7531, CHTag[CHTag(\"IO_EVT\")], Sockets.TCPSocket(RawFD(20) open, 0 bytes waiting))\n\njulia> for e in c\n @show e\n end\ne = DAQEvent with 126 snapshot and 7 triggered hits\ne = DAQEvent with 138 snapshot and 6 triggered hits\ne = DAQEvent with 149 snapshot and 6 triggered hits\ne = DAQEvent with 149 snapshot and 6 triggered hits\ne = DAQEvent with 136 snapshot and 6 triggered hits\n...\n...\n...","category":"page"},{"location":"api/#API","page":"API","title":"API","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"","category":"page"},{"location":"api/#Basic-Data-Structures","page":"API","title":"Basic Data Structures","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"Position\nDirection\nLocation","category":"page"},{"location":"api/#KM3io.Position","page":"API","title":"KM3io.Position","text":"struct Position{T} <: StaticArraysCore.FieldVector{3, T}\n\nA vector to represent a position in 3D.\n\nFields\n\nx::Any\ny::Any\nz::Any\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.Direction","page":"API","title":"KM3io.Direction","text":"struct Direction{T<:AbstractFloat} <: StaticArraysCore.FieldVector{3, T<:AbstractFloat}\n\nA vector to represent a direction in 3D.\n\nFields\n\nx::AbstractFloat\ny::AbstractFloat\nz::AbstractFloat\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.Location","page":"API","title":"KM3io.Location","text":"struct Location\n\nA module's location in the detector where string represents the detection unit identifier and floor counts from 0 from the bottom to top. Base modules are sitting on floor 0 and optical modules on floor 1 and higher.\n\nFields\n\nstring::Int32\nfloor::Int8\n\n\n\n\n\n","category":"type"},{"location":"api/#Offline-Format","page":"API","title":"Offline Format","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"Evt\nCalibratedHit\nCalibratedMCHit\nTrk\nMCTrk","category":"page"},{"location":"api/#KM3io.Evt","page":"API","title":"KM3io.Evt","text":"struct Evt\n\nAn offline event.\n\nFields\n\nid::Int64\ndet_id::Int64\nmc_id::Int64\nrun_id::Int64\nmc_run_id::Int64\nframe_index::Int64\ntrigger_mask::UInt64\ntrigger_counter::UInt64\noverlays::UInt64\nt::UTCTime\nhits::Vector{CalibratedHit}\ntrks::Vector{Trk}\nw::Vector{Float64}\nw2list::Vector{Float64}\nw3list::Vector{Float64}\nmc_event_time::UTCTime\nmc_t::Float64\nmc_hits::Vector{CalibratedMCHit}\nmc_trks::Vector{MCTrk}\nindex::Int64\nflags::Int64\nusr::Dict{String, Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.CalibratedHit","page":"API","title":"KM3io.CalibratedHit","text":"struct CalibratedHit <: AbstractCalibratedHit\n\nA calibrated hit of the offline dataformat. Caveat: the position, direction and t fields might still be 0 due to the design philosophy of the offline format (one class for all).\n\nFields\n\ndom_id::Int32\nchannel_id::UInt32\ntdc::UInt32\ntot::UInt32\ntrigger_mask::UInt64\nt::Float64\npos::Position{Float64}\ndir::Direction{Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.CalibratedMCHit","page":"API","title":"KM3io.CalibratedMCHit","text":"struct CalibratedMCHit\n\nA calibrated MC hit of the offline dataformat. Caveat: the position and direction fields might still be 0 due to the design philosophy of the offline format (one class for all).\n\nFields\n\npmt_id::Int32\nt::Float64\na::Float64\ntype::Int32\norigin::Int32\npos::Position{Float64}\ndir::Direction{Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.Trk","page":"API","title":"KM3io.Trk","text":"struct Trk\n\nRepresents a reconstructed \"track\", which can be e.g. a muon track but also a shower.\n\nFields\n\nid::Int64\npos::Position{Float64}\ndir::Direction{Float64}\nt::Float64\nE::Float64\nlen::Float64\nlik::Float64\nrec_type::Int32\nrec_stages::Vector{Int32}\nfitinf::Vector{Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.MCTrk","page":"API","title":"KM3io.MCTrk","text":"struct MCTrk\n\nA simulated (Monte Carlo, hence \"MC\") track (or shower).\n\nFields\n\nid::Int64\npos::Position{Float64}\ndir::Direction{Float64}\nt::Float64\nE::Float64\nlen::Float64\ntype::Int32\nstatus::Int32\nmother_id::Int32\ncounter::Int32\n\n\n\n\n\n","category":"type"},{"location":"api/#Online-Format","page":"API","title":"Online Format","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"DAQEvent\nEventHeader\nSnapshotHit\nTriggeredHit\nUTCTime\nUTCExtended\nSummaryslice\nSummarysliceHeader\nSummaryFrame","category":"page"},{"location":"api/#KM3io.DAQEvent","page":"API","title":"KM3io.DAQEvent","text":"struct DAQEvent\n\nA (triggered) event holding snapshot hits and triggered hits. The triggered hits are a subset of the snapshot hits.\n\nFields\n\nheader::EventHeader\nsnapshot_hits::Vector{SnapshotHit}\ntriggered_hits::Vector{TriggeredHit}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.EventHeader","page":"API","title":"KM3io.EventHeader","text":"struct EventHeader\n\nThe header of an event.\n\nFields\n\ndetector_id::Int32\nrun::Int32\nframe_index::Int32\nt::UTCExtended\ntrigger_counter::UInt64\ntrigger_mask::UInt64\noverlays::UInt32\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.SnapshotHit","page":"API","title":"KM3io.SnapshotHit","text":"struct SnapshotHit <: KM3io.AbstractDAQHit\n\nA snapshot hit.\n\nFields\n\ndom_id::UInt32\nchannel_id::UInt8\nt::Int32\ntot::UInt8\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.TriggeredHit","page":"API","title":"KM3io.TriggeredHit","text":"struct TriggeredHit <: KM3io.AbstractDAQHit\n\nA hit which was triggered.\n\nFields\n\ndom_id::Int32\nchannel_id::UInt8\nt::Int32\ntot::UInt8\ntrigger_mask::UInt64\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.UTCTime","page":"API","title":"KM3io.UTCTime","text":"struct UTCTime\n\nA basic time structure with seconds and nanoseconds. The seconds are counting from the start of the epoch, just like the UNIX time.\n\nFields\n\ns::UInt64\nns::UInt64\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.UTCExtended","page":"API","title":"KM3io.UTCExtended","text":"struct UTCExtended\n\nAn extended time structure which contains the White Rabbit time synchronisation status. wr_status == 0 means that the synchronisation is OK.\n\nFields\n\ns::UInt32\nns::UInt32\nwr_status::Int64\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.Summaryslice","page":"API","title":"KM3io.Summaryslice","text":"struct Summaryslice\n\nA summaryslice is a condensed timeslice with the header information of the corresponding timeslice and a summary frame for each optical module. The hit information of the original timeslice is reduced so that for each PMT a single byte is used to encode the hit rate.\n\nFields\n\nheader::SummarysliceHeader\nframes::Vector{SummaryFrame}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.SummarysliceHeader","page":"API","title":"KM3io.SummarysliceHeader","text":"struct SummarysliceHeader\n\nThe header of a summaryslice.\n\nFields\n\ndetector_id::Int32\nrun::Int32\nframe_index::Int32\nt::UTCExtended\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.SummaryFrame","page":"API","title":"KM3io.SummaryFrame","text":"struct SummaryFrame\n\nA SummaryFrame contains reduced timeslice data from an optical module.\n\nThe PMT rates are encoded as single bytes and can be converted to real hit rates using the rates(s::SummaryFrame) function.\n\nFields\n\ndom_id::Int32\ndaq::UInt32\nstatus::UInt32\nfifo::UInt32\nstatus3::UInt32\nstatus4::UInt32\nrates::StaticArraysCore.SVector{31, UInt8}\n\n\n\n\n\n","category":"type"},{"location":"api/#HDF5","page":"API","title":"HDF5","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"H5File\nH5CompoundDataset\naddmeta\ncreate_dataset\nflush","category":"page"},{"location":"api/#KM3io.H5File","page":"API","title":"KM3io.H5File","text":"struct H5File\n\nA wrapper for an HDF5 file used in KM3NeT.\n\nFields\n\n_h5f::HDF5.File\n_datasets::Dict{String, H5CompoundDataset}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.H5CompoundDataset","page":"API","title":"KM3io.H5CompoundDataset","text":"struct H5CompoundDataset{T}\n\nA flat HDF5 compound dataset which is essentially a vector of structs. It has a cache which is filled when elements are pushed to it. The cache is automatically written to the target HDF5 path when full.\n\nFields\n\ndset::HDF5.Dataset\ncache::KM3io.H5CompoundDatasetCache\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.addmeta","page":"API","title":"KM3io.addmeta","text":"addmeta(\n dset::Union{HDF5.Dataset, HDF5.Datatype, HDF5.File, HDF5.Group},\n object\n)\n\n\nAttaches key-value-pair meta entries to an HDF5 instance for each field of the given object.\n\n\n\n\n\n","category":"function"},{"location":"api/#HDF5.create_dataset","page":"API","title":"HDF5.create_dataset","text":"create_dataset(\n f::H5File,\n path::AbstractString,\n ::Type{T};\n cache_size\n) -> H5CompoundDataset\n\n\nCreates a one-dimensional compound dataset H5CompoundDataset of a given type which can be extended one-by-one. The cache is used to accumulate data and reduce the number of dataset extensions. Each time the cache is full, the HDF5 dataset will be extended, the buffer written and cleared.\n\nTo force the writing, use flush\n\n\n\n\n\n","category":"function"},{"location":"api/#Base.flush","page":"API","title":"Base.flush","text":"flush(d::H5CompoundDataset) -> Vector\n\n\nForces the cache to be written to the HDF5 file.\n\n\n\n\n\n","category":"function"},{"location":"api/#Hardware","page":"API","title":"Hardware","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"PMT\nDetectorModule\nDetector\nmodules\ngetmodule\ngetpmt\nwrite(::AbstractString, ::Detector)\nwrite(::IO, ::Detector)\nHydrophone\nread(::AbstractString, ::Type{Hydrophone})\nTripod\nread(::AbstractString, ::Type{Tripod})\nwrite(::AbstractString, ::Vector{Tripod})\npiezoenabled\nhydrophoneenabled\ncenter\nStringMechanics\nStringMechanicsParameters\nread(::AbstractString, ::Type{StringMechanics})","category":"page"},{"location":"api/#KM3io.PMT","page":"API","title":"KM3io.PMT","text":"struct PMT\n\nThe photomultiplier tube of an optical module. The id stands for the DAQ channel ID.\n\nA non-zero status means the PMT is \"not OK\". Individual bits can be read out to identify the problem (see definitions/pmt_status.jl for the bit positions and check them using the nthbitset() function).\n\nFields\n\nid::Int32\npos::Position{Float64}\ndir::Direction{Float64}\ntâ‚€::Float64\nstatus::Union{Missing, Int32}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.DetectorModule","page":"API","title":"KM3io.DetectorModule","text":"struct DetectorModule\n\nEither a base module or an optical module. A non-zero status means the module is \"not OK\". Individual bits can be read out to identify the problem (see definitions/module_status.jl for the bit positions and check them using the nthbitset() function).\n\nFields\n\nid::Int32\npos::Position{Float64}\nlocation::Location\nn_pmts::Int8\npmts::Vector{PMT}\nq::Union{Missing, Quaternion{Float64}}\nstatus::Int32\ntâ‚€::Float64\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.Detector","page":"API","title":"KM3io.Detector","text":"struct Detector\n\nA KM3NeT detector.\n\nFields\n\nversion::Int8\nid::Int32\nvalidity::Union{Missing, KM3io.DateRange}\npos::Union{Missing, UTMPosition{Float64}}\nutm_ref_grid::Union{Missing, String}\nn_modules::Int32\nmodules::Dict{Int32, DetectorModule}\nlocations::Dict{Tuple{Int64, Int64}, DetectorModule}\nstrings::Vector{Int64}\ncomments::Vector{String}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.modules","page":"API","title":"KM3io.modules","text":"modules(d::Detector) -> Vector{DetectorModule}\n\n\nReturn a vector of all modules of a given detector.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.getmodule","page":"API","title":"KM3io.getmodule","text":"getmodule(\n d::Detector,\n string::Integer,\n floor::Integer\n) -> DetectorModule\n\n\nReturn the detector module for a given string and floor.\n\n\n\n\n\ngetmodule(\n d::Detector,\n loc::Tuple{T<:Integer, T<:Integer}\n) -> DetectorModule\n\n\nReturn the detector module for a given string and floor (as Tuple).\n\n\n\n\n\ngetmodule(d::Detector, loc::Location) -> DetectorModule\n\n\nReturn the detector module for a given location.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.getpmt","page":"API","title":"KM3io.getpmt","text":"getpmt(d::DetectorModule, channel_id::Integer) -> Any\n\n\nGet the PMT for a given DAQ channel ID (TDC)\n\n\n\n\n\n","category":"function"},{"location":"api/#Base.write-Tuple{AbstractString, Detector}","page":"API","title":"Base.write","text":"write(filename::AbstractString, d::Detector; version)\n\n\nWrites the detector definition to a file, according to the DETX format specification. The version parameter can be a version number or :same, which is the default value and writes the same version as the provided detector has.\n\n\n\n\n\n","category":"method"},{"location":"api/#Base.write-Tuple{IO, Detector}","page":"API","title":"Base.write","text":"write(io::IO, d::Detector; version)\n\n\nfunction write(io::IO, d::Detector; version=:same)\n\nWrites the detector to a DETX formatted file. The target version can be specified via the version keyword. Note that if converting to higher versions, missing parameters will be filled with reasonable default values. In case of downgrading, information will be lost.\n\n\n\n\n\n","category":"method"},{"location":"api/#KM3io.Hydrophone","page":"API","title":"KM3io.Hydrophone","text":"struct Hydrophone\n\nA hydrophone, typically installed in the base module of a KM3NeT detector's string.\n\nFields\n\nlocation::Location\npos::Position{Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#Base.read-Tuple{AbstractString, Type{Hydrophone}}","page":"API","title":"Base.read","text":"read(\n filename::AbstractString,\n T::Type{Hydrophone}\n) -> Vector{Hydrophone}\n\n\nfunction read(filename::AbstractString, T::Type{Hydrophone})\n\nReads a vector of Hydrophones from an ASCII file.\n\n\n\n\n\n","category":"method"},{"location":"api/#KM3io.Tripod","page":"API","title":"KM3io.Tripod","text":"struct Tripod\n\nA tripod installed on the seabed which sends acoustic signals to modules.\n\nFields\n\nid::Int8\npos::Position{Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#Base.read-Tuple{AbstractString, Type{Tripod}}","page":"API","title":"Base.read","text":"read(\n filename::AbstractString,\n T::Type{Tripod}\n) -> Vector{Tripod}\n\n\nfunction read(filename:AbstractString, T::Type{Tripod})\n\nReads a vector of Tripods from an ASCII file.\n\n\n\n\n\n","category":"method"},{"location":"api/#Base.write-Tuple{AbstractString, Vector{Tripod}}","page":"API","title":"Base.write","text":"write(filename::AbstractString, tripods::Vector{Tripod})\n\n\nfunction write(filename::AbstractString, tripods::Dict{Int8, Tripod})\n\nWrites the position of tripods out into an ASCII file.\n\n\n\n\n\n","category":"method"},{"location":"api/#KM3io.piezoenabled","page":"API","title":"KM3io.piezoenabled","text":"piezoenabled(m::DetectorModule) -> Bool\n\n\nfunction piezoenabled(m::DetectorModule)\n\nReturn true if the piezo is enabled, false otherwise.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.hydrophoneenabled","page":"API","title":"KM3io.hydrophoneenabled","text":"hydrophoneenabled(m::DetectorModule) -> Bool\n\n\nfunction hydrophonenabled(m::DetectorModule)\n\nReturn true if the hydrophone is enabled, false otherwise.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.center","page":"API","title":"KM3io.center","text":"center(m::DetectorModule) -> Position{Float64}\n\n\nCalculate the centre of a module by fitting the crossing point of the PMT axes.\n\n\n\n\n\ncenter(d::Detector) -> Position{Float64}\n\n\nCalculate the center of the detector based on the location of the optical modules.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.StringMechanics","page":"API","title":"KM3io.StringMechanics","text":"struct StringMechanics\n\nA container structure which holds the mechanical model parameters for multiple strings, including a default value for strings which have specific parameters.\n\nFields\n\ndefault::StringMechanicsParameters\nstringparams::Dict{Int64, StringMechanicsParameters}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.StringMechanicsParameters","page":"API","title":"KM3io.StringMechanicsParameters","text":"struct StringMechanicsParameters\n\nData structure for parameters of the mechanical model of strings. This data structure is used to calculate the effective height conform to the mechanical model of the string.\n\nFields\n\na::Float64\nb::Float64\n\n\n\n\n\n","category":"type"},{"location":"api/#Base.read-Tuple{AbstractString, Type{StringMechanics}}","page":"API","title":"Base.read","text":"read(\n filename::AbstractString,\n T::Type{StringMechanics}\n) -> StringMechanics\n\n\nReads the mechanical models from a text file.\n\n\n\n\n\n","category":"method"},{"location":"api/#Optical-Data","page":"API","title":"Optical Data","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"","category":"page"},{"location":"api/#Acoustics","page":"API","title":"Acoustics","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"Waveform\nread(filename::AbstractString, T::Type{Waveform})\nAcousticSignal\nAcousticsTriggerParameter\nread(filename::AbstractString, T::Type{AcousticsTriggerParameter})","category":"page"},{"location":"api/#KM3io.Waveform","page":"API","title":"KM3io.Waveform","text":"struct Waveform\n\nWaveform translates Emitter ID to Tripod ID.\n\nFields\n\nids::Dict{Int8, Int8}\n\n\n\n\n\n","category":"type"},{"location":"api/#Base.read-Tuple{AbstractString, Type{Waveform}}","page":"API","title":"Base.read","text":"read(\n filename::AbstractString,\n T::Type{Waveform}\n) -> Waveform\n\n\nfunction read(filename::AbstractString, T::Type{Waveform})\n\nReads the waveform ASCII file.\n\n\n\n\n\n","category":"method"},{"location":"api/#KM3io.AcousticSignal","page":"API","title":"KM3io.AcousticSignal","text":"struct AcousticSignal\n\nAcousticSignal is a custom type with four fields to store all the information inside the raw acoustic binary files.\n\ndom_id::Int32 ID of the module\nutc_seconds:: UInt32 storing the first 4 Bytes and is a UNIX time stamp\nns_cycles:: UInt32 storing the second 4 Bytes\nsamples:: UInt32 storing the third 4 Bytes, corresponding to the number of data points accuired during the measring window\npcm:: Vector of Float32 of length frame_length, storing all other 4 Byte blocks. Each entry is a data point of the acoustic signal.\n\nFields\n\ndom_id::Int32\nutc_seconds::UInt32\nns_cycles::UInt32\nsamples::UInt32\npcm::Vector{Float32}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.AcousticsTriggerParameter","page":"API","title":"KM3io.AcousticsTriggerParameter","text":"struct AcousticsTriggerParameter\n\nCertain parameters which define an acoustic event.\n\nFields\n\nq::Float64\ntmax::Float64\nnmin::Int32\n\n\n\n\n\n","category":"type"},{"location":"api/#Base.read-Tuple{AbstractString, Type{AcousticsTriggerParameter}}","page":"API","title":"Base.read","text":"read(\n filename::AbstractString,\n T::Type{AcousticsTriggerParameter}\n) -> AcousticsTriggerParameter\n\n\nfunction read(filename::AbstractString, T::Type{AcousticsTriggerParameter})\n\nReads the 'acousticstriggerparameters.txt' file.\n\n\n\n\n\n","category":"method"},{"location":"api/#Calibration","page":"API","title":"Calibration","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"calibrate\ncombine\nfloordist\nslew","category":"page"},{"location":"api/#KM3io.calibrate","page":"API","title":"KM3io.calibrate","text":"calibrate(det::Detector, hits) -> Vector{XCalibratedHit}\n\n\nApply geometry and time calibration to given hits.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.combine","page":"API","title":"KM3io.combine","text":"combine(\n snapshot_hits::Vector{SnapshotHit},\n triggered_hits::Vector{TriggeredHit}\n) -> Vector{TriggeredHit}\n\n\nCombine snapshot and triggered hits to a single hits-vector.\n\nThis should be used to transfer the trigger information to the snapshot hits from a DAQEvent. The triggered hits are a subset of the snapshot hits.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.floordist","page":"API","title":"KM3io.floordist","text":"floordist(det::Detector) -> Float64\n\n\nCalculates the average floor distance between neighboured modules.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.slew","page":"API","title":"KM3io.slew","text":"slew(tot::Integer) -> Any\n\n\nReturn the time slewing for a ToT.\n\n\n\n\n\n","category":"function"},{"location":"api/#Physics","page":"API","title":"Physics","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"azimuth\nzenith\nphi\ntheta\ncherenkov\nCherenkovPhoton\nK40Rates","category":"page"},{"location":"api/#KM3io.azimuth","page":"API","title":"KM3io.azimuth","text":"azimuth(d::Direction) -> Any\n\n\nCalculates the azimuth from a given Direction according to KM3NeT conventions.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.zenith","page":"API","title":"KM3io.zenith","text":"zenith(d::Direction) -> Any\n\n\nCalculates the zenith from a given Direction according to KM3NeT conventions.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.phi","page":"API","title":"KM3io.phi","text":"phi(d::Direction) -> Any\n\n\nCalculate the phi angle for a given direction\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.theta","page":"API","title":"KM3io.theta","text":"theta(d::Direction) -> Any\n\n\nCalculate the theta angle for a given direction\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.cherenkov","page":"API","title":"KM3io.cherenkov","text":"cherenkov(\n track,\n hits::Array{T<:AbstractCalibratedHit, 1}\n) -> Any\n\n\nCalculates the parameters of cherenkov photons emitted from a track and hitting the PMTs represented as (calibrated) hits. The returned cherenkov photons hold information about the closest distance to track, the time residual, arrival time, impact angle, photon travel distance, track travel distance and photon travel direction. See CherenkovPhoton for more information.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.CherenkovPhoton","page":"API","title":"KM3io.CherenkovPhoton","text":"struct CherenkovPhoton\n\nA Cherenkov photon with parameters calculated from its inducing track. See cherenkov() for more information.\n\nFields\n\nd_closest::Float64\nd_photon::Float64\nd_track::Float64\nt::Float64\nΔt::Float64\nimpact_angle::Float64\ndir::Direction{Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.K40Rates","page":"API","title":"KM3io.K40Rates","text":"struct K40Rates\n\nK40 rates with L0 and higher level rates (with increasing multiplicities).\n\nFields\n\nL0::Float64\nL1::Vector{Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#Trigger","page":"API","title":"Trigger","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"triggered\nis3dmuon\nis3dshower\nismxshower\nisnb","category":"page"},{"location":"api/#KM3io.triggered","page":"API","title":"KM3io.triggered","text":"triggered(e) -> Vector\n\n\nReturn true if the passed object (hit, event, ...) was triggered by any trigger algorithm.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.is3dmuon","page":"API","title":"KM3io.is3dmuon","text":"is3dmuon(e::DAQEvent) -> Bool\n\n\nis3dmuon(e)\n\ndefined at /builds/common/KM3io.jl/src/tools/trigger.jl:12.\n\nReturn true the 3D Muon trigger bit is set.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.is3dshower","page":"API","title":"KM3io.is3dshower","text":"is3dshower(e::DAQEvent) -> Bool\n\n\nis3dshower(e)\n\ndefined at /builds/common/KM3io.jl/src/tools/trigger.jl:20.\n\nReturn true if the 3D Shower trigger bit is set.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.ismxshower","page":"API","title":"KM3io.ismxshower","text":"ismxshower(x) -> Bool\n\n\nismxshower(x)\n\ndefined at /builds/common/KM3io.jl/src/tools/trigger.jl:28.\n\nismxshower(e)\n\ndefined at /builds/common/KM3io.jl/src/tools/trigger.jl:29.\n\nReturn true if the MX Shower trigger bit is set.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.isnb","page":"API","title":"KM3io.isnb","text":"isnb(x) -> Bool\n\n\nisnb(x)\n\ndefined at /builds/common/KM3io.jl/src/tools/trigger.jl:36.\n\nisnb(e)\n\ndefined at /builds/common/KM3io.jl/src/tools/trigger.jl:37.\n\nReturn true if the NanoBeacon trigger bit is set.\n\n\n\n\n\n","category":"function"},{"location":"api/#ControlHost","page":"API","title":"ControlHost","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"CHClient","category":"page"},{"location":"api/#KM3io.CHClient","page":"API","title":"KM3io.CHClient","text":"struct CHClient{T}\n\nA ControlHost client which can communicate with a Ligier dispatcher to receive messages for all the subscribed tags.\n\nTo connect to a Ligier which is receiving triggered DAQ events e.g. in the KM3NeT monitoring system or in a test setup consisting of a JLigier dispatcher and a JRegurgitate instance which is redispatching DAQ events (JDAQEvent) from a ROOT file in online format to the JLigier, a CHClient can be created to subscribe the event messages with\n\njulia> using KM3io\n\njulia> c = CHClient{DAQEvent}(ip\"127.0.0.1\", 5553)\n\njulia> for event in c\n @show event\n end\ne = KM3io.DAQEvent with 127 snapshot and 6 triggered hits\ne = KM3io.DAQEvent with 147 snapshot and 6 triggered hits\ne = KM3io.DAQEvent with 154 snapshot and 8 triggered hits\ne = KM3io.DAQEvent with 152 snapshot and 6 triggered hits\n...\n...\n...\n\nFields\n\nip::Sockets.IPv4\nport::UInt16\ntags::Vector{CHTag}\nsocket::Sockets.TCPSocket\n\n\n\n\n\n","category":"type"},{"location":"api/#Tools","page":"API","title":"Tools","text":"","category":"section"},{"location":"api/#General-tools","page":"API","title":"General tools","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"categorize\nnthbitset\nmost_frequent","category":"page"},{"location":"api/#KM3io.categorize","page":"API","title":"KM3io.categorize","text":"categorize(field::Symbol, elements::Vector) -> Dict\n\n\nCategorise the struct elements of a vector by a given field into a dictionary of T.field => Vector{T}.\n\nExamples\n\njulia> using KM3io\n\njulia> struct PMT # just an ad-hoc PMT struct for demonstration purposes\n dom_id\n time\n end\n\njulia> pmts = [PMT(2, 10.4), PMT(4, 23.5), PMT(2, 42.0)];\n\njulia> categorize(:dom_id, pmts)\nDict{Any, Vector{PMT}} with 2 entries:\n 4 => [PMT(4, 23.5)]\n 2 => [PMT(2, 10.4), PMT(2, 42.0)]\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.nthbitset","page":"API","title":"KM3io.nthbitset","text":"nthbitset(n, a) -> Any\n\n\nReturn true if the n-th bit of a is set, false otherwise.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.most_frequent","page":"API","title":"KM3io.most_frequent","text":"most_frequent(iterable) -> Any\n\n\nReturn the most frequent value of a given iterable.\n\n\n\n\n\nmost_frequent(f::Function, iterable; rettype) -> Int64\n\n\nReturn the most frequent value of a given iterable based on the return value of a function f which returns (hashable) values of rettype.\n\n\n\n\n\n","category":"function"},{"location":"api/#DAQ","page":"API","title":"DAQ","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"pmtrate\npmtrates\nhrvstatus\nfifostatus\ntdcstatus\nwrstatus\nhasudptrailer\ncount_active_channels\ncount_fifostatus\ncount_hrvstatus\nstatus\nnumber_of_udp_packets_received\nmaximal_udp_sequence_number","category":"page"},{"location":"api/#KM3io.pmtrate","page":"API","title":"KM3io.pmtrate","text":"pmtrate(r::UInt8) -> Float64\n\n\nCalculate the PMT hit rate from the raw byte stored in a summary frame.\n\nThe rate of each PMT is encoded in a single byte to reduce the size of the summary frame, therefore only 256 values are possible which are mapped to an exponential function. The values are precalculated by the _getrate() function for the best performance.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.pmtrates","page":"API","title":"KM3io.pmtrates","text":"pmtrates(\n s::SummaryFrame\n) -> StaticArraysCore.SVector{31, Float64}\n\n\nReturn the actual rates (in Hz) for each PMT in a summary frame.\n\n\n\n\n\npmtrates(\n s::Summaryslice\n) -> Dict{Int32, StaticArraysCore.SVector{31, Float64}}\n\n\nReturn a dictionary of DOM IDs as keys and PMT rates [Hz] as values (Vector{Float64}).\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.hrvstatus","page":"API","title":"KM3io.hrvstatus","text":"hrvstatus(f::SummaryFrame, tdc) -> Any\n\n\nReturn true if the TDC is in high rate veto.\n\n\n\n\n\nhrvstatus(f::SummaryFrame) -> Bool\n\n\nReturn true if any of the TDCs is in high rate veto.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.fifostatus","page":"API","title":"KM3io.fifostatus","text":"fifostatus(f::SummaryFrame, tdc) -> Any\n\n\nReturn true if the TDC has FIFO almost full.\n\n\n\n\n\nfifostatus(f::SummaryFrame) -> Bool\n\n\nReturn true if any of the TDCs is in high rate veto.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.tdcstatus","page":"API","title":"KM3io.tdcstatus","text":"tdcstatus(f::SummaryFrame) -> Bool\n\n\nReturn true if TDC status is OK.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.wrstatus","page":"API","title":"KM3io.wrstatus","text":"wrstatus(f::SummaryFrame) -> Bool\n\n\nReturn true if White Rabbit status is OK.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.hasudptrailer","page":"API","title":"KM3io.hasudptrailer","text":"hasudptrailer(f::SummaryFrame) -> Bool\n\n\nReturn true if the UDP trailer is present.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.count_active_channels","page":"API","title":"KM3io.count_active_channels","text":"count_active_channels(f::SummaryFrame) -> Int64\n\n\nNumber of TDCs without high rate veto or FIFO almost full.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.count_fifostatus","page":"API","title":"KM3io.count_fifostatus","text":"count_fifostatus(f::SummaryFrame) -> Int64\n\n\nNumber of TDCs with FIFO almost full.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.count_hrvstatus","page":"API","title":"KM3io.count_hrvstatus","text":"count_hrvstatus(f::SummaryFrame) -> Int64\n\n\nNumber of TDCs with high rate veto.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.status","page":"API","title":"KM3io.status","text":"status(f::SummaryFrame) -> Bool\n\n\nReturn true if TDC and White Rabbit status are OK.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.number_of_udp_packets_received","page":"API","title":"KM3io.number_of_udp_packets_received","text":"number_of_udp_packets_received(f::SummaryFrame) -> Int32\n\n\nNumber of received UDP packets (excluding the trailer).\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.maximal_udp_sequence_number","page":"API","title":"KM3io.maximal_udp_sequence_number","text":"maximal_udp_sequence_number(f::SummaryFrame) -> Int32\n\n\nMaximal sequence number of all received UDP packets.\n\n\n\n\n\n","category":"function"},{"location":"api/#Reconstruction","page":"API","title":"Reconstruction","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"besttrack\nbestjppmuon\nbestjppshower\nbestaashower\nRecStageRange\nhashistory","category":"page"},{"location":"api/#KM3io.besttrack","page":"API","title":"KM3io.besttrack","text":"besttrack(\n e::Evt,\n rec_type::Integer,\n rsr::RecStageRange\n) -> Union{Missing, Trk}\n\n\nReturn the best reconstructed track for a given reconstruction type and reconstruction stage range. If no track could be found, missing is returned.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.bestjppmuon","page":"API","title":"KM3io.bestjppmuon","text":"bestjppmuon(e::Evt) -> Union{Missing, Trk}\n\n\nReturns the best reconstructed JMuon track of an event or missing if there are none.\n\n\n\n\n\nbestjppmuon(trks::Vector{Trk}) -> Union{Missing, Trk}\n\n\nReturns the best reconstructed JMuon track or missing if there are none.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.bestjppshower","page":"API","title":"KM3io.bestjppshower","text":"bestjppshower(e::Evt) -> Union{Missing, Trk}\n\n\nReturns the best reconstructed JShower \"track\" of an event or missing if there are none.\n\n\n\n\n\nbestjppshower(trks::Vector{Trk}) -> Union{Missing, Trk}\n\n\nReturns the best reconstructed JShower \"track\" or missing if there are none.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.bestaashower","page":"API","title":"KM3io.bestaashower","text":"bestaashower(e::Evt) -> Union{Missing, Trk}\n\n\nReturns the best reconstructed aashower \"track\" of an event or missing if there are none.\n\n\n\n\n\nbestaashower(trks::Vector{Trk}) -> Union{Missing, Trk}\n\n\nReturns the best reconstructed aashower \"track\" or missing if there are none.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.RecStageRange","page":"API","title":"KM3io.RecStageRange","text":"struct RecStageRange{T<:Integer}\n\nThis struct is used to represent a range of reconstruction stages. These are well-defined integers (see KM3NeT Dataformat) for each reconstruction algorithm and are stored in a vector named rec_stages of each Trk.\n\njulia> using KM3io\n\njulia> rsr = RecStageRange(KM3io.RECONSTRUCTION.JMUONBEGIN, KM3io.RECONSTRUCTION.JMUONEND)\nRecStageRange{Int64}(0, 99)\n\njulia> KM3io.RECONSTRUCTION.JMUONSIMPLEX ∈ rsr\ntrue\n\njulia> KM3io.RECONSTRUCTION.AASHOWERFITPREFIT ∈ rsr\nfalse\n\njulia> 23 ∈ rsr\ntrue\n\njulia> 523 ∈ rsr\nfalse\n\nFields\n\nlower::Integer\nupper::Integer\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.hashistory","page":"API","title":"KM3io.hashistory","text":"hashistory(\n t::Trk,\n rec_type::Integer,\n rsr::RecStageRange\n) -> Bool\n\n\nReturns true if a track with a given rec_type contains all the reconstruction stages in rsr::RecStageRange.\n\n\n\n\n\nhashistory(\n t::Trk,\n rec_type::Integer,\n rec_stage::Integer\n) -> Bool\n\n\nReturns true if a track with a given rec_type contains the rec_stage.\n\n\n\n\n\n","category":"function"},{"location":"examples/cherenkov_times/#Cherenkov-times","page":"Cherenkov times","title":"Cherenkov times","text":"","category":"section"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"using PGFPlotsX\nsavefigs = (figname, obj) -> begin\n pgfsave(figname * \".pdf\", obj)\n run(`pdftocairo -svg -l 1 $(figname * \".pdf\") $(figname * \".svg\")`)\n pgfsave(figname * \".tex\", obj);\n return nothing\nend","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"In this example, we will pick the best reconstructed muon (from the Jpp muon reconstruction chain JMuon) in each event and calculate the Cherenkov hit time residuals for each triggered hit.","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"We open the a sample file from the KM3NeTTestData package:","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"using KM3io, KM3NeTTestData\n\nf = ROOTFile(datapath(\"offline\", \"mcv6.0.gsg_muon_highE-CC_50-500GeV.km3sim.jterbr00008357.jorcarec.aanet.905.root\"))","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"Each event holds a vector of reconstructed tracks (Vector{Trk}) behind the .trks field. This vector contains different stages of reconstruction results from a variety of reconstruction algorithms (JMuon, JShower, aashower etc.). KM3io.jl exports helper functions to pick the best reconstructed track for a given reconstruction algorithm. The logic is based on the reference implementation in KM3NeT DataFormat tools. The function bestjppmuon() can be used to select the best reconstructed JMuon for a given event:","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"evt = f.offline[1]\nbest_muon = bestjppmuon(evt)","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"We now use this track as a seed to calculate the Cherenkov photon (see CherenkovPhoton) parameters using cherenkov() for each hit triggered hit in the event. To select only triggered hits, we use the triggered() function together withe filter() which returns a new vector of triggered hits:","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"cherenkov(best_muon, filter(triggered, evt.hits))","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"To obtain more statistics, we iterate through all the events and calculate the Cherenkov time residuals for each set of hits based on the best reconstruction track. We fill the time residuals in a 1D histogram using the FHist package.","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"note: Note\nThis example uses PGFPlotsX which is a wrapper for the LaTeX library PGFPlots. Feel free to adapt the example to use your favourite plotting library.","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"using FHist\n\nΔts = Hist1D(;bins=-10:50)\n\nfor evt ∈ f.offline\n m = bestjppmuon(evt)\n cherenkov_photons = cherenkov(m, filter(triggered, evt.hits))\n for cp ∈ cherenkov_photons\n push!(Δts, cp.Δt)\n end\nend\n\naxis = @pgf Axis(\n {\n ybar, const_plot, grid,\n xlabel=raw\"\\Delta t / ns\",\n ylabel=\"counts\",\n },\n PlotInc(Coordinates(bincenters(Δts), bincounts(Δts)), raw\"\\closedcycle\")\n)\naxis\nsavefigs(\"cherenkov\", ans) # hide","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"[.pdf], [generated .tex]","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"(Image: )","category":"page"},{"location":"manual/rootfiles/#ROOT-Files","page":"ROOT Files","title":"ROOT Files","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The two main types of ROOT files in KM3NeT are the online and offline files, however, both types can be mixed together as the data is stored in distinct ROOT trees. UnROOT has a single ROOTFile type to represent a KM3NeT ROOT file which can be used to access both the online and offline information. This section describes what kind of data is stored in each tree and how to access them.","category":"page"},{"location":"manual/rootfiles/#offline-dataformat","page":"ROOT Files","title":"Offline Dataformat","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The offline dataformat is used to store Monte Carlo (MC) simulations and reconstruction results. The OfflineTree type represents an actual offline file and it is essentially a vector of events (Vector{Evt}) with some fancy caching, lazy access and slicing magic. The offline tree is accessible via the .offline field of the ROOTFile type.","category":"page"},{"location":"manual/rootfiles/#MC-Header","page":"ROOT Files","title":"MC Header","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The MC header stores metadata related to the simulation chain. The individual entries can be accessed as properties, as shown below.","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"julia> using KM3io, KM3NeTTestData\n\njulia> f = ROOTFile(datapath(\"offline\", \"numucc.root\"))\nROOTFile{OnlineTree (0 events, 0 summaryslices), OfflineTree (10 events)}\n\njulia> f.offline\nOfflineTree (10 events)\n\njulia> f.offline.header\nMCHeader\n DAQ => (livetime = 394,)\n PDF => (i1 = 4, i2 = 58)\n XSecFile => Any[]\n can => (zmin = 0, zmax = 1027, r = 888.4)\n can_user => [0.0, 1027.0, 888.4]\n coord_origin => (x = 0, y = 0, z = 0)\n cut_in => (Emin = 0, Emax = 0, cosTmin = 0, cosTmax = 0)\n cut_nu => (Emin = 100, Emax = 1.0e8, cosTmin = -1, cosTmax = 1)\n cut_primary => (Emin = 0, Emax = 0, cosTmin = 0, cosTmax = 0)\n cut_seamuon => (Emin = 0, Emax = 0, cosTmin = 0, cosTmax = 0)\n decay => [\"doesnt\", \"happen\"]\n detector => NOT\n drawing => Volume\n end_event => Any[]\n genhencut => (gDir = 2000, Emin = 0)\n genvol => (zmin = 0, zmax = 1027, r = 888.4, volume = 2.649e9, numberOfEvents = 100000)\n kcut => 2\n livetime => (numberOfSeconds = 0, errorOfSeconds = 0)\n model => (interaction = 1, muon = 2, scattering = 0, numberOfEnergyBins = 1, field_4 = 12)\n muon_desc_file => Any[]\n ngen => 100000.0\n norma => (primaryFlux = 0, numberOfPrimaries = 0)\n nuflux => Real[0, 3, 0, 0.5, 0.0, 1.0, 3.0]\n physics => (program = \"GENHEN\", version = \"7.2-220514\", date = 181116, time = 1138)\n seed => (program = \"GENHEN\", level = 3, iseed = 305765867, field_3 = 0, field_4 = 0)\n simul => (program = \"JSirene\", version = 11012, date = \"11/17/18\", time = 7)\n sourcemode => diffuse\n spectrum => (alpha = -1.4,)\n start_run => 1\n target => isoscalar\n usedetfile => false\n xlat_user => 0.63297\n xparam => OFF\n zed_user => [0.0, 3450.0]\n\n\njulia> f.offline.header.genvol\n(zmin = 0, zmax = 1027, r = 888.4, volume = 2.649e9, numberOfEvents = 100000)\n\njulia> f.offline.header.genvol.volume\n2.649e9","category":"page"},{"location":"manual/rootfiles/#Event-data","page":"ROOT Files","title":"Event data","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The following REPL session shows how to open a file, access individual events or slices of events, loop through events and access e.g. the tracks which are stored in the events.","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"julia> using KM3io, KM3NeTTestData\n\njulia> f = ROOTFile(datapath(\"offline\", \"km3net_offline.root\"))\nROOTFile{OfflineTree (10 events)}\n\njulia> f.offline[5]\nKM3io.Evt (83 hits, 0 MC hits, 56 tracks, 0 MC tracks)\n\njulia> f.offline[3:5]\n3-element Vector{KM3io.Evt}:\n KM3io.Evt (318 hits, 0 MC hits, 56 tracks, 0 MC tracks)\n KM3io.Evt (157 hits, 0 MC hits, 56 tracks, 0 MC tracks)\n KM3io.Evt (83 hits, 0 MC hits, 56 tracks, 0 MC tracks)\n\njulia> event = f.offline[1]\nKM3io.Evt (176 hits, 0 MC hits, 56 tracks, 0 MC tracks)\n\njulia> event.trks[1:4]\n4-element Vector{KM3io.Trk}:\n KM3io.Trk(1, [445.835395997812, ... , 294.6407542676734, 4000)\n KM3io.Trk(2, [445.835395997812, ... , 294.6407542676734, 4000)\n KM3io.Trk(3, [448.136188112227, ... , 294.6407542676734, 4000)\n KM3io.Trk(4, [448.258348900570, ... , 291.64653112688273, 4000)\n\njulia> for event in f.offline\n @show event\n end\nevent = KM3io.Evt (176 hits, 0 MC hits, 56 tracks, 0 MC tracks)\nevent = KM3io.Evt (125 hits, 0 MC hits, 55 tracks, 0 MC tracks)\nevent = KM3io.Evt (318 hits, 0 MC hits, 56 tracks, 0 MC tracks)\nevent = KM3io.Evt (157 hits, 0 MC hits, 56 tracks, 0 MC tracks)\nevent = KM3io.Evt (83 hits, 0 MC hits, 56 tracks, 0 MC tracks)\nevent = KM3io.Evt (60 hits, 0 MC hits, 56 tracks, 0 MC tracks)\nevent = KM3io.Evt (71 hits, 0 MC hits, 56 tracks, 0 MC tracks)\nevent = KM3io.Evt (84 hits, 0 MC hits, 56 tracks, 0 MC tracks)\nevent = KM3io.Evt (255 hits, 0 MC hits, 54 tracks, 0 MC tracks)\nevent = KM3io.Evt (105 hits, 0 MC hits, 56 tracks, 0 MC tracks)","category":"page"},{"location":"manual/rootfiles/#online_dataformat","page":"ROOT Files","title":"Online Dataformat","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The online dataformat refers to the dataformat which is written by the data acquisition system (DAQ) of the KM3NeT detectors, more precisely, the ROOT files produced by the JDataFilter which is part of the Jpp framework. The very same format is used in run-by-run (RBR) Monte Carlo (MC) productions, which mimic the detector response and therefore produce similarly structured data. The online data can be accessed via the .online field of the ROOTFile type.","category":"page"},{"location":"manual/rootfiles/#Event-data-2","page":"ROOT Files","title":"Event data","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The events are accessible via ROOTFile(filename).online.events which supports indexing, slicing and iteration, just like the we have seen above, in case of the offline events. Notice however that the online format also contains other types of trees, that's why the explicit .events field is needed. Everything is lazily loaded so that the data is only occupying memory when it's actually accessed, similar to the offline access. In the examples below, we use KM3NeTTestdata to get access to small sample files.","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"julia> using KM3io, KM3NeTTestData\n\njulia> f = ROOTFile(datapath(\"online\", \"km3net_online.root\"))\nROOTFile{OnlineTree (3 events, 3 summaryslices), OfflineTree (0 events)}\n\njulia> event = f.online.events[1]\nKM3io.DAQEvent with 96 snapshot and 18 triggered hits\n\njulia> event.triggered_hits[4:8]\n5-element Vector{KM3io.TriggeredHit}:\n KM3io.TriggeredHit(808447186, 0x00, 30733214, 0x19, 0x0000000000000016)\n KM3io.TriggeredHit(808447186, 0x01, 30733214, 0x15, 0x0000000000000016)\n KM3io.TriggeredHit(808447186, 0x02, 30733215, 0x15, 0x0000000000000016)\n KM3io.TriggeredHit(808447186, 0x03, 30733214, 0x1c, 0x0000000000000016)\n KM3io.TriggeredHit(808451907, 0x07, 30733441, 0x1e, 0x0000000000000004)\n\njulia> for event ∈ f.online.events\n @show event.header.frame_index length(event.snapshot_hits)\n end\nevent.header.frame_index = 127\nlength(event.snapshot_hits) = 96\nevent.header.frame_index = 127\nlength(event.snapshot_hits) = 124\nevent.header.frame_index = 129\nlength(event.snapshot_hits) = 78","category":"page"},{"location":"manual/rootfiles/#Summaryslices-and-Summary-Frames","page":"ROOT Files","title":"Summaryslices and Summary Frames","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Summaryslices are generated from timeslices (raw hit data) and are produced by the DataFilter. A slice contains the data of 100ms and is divided into so-called frames, each corresponding to the data of a single optical module. Due to the high amount of data, the storage of timeslices is usually reduced by a factor of 10-100 after the event triggering stage. However, summaryslices are covering the full data taking period. They however do not contain hit data but only the rates of the PMTs encoded into a single byte, which therefore is only capable to store 256 different values. The actual rate is calcuated by the helper functions pmtrate() and pmtrates() which take a SummaryFrame and optionally a PMT channel ID as arguments.","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The summaryslices are accessible using the .summaryslices attribute of the OnlineTree instance, which again is hidden behind the .online field of a ROOTFile:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"julia> using KM3io, KM3NeTTestData\n\njulia> f = ROOTFile(datapath(\"online\", \"km3net_online.root\"))\nROOTFile{OnlineTree (3 events, 3 summaryslices), OfflineTree (0 events)}\n\njulia> f.online.summaryslices\nKM3io.SummarysliceContainer with 3 summaryslices\n\njulia> for s ∈ f.online.summaryslices\n @show s.header\n end\ns.header = KM3io.SummarysliceHeader(44, 6633, 126, KM3io.UTCExtended(0x5dc6018c, 0x23c34600, false))\ns.header = KM3io.SummarysliceHeader(44, 6633, 127, KM3io.UTCExtended(0x5dc6018c, 0x29b92700, false))\ns.header = KM3io.SummarysliceHeader(44, 6633, 128, KM3io.UTCExtended(0x5dc6018c, 0x2faf0800, false))","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Each summaryslice consists of multiple frames, one for every optical module which has sent data during the recording time of the corresponding timeslice.","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"note: Note\nDuring run transistions, the number of summaryframes in a summaryslice is fluctuating a lot until it eventually saturates, usually within a few seconds or minutes. Therefore, it is expected that the number of summaryframes (i.e. active DOMs) is low at the beginning of the file and stabilises after a few summaryslices.","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"To access the actual PMT rates and flags (e.g. for high-rate veto or FIFO status) of a summaryframe, several helper functions exist. Let's grab a summaryslice:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"using KM3io, KM3NeTTestData\n\nf = ROOTFile(datapath(\"online\", \"km3net_online.root\"))\n\ns = f.online.summaryslices[1]","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"and have a look at one of the frames, the 23rd of the first summaryslice:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"frame = s.frames[23]","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The White Rabbit status:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"wrstatus(frame)","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Checking if any of the PMTs is in high rate veto:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"hrvstatus(frame)","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The number of PMTs in high rate veto:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"count_hrvstatus(frame)","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Checking if any of the TDC FIFOs were almost full:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"fifostatus(frame)","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Counting the number of TDCs which had FIFO almost full:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"count_fifostatus(frame)","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The rates of each individual PMT channel ordered by increasing channel ID:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"pmtrates(frame)","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Individual PMT parameters can be accessed as well, by passing the summaryframe and the PMT ID (DAQ channel ID):","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"pmtrate(frame, 3)","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Here is an example of a simple summary output:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"for pmt in 0:30\n println(\"PMT $(pmt): HRV($(hrvstatus(frame, pmt))) FIFO($(fifostatus(frame, pmt)))\")\nend","category":"page"},{"location":"manual/rootfiles/#xrootd-access","page":"ROOT Files","title":"xrootd access","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"You can access files directly via xrootd by providing the URL on e.g. HPSS. Be aware that URL has to be typed correctly, / instead of // results in an error!), so it should always start with something like root://ccxroot:1999//hpss/....","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"julia> using KM3io\n\njulia> f = ROOTFile(\"root://ccxroot:1999//hpss/in2p3.fr/group/km3net/data/raw/sea/KM3NeT_00000132/14/KM3NeT_00000132_00014481.root\")\nROOTFile{OnlineTree (136335 events, 107632 summaryslices)}","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Now you can use it as if it was on your local filesystem. UnROOT.jl will take care of loading only the needed data from the server.","category":"page"},{"location":"examples/hdf5/#HDF5","page":"HDF5","title":"HDF5","text":"","category":"section"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"Plain ASCII (CSV) files are often perfectly fine for small, tabular datasets but when dealing with larger amounts of data, HDF5 comes in handy with compression, metadata and hierachical datasets. KM3NeT uses HDF5 in many analysis chains, often to store intermediate or end results.","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"This example shows how to create an HDF5 file and write some vectors of structs into different datasets.","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"using KM3io\nusing Random\n\nRandom.seed!(23) # to make things reproducible ;)\n\nf = H5File(\"foo.h5\", \"w\")","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"We now have an H5File instance which we can use to store datasets.","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"Let's say we have our custom data type (struct) like","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"struct Particle\n x::Float32\n y::Float32\n E::Int64\nend","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"and we generate instances of Particle in a loop which we want to dump directly into an HDF5 file to the dataset stored at simulation/particles, meaning that simulation is the group name and particles the dataset name.","category":"page"},{"location":"examples/hdf5/#Creating-datasets","page":"HDF5","title":"Creating datasets","text":"","category":"section"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"First, we create our dataset with our type Particle. This is a so called H5CompoundDataset and resembles a dataset wich has a compound type (struct) associated with it:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"dset = create_dataset(f, \"simulation/particles\", Particle)","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"We fill some random particles using the dummy loop:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"for i in 1:1000\n # creates some random particle\n particle = Particle(rand(), rand(), rand(1:1000))\n # we push to the dataset, just like if it was an Array\n push!(dset, particle)\nend","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"note: Note\nTo avoid excessive I/O, KM3io uses a cache for each H5CompoundDataset. If you don't close the H5File properly, you might lose data which is still sitting in the cache. Therefore, always use close(f) to make sure that all the caches are dumped to the HDF5 file. The methods flush(d::H5CompoundDataset) and flush(f::H5File) can be used to manually to prematurely flush the cache of a dataset or all caches of an HDF5 file respectively.","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"Let's close the file","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"close(f)","category":"page"},{"location":"examples/hdf5/#Reading-datasets","page":"HDF5","title":"Reading datasets","text":"","category":"section"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"We open the file from the previous example with HDF5.jl, just to demonstrate that we can read it without any KM3NeT related libraries:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"using HDF5\n\nf = h5open(\"foo.h5\")\nparticles = f[\"simulation/particles\"]\n\n@show particles[1:5]","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"Notice that HDF5.jl automatically created NamedTuple instances with the same fieldnames as our own struct definition of Particle. This means that the elements behave just like the original one regarding the field access:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"particles[2].E","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"The whole vector can also be reinterpreted to the original struct definition with zero-cost. This can be mandatory if the data is then passed to other methods which require a specific type (in this case Particle). The following line will only work if Particle is already defined (i.e. the correspoinding module has been loaded). It is also mandatory to pass a slice (here, we pass the full slice by using [:]) to reinterpret and not the dataset itself:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"reinterpreted_particles = reinterpret(Particle, particles[:])","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"Each element is now a proper Particle instance:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"reinterpreted_particles[4]","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"KM3io also writes the name of the struct into the attributes of the dataset:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"attrs(particles)[\"struct_name\"]","category":"page"},{"location":"examples/hdf5/#Adding-metadata","page":"HDF5","title":"Adding metadata","text":"","category":"section"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"Sometimes it's useful to keep track of additional metadata, e.g. a given set of parameters for a specific dataset. The addmeta() function can be used to attach key-value-pairs from a struct to a variety of HDF5 structures, like files, datasets or groups. The following example demonstrates it:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"using KM3io\nusing HDF5\n\nstruct SimulationParameters\n can_height::Int32\n can_radius::Int32\n minimum_energy::Float64\n maximum_energy::Float64\nend\n\nsimparams = SimulationParameters(800, 200, 1e3, 1e7)\n\nf = h5open(\"simulation.h5\", \"w\")\naddmeta(f, simparams)\n\nattributes(f)","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"To access individual attributes, use HDF5.read_attribute:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"read_attribute(f, \"can_radius\")","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"note: Note\nIt is possible to add metadata to datasets and groups too. Make sure that the struct you pass to addmeta() only contains primitive types or strings in their fields. Arrays and other nested or compound fieldtypes are not supported by HDF5.","category":"page"},{"location":"examples/offline_data/#Offline-data","page":"Offline data","title":"Offline data","text":"","category":"section"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"Let's use the KM3NeTTestData Julia package which contains all kinds of KM3NeT related sample files. The datapath() function can be used to get a path to such a file. In the following, we will discover the numucc.root file which contains 10 muon neutrino charged current interaction events.","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"using KM3io, KM3NeTTestData\n\nf = ROOTFile(datapath(\"offline\", \"numucc.root\"))","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"The ROOTFile is the container object which gives access to both the online and offline tree. In this case, the online tree is empty","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"f.online","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"and the offline tree holds our 10 MC events:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"f.offline","category":"page"},{"location":"examples/offline_data/#Events","page":"Offline data","title":"Events","text":"","category":"section"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"To access a single event, you can use the usual indexing syntax:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"some_event = f.offline[5]","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"or ranges of events:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"events = f.offline[6:9]","category":"page"},{"location":"examples/offline_data/#Hits","page":"Offline data","title":"Hits","text":"","category":"section"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"Each event consists of a vector of hits, MC hits, tracks and MC tracks. Depending on the file, they may be empty. They are accessible via the fields .hit, .mc_hits, .trks and .mc_trks.","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"Let's grab an event:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"evt = f.offline[3]","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"and have a look at its contents:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"evt.hits","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"Let's close this file properly:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"close(f)","category":"page"},{"location":"examples/offline_data/#Usr-data","page":"Offline data","title":"Usr data","text":"","category":"section"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"You can also access \"usr\"-data, which is a dynamic placeholder (Dict{String, Float64}) to store arbitrary data. Some software store values here which are only losely defined. Ideally, if these fields are used regulary by a software, a proper definition in the KM3NeT dataformat should be created and added to the according Struct as a field.","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"Here is an example how to access the \"usr\"-data of a single event:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"f = ROOTFile(datapath(\"offline\", \"usr-sample.root\"))\n\nf.offline[1].usr","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"close(f)","category":"page"},{"location":"manual/hdf5/#HDF5-Files","page":"HDF5 Files","title":"HDF5 Files","text":"","category":"section"},{"location":"manual/hdf5/","page":"HDF5 Files","title":"HDF5 Files","text":"...","category":"page"},{"location":"#KM3io.jl","page":"Home","title":"KM3io.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"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 (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++.","category":"page"},{"location":"","page":"Home","title":"Home","text":"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.","category":"page"},{"location":"","page":"Home","title":"Home","text":"note: Note\nThe library is still under development so that the API might slightly change. Feedback and contributions are highly welcome!","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"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","category":"page"},{"location":"","page":"Home","title":"Home","text":"git clone https://git.km3net.de/common/julia-registry ~/.julia/registries/KM3NeT","category":"page"},{"location":"","page":"Home","title":"Home","text":"After that, you can instal KM3io.jl just like any other Julia package:","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> import Pkg; Pkg.add(\"KM3io\")","category":"page"},{"location":"","page":"Home","title":"Home","text":"note: Note\nIf you encounter the error UndefVarError: libhdf5 not defined, you are probably using an M1 or M2 Mac computer. There is an issue with HDF5.jll due to a missing precompiled libhdf5 artifact for the M1 and M2 architectures, so you need to install it manually and set an envrionment variable before starting Julia. You can easily install hdf5lib using e.g. brew:brew install hdf5and then set the environment variable JULIA_HDF5_PATH to point to the location of the HDF5 files (put this line into your ~/.bashrc or ~/.zshrc or whatever shell you use):export JULIA_HDF5_PATH=/opt/homebrew/Cellar/hdf5/1.12.2_2Make sure that the path is correct, you might have a different version number.","category":"page"},{"location":"#Quickstart","page":"Home","title":"Quickstart","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"julia> using KM3io, KM3NeTTestData\n\njulia> f = ROOTFile(datapath(\"offline\", \"numucc.root\"))\nROOTFile{OnlineTree (0 events, 0 summaryslices), OfflineTree (10 events)}\n\njulia> f.offline\nOfflineTree (10 events)\n\njulia> some_event = f.offline[3]\nKM3io.Evt (3680 hits, 28 MC hits, 38 tracks, 12 MC tracks)","category":"page"},{"location":"#Acknowledgements","page":"Home","title":"Acknowledgements","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Thanks to Johannes Schumann for providing the awesome project logo!","category":"page"},{"location":"manual/tools/#Tools","page":"Tools","title":"Tools","text":"","category":"section"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"There are many commonly used routines to find for example the best reconstructed muon track or find out if a given hit was flagged by a specific trigger algorithm. This section will show some helper functions available in KM3io.jl.","category":"page"},{"location":"manual/tools/#Best-track/shower","page":"Tools","title":"Best track/shower","text":"","category":"section"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"In KM3NeT, the best reconstructed track or shower of a given set of tracks respectively showers is the one with the highest value of the likelihood parameter (lik) and the longest reconstruction history (rec_stages) which is a record of reconstruction stages performed during the whole fitting procedure.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"The offline dataformat, which is used to store reconstruction information, has only a single Vector{Trk} per event which is a flat list of reconstructed tracks and showers. This vector can be a mix of different reconstruction algorithms (JGandalf, aashower, FibonacciFit, ...) and different stages of each, like prefit candidates, intermediate fits and final results. Therefore it is necessary to take the reconstruction type (rec_type) and also the values of the reconstruction stages (rec_stages) into account. Each reconstruction algorithm and each of their reconstruction stages have their own unique identifiers, which are stored in these two fields.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"note: Note\nBoth tracks and showers are stored as Trk. This comes from the fact that the original KM3NeT dataformat defintion for offline files uses the same C++ class (named Trk).","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"The helper functions in KM3io.jl to pick the best track/shower always start with the prefix best, followed by the common name of the reconstruction routine, like jppmuon, or aashower. For example bestjppmuon(), bestjppshower() or besttrack(), latter being a more general function which gives the possibility to fine tune the selection criteria.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"The API documentation of all related functions can be found in the Reconstruction section.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"The input can be an event (Evt) or a vector of reconstructed tracks (Vector{Trk}). If no track/shower could be found, missing is returned instead.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"Below are some examples of how to use these functions.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"using KM3io, KM3NeTTestData\n\nf = ROOTFile(datapath(\"offline\", \"km3net_offline.root\"))","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"event = f.offline[1]","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"bestjppmuon(event)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"bestjppshower(event)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"bestaashower(event)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"bestjppshower(event.trks)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"bestaashower(event.trks)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"Additonally, there are helper functions which can be used to check if a specific reconstruction stage or result is present in an event or a given set of tracks/showers.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"track = event.trks |> first","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasjppmuonprefit(track)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasjppmuonsimplex(track)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasjppmuongandalf(track)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasjppmuonfit(track)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasaashowerfit(track)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasreconstructedjppmuon(event)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasreconstructedjppshower(event)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasreconstructedaashower(event)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"note: Note\nTo check multiple events in one go, use the Broadcasting feature of the Julia language by putting a dot (.) at the end of the function name, e.g. bestjppmuon.(f.offline) which will find the best Jpp muon reconstruction result for each event in the offline tree.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"bestjppmuon.(f.offline[2:5])","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"Let's close our file ;)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"close(f)","category":"page"},{"location":"manual/tools/#Trigger-masks/flags","page":"Tools","title":"Trigger masks/flags","text":"","category":"section"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"KM3NeT uses a 64bit integer type to store information about which triggers have fired for a given event or hit. The index of the bit which indicates if a specific trigger has fired is defined in the KM3NeT Dataformat specification which is used in KM3io.jl.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"Functions to check if a trigger has fired are for example","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"is3dmuon()\nis3dshower()\nismxshower()\nisnb()","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"which all accept either an event is input or something which has a .trigger_mask field, like a triggered hit.","category":"page"}] +[{"location":"manual/detector/#Detector-and-its-Components","page":"Detector and its Components","title":"Detector and its Components","text":"","category":"section"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"In this example, we will explore the components of a KM3NeT detector, which is represented by the Detector type in KM3io.jl. The detector description is stored in so-called DETX and DATX files, named after their filename extensions .detx (ASCII) and .datx (binary) respectively. By time of writing this example, v5 is the latest format version.","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"note: Note\nKM3io.jl offers conversions between the different DETX format versions. Typically, each major version brings a new set of parameters. Downgrading is therefore not lossless. When when upgrading from one version to another, the new parameters needs to be filled in. Some of these can be calculated from existing ones, like the module position, which was introduced in v4 and is equal to the crossing point of the PMT axes. Otherwise, these parameters are either set to meaningful default values or to missing.","category":"page"},{"location":"manual/detector/#Loading-a-DETX/DATX-File","page":"Detector and its Components","title":"Loading a DETX/DATX File","text":"","category":"section"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"The Detector type has a constructor which takes a filepath to a DETX or DATX file. The KM3NeTTestData.jl offers a collection of detector sample files, so let's pick one of them:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"using KM3io, KM3NeTTestData\n\ndet = Detector(datapath(\"detx\", \"detx_v5.detx\"))","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"A detector configuration (format version 5) has been loaded with 6 strings (sometimes also called detection unit or DU) holding a total 114 modules.","category":"page"},{"location":"manual/detector/#Accessing-Modules","page":"Detector and its Components","title":"Accessing Modules","text":"","category":"section"},{"location":"manual/detector/#Iterating-over-all-modules","page":"Detector and its Components","title":"Iterating over all modules","text":"","category":"section"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"There are multiple ways to access modules within a Detector. One of them is iterating over it, which yields DetectorModule instances in no specific order:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"for m in det\n println(m)\nend","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"warning: Warning\nmodule is a reserved keyword in Julia and mod is the \"modulo function\", so keep this in mind when chosing a variable name for a DetectorModule. Most of the time m is fine, or just be verbose with detector_module and use your editors tab-completion.","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"As we can see in the output, there are two types of modules: optical modules and base modules. The main difference between the two in the detector file context is that base modules do not contain PMTs and are always sitting on floor 0.","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"note: Note\nAlthough iterating over a Detector feels like iterating over a vector, accessing single elements via det[idx] will not work as such since it requires the idx to be a module ID. This design was chosen since the detector dataformat specification does not specify module ordering, so there is no such thing as the \"n-th module\". Accessing modules by their module ID however is the standard use case, see below.","category":"page"},{"location":"manual/detector/#Detector-Modules","page":"Detector and its Components","title":"Detector Modules","text":"","category":"section"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"Modules have a unique identification number called module ID (sometimes also called \"DOM ID\", where DOM stands for \"Digital Optical Module\") and we can use this ID to access individual modules within a Detector instance.","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"The .modules field is a dictionary which maps the modules to their module IDs:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"det.modules","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"A flat vector of modules can be obtained with:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"modules(det)","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"To access a module with a given module ID, one can either use the dictionary or index the Detector directly, which is the recommended way:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"detector_module = det[808468425]","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"Or for a given string and floor:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"det[3, 15]","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"It is possible to select all modules for a given floor on all strings using the : syntax. Here we select all the base modules on each string:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"det[:, 0]","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"Another way is using the getmodule(d::Detector, string::Integer, floor::Integer) function to access a module on a given string and floor:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"detector_module = getmodule(det, 3, 15)","category":"page"},{"location":"manual/detector/#PMTs","page":"Detector and its Components","title":"PMTs","text":"","category":"section"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"Each optical module consists of PMTs, which can be access using the getpmts(m::DetectorModule) function:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"getpmts(detector_module)","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"To access a specific PMT with a given channel ID (TDC ID), use the getpmt(m::DetectorModule, channel_id::Integer) function. Here, we access the PMT at DAQ channel 0 of our previously obtained detector module:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"getpmt(detector_module, 0)","category":"page"},{"location":"manual/calibration/#Calibration","page":"Calibration","title":"Calibration","text":"","category":"section"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"It's implemented but not documented here yet. Check out the docs calibrate function's docstring!","category":"page"},{"location":"examples/controlhost/#Accessing-Live-Data","page":"Accessing Live Data","title":"Accessing Live Data","text":"","category":"section"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"This example shows how to access and process live data (events) from the KM3NeT DAQ system. We will use two Jpp command line tools (JLigier and JRegurgitate) to create a ligier dispatcher and send triggered DAQ events to it.","category":"page"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"This example uses Jpp v14.4.3 and real data from a KM3NeT detector (online ROOT format) with the filename KM3NeT_00000075_00010275.root which can be found on the HPSS storage.","category":"page"},{"location":"examples/controlhost/#Launching-JLigier","page":"Accessing Live Data","title":"Launching JLigier","text":"","category":"section"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"We open a terminal and launch the JLigier process with a high debug level. This ligier is the central communication point and it will receive messages which are tagged with short label of maximum 8 characters.","category":"page"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"$ JLigier -P 5553 -d 3\nPort 5553\nMemory limit 16760735744\nQueue limit 100","category":"page"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"The ligier is now running and and listening on port 5553 of all host IP addresses (including the localhost 127.0.0.1). Clients can connect to it and subscribe for a given set of message tags. Leave this terminal open.","category":"page"},{"location":"examples/controlhost/#Simulating-the-DAQ","page":"Accessing Live Data","title":"Simulating the DAQ","text":"","category":"section"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"The first client we start in new terminal session is the JRegurgitate process which takes a ROOT file (in online format), a class identifier, a few other parameters like the frequency and timeout of the messages and also the IP and port of the ligier to send to. We will use this application to simulate the KM3NeT DAQ – at least the output of the JDataFilter which is responsible for triggering events and sending them downstreams to a JLigier so that they can be picked up by the JDataWriter to store them in ROOT files (online format).","category":"page"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"$ JRegurgitate -f /data/sea/KM3NeT_00000075_00010275.root -C JDAQEvent -R 2 -T 10000000 -H 127.0.0.1:5553","category":"page"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"This program is fairly quite but if you look at the terminal where the JLigier is running, you'll see a flood of messages, showing that a new client has connected and data is received (tagged with IO_EVT). It also prints the number of bytes of each message:","category":"page"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"$ JLigier -P 5553 -d 3\nPort 30001\nMemory limit 16760735744\nQueue limit 100\nNew client[4]\nClient[4].read(0,1,1756)\nClient[4].read(1,2,0)\nMessage[4] IO_EVT 1772\nClient[4].read(0,1,1394)\nClient[4].read(1,2,0)\nMessage[4] IO_EVT 1410\nClient[4].read(0,1,1716)\n...\n...\n...","category":"page"},{"location":"examples/controlhost/#Retrieving-Events","page":"Accessing Live Data","title":"Retrieving Events","text":"","category":"section"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"Now open a thrid terminal and fire up the Julia REPL. With a few lines, we will able to connect to the ligier and receive DAQ events interactively.","category":"page"},{"location":"examples/controlhost/","page":"Accessing Live Data","title":"Accessing Live Data","text":"julia> using KM3io\n\njulia> c = CHClient{KM3io.DAQEvent}(ip\"127.0.0.1\", 5553)\nCHClient{DAQEvent}(ip\"127.0.0.1\", 0x7531, CHTag[CHTag(\"IO_EVT\")], Sockets.TCPSocket(RawFD(20) open, 0 bytes waiting))\n\njulia> for e in c\n @show e\n end\ne = DAQEvent with 126 snapshot and 7 triggered hits\ne = DAQEvent with 138 snapshot and 6 triggered hits\ne = DAQEvent with 149 snapshot and 6 triggered hits\ne = DAQEvent with 149 snapshot and 6 triggered hits\ne = DAQEvent with 136 snapshot and 6 triggered hits\n...\n...\n...","category":"page"},{"location":"api/#API","page":"API","title":"API","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"","category":"page"},{"location":"api/#Basic-Data-Structures","page":"API","title":"Basic Data Structures","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"Position\nDirection\nLocation","category":"page"},{"location":"api/#KM3io.Position","page":"API","title":"KM3io.Position","text":"struct Position{T} <: StaticArraysCore.FieldVector{3, T}\n\nA vector to represent a position in 3D.\n\nFields\n\nx::Any\ny::Any\nz::Any\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.Direction","page":"API","title":"KM3io.Direction","text":"struct Direction{T<:AbstractFloat} <: StaticArraysCore.FieldVector{3, T<:AbstractFloat}\n\nA vector to represent a direction in 3D.\n\nFields\n\nx::AbstractFloat\ny::AbstractFloat\nz::AbstractFloat\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.Location","page":"API","title":"KM3io.Location","text":"struct Location\n\nA module's location in the detector where string represents the detection unit identifier and floor counts from 0 from the bottom to top. Base modules are sitting on floor 0 and optical modules on floor 1 and higher.\n\nFields\n\nstring::Int32\nfloor::Int8\n\n\n\n\n\n","category":"type"},{"location":"api/#Offline-Format","page":"API","title":"Offline Format","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"Evt\nCalibratedHit\nCalibratedMCHit\nTrk\nMCTrk","category":"page"},{"location":"api/#KM3io.Evt","page":"API","title":"KM3io.Evt","text":"struct Evt\n\nAn offline event.\n\nFields\n\nid::Int64\ndet_id::Int64\nmc_id::Int64\nrun_id::Int64\nmc_run_id::Int64\nframe_index::Int64\ntrigger_mask::UInt64\ntrigger_counter::UInt64\noverlays::UInt64\nt::UTCTime\nhits::Vector{CalibratedHit}\ntrks::Vector{Trk}\nw::Vector{Float64}\nw2list::Vector{Float64}\nw3list::Vector{Float64}\nmc_event_time::UTCTime\nmc_t::Float64\nmc_hits::Vector{CalibratedMCHit}\nmc_trks::Vector{MCTrk}\nindex::Int64\nflags::Int64\nusr::Dict{String, Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.CalibratedHit","page":"API","title":"KM3io.CalibratedHit","text":"struct CalibratedHit <: AbstractCalibratedHit\n\nA calibrated hit of the offline dataformat. Caveat: the position, direction and t fields might still be 0 due to the design philosophy of the offline format (one class for all).\n\nFields\n\ndom_id::Int32\nchannel_id::UInt32\ntdc::UInt32\ntot::UInt32\ntrigger_mask::UInt64\nt::Float64\npos::Position{Float64}\ndir::Direction{Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.CalibratedMCHit","page":"API","title":"KM3io.CalibratedMCHit","text":"struct CalibratedMCHit\n\nA calibrated MC hit of the offline dataformat. Caveat: the position and direction fields might still be 0 due to the design philosophy of the offline format (one class for all).\n\nFields\n\npmt_id::Int32\nt::Float64\na::Float64\ntype::Int32\norigin::Int32\npos::Position{Float64}\ndir::Direction{Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.Trk","page":"API","title":"KM3io.Trk","text":"struct Trk\n\nRepresents a reconstructed \"track\", which can be e.g. a muon track but also a shower.\n\nFields\n\nid::Int64\npos::Position{Float64}\ndir::Direction{Float64}\nt::Float64\nE::Float64\nlen::Float64\nlik::Float64\nrec_type::Int32\nrec_stages::Vector{Int32}\nfitinf::Vector{Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.MCTrk","page":"API","title":"KM3io.MCTrk","text":"struct MCTrk\n\nA simulated (Monte Carlo, hence \"MC\") track (or shower).\n\nFields\n\nid::Int64\npos::Position{Float64}\ndir::Direction{Float64}\nt::Float64\nE::Float64\nlen::Float64\ntype::Int32\nstatus::Int32\nmother_id::Int32\ncounter::Int32\n\n\n\n\n\n","category":"type"},{"location":"api/#Online-Format","page":"API","title":"Online Format","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"DAQEvent\nEventHeader\nSnapshotHit\nTriggeredHit\nUTCTime\nUTCExtended\nSummaryslice\nSummarysliceHeader\nSummaryFrame","category":"page"},{"location":"api/#KM3io.DAQEvent","page":"API","title":"KM3io.DAQEvent","text":"struct DAQEvent\n\nA (triggered) event holding snapshot hits and triggered hits. The triggered hits are a subset of the snapshot hits.\n\nFields\n\nheader::EventHeader\nsnapshot_hits::Vector{SnapshotHit}\ntriggered_hits::Vector{TriggeredHit}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.EventHeader","page":"API","title":"KM3io.EventHeader","text":"struct EventHeader\n\nThe header of an event.\n\nFields\n\ndetector_id::Int32\nrun::Int32\nframe_index::Int32\nt::UTCExtended\ntrigger_counter::UInt64\ntrigger_mask::UInt64\noverlays::UInt32\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.SnapshotHit","page":"API","title":"KM3io.SnapshotHit","text":"struct SnapshotHit <: KM3io.AbstractDAQHit\n\nA snapshot hit.\n\nFields\n\ndom_id::UInt32\nchannel_id::UInt8\nt::Int32\ntot::UInt8\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.TriggeredHit","page":"API","title":"KM3io.TriggeredHit","text":"struct TriggeredHit <: KM3io.AbstractDAQHit\n\nA hit which was triggered.\n\nFields\n\ndom_id::Int32\nchannel_id::UInt8\nt::Int32\ntot::UInt8\ntrigger_mask::UInt64\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.UTCTime","page":"API","title":"KM3io.UTCTime","text":"struct UTCTime\n\nA basic time structure with seconds and nanoseconds. The seconds are counting from the start of the epoch, just like the UNIX time.\n\nFields\n\ns::UInt64\nns::UInt64\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.UTCExtended","page":"API","title":"KM3io.UTCExtended","text":"struct UTCExtended\n\nAn extended time structure which contains the White Rabbit time synchronisation status. wr_status == 0 means that the synchronisation is OK.\n\nFields\n\ns::UInt32\nns::UInt32\nwr_status::Int64\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.Summaryslice","page":"API","title":"KM3io.Summaryslice","text":"struct Summaryslice\n\nA summaryslice is a condensed timeslice with the header information of the corresponding timeslice and a summary frame for each optical module. The hit information of the original timeslice is reduced so that for each PMT a single byte is used to encode the hit rate.\n\nFields\n\nheader::SummarysliceHeader\nframes::Vector{SummaryFrame}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.SummarysliceHeader","page":"API","title":"KM3io.SummarysliceHeader","text":"struct SummarysliceHeader\n\nThe header of a summaryslice.\n\nFields\n\ndetector_id::Int32\nrun::Int32\nframe_index::Int32\nt::UTCExtended\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.SummaryFrame","page":"API","title":"KM3io.SummaryFrame","text":"struct SummaryFrame\n\nA SummaryFrame contains reduced timeslice data from an optical module.\n\nThe PMT rates are encoded as single bytes and can be converted to real hit rates using the rates(s::SummaryFrame) function.\n\nFields\n\ndom_id::Int32\ndaq::UInt32\nstatus::UInt32\nfifo::UInt32\nstatus3::UInt32\nstatus4::UInt32\nrates::StaticArraysCore.SVector{31, UInt8}\n\n\n\n\n\n","category":"type"},{"location":"api/#HDF5","page":"API","title":"HDF5","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"H5File\nH5CompoundDataset\naddmeta\ncreate_dataset\nflush","category":"page"},{"location":"api/#KM3io.H5File","page":"API","title":"KM3io.H5File","text":"struct H5File\n\nA wrapper for an HDF5 file used in KM3NeT.\n\nFields\n\n_h5f::HDF5.File\n_datasets::Dict{String, H5CompoundDataset}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.H5CompoundDataset","page":"API","title":"KM3io.H5CompoundDataset","text":"struct H5CompoundDataset{T}\n\nA flat HDF5 compound dataset which is essentially a vector of structs. It has a cache which is filled when elements are pushed to it. The cache is automatically written to the target HDF5 path when full.\n\nFields\n\ndset::HDF5.Dataset\ncache::KM3io.H5CompoundDatasetCache\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.addmeta","page":"API","title":"KM3io.addmeta","text":"addmeta(\n dset::Union{HDF5.Dataset, HDF5.Datatype, HDF5.File, HDF5.Group},\n object\n)\n\n\nAttaches key-value-pair meta entries to an HDF5 instance for each field of the given object.\n\n\n\n\n\n","category":"function"},{"location":"api/#HDF5.create_dataset","page":"API","title":"HDF5.create_dataset","text":"create_dataset(\n f::H5File,\n path::AbstractString,\n ::Type{T};\n cache_size\n) -> H5CompoundDataset\n\n\nCreates a one-dimensional compound dataset H5CompoundDataset of a given type which can be extended one-by-one. The cache is used to accumulate data and reduce the number of dataset extensions. Each time the cache is full, the HDF5 dataset will be extended, the buffer written and cleared.\n\nTo force the writing, use flush\n\n\n\n\n\n","category":"function"},{"location":"api/#Base.flush","page":"API","title":"Base.flush","text":"flush(d::H5CompoundDataset) -> Vector\n\n\nForces the cache to be written to the HDF5 file.\n\n\n\n\n\n","category":"function"},{"location":"api/#Hardware","page":"API","title":"Hardware","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"PMT\nDetectorModule\nDetector\nmodules\ngetmodule\ngetpmt\nwrite(::AbstractString, ::Detector)\nwrite(::IO, ::Detector)\nHydrophone\nread(::AbstractString, ::Type{Hydrophone})\nTripod\nread(::AbstractString, ::Type{Tripod})\nwrite(::AbstractString, ::Vector{Tripod})\npiezoenabled\nhydrophoneenabled\ncenter\nStringMechanics\nStringMechanicsParameters\nread(::AbstractString, ::Type{StringMechanics})","category":"page"},{"location":"api/#KM3io.PMT","page":"API","title":"KM3io.PMT","text":"struct PMT\n\nThe photomultiplier tube of an optical module. The id stands for the DAQ channel ID.\n\nA non-zero status means the PMT is \"not OK\". Individual bits can be read out to identify the problem (see definitions/pmt_status.jl for the bit positions and check them using the nthbitset() function).\n\nFields\n\nid::Int32\npos::Position{Float64}\ndir::Direction{Float64}\ntâ‚€::Float64\nstatus::Union{Missing, Int32}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.DetectorModule","page":"API","title":"KM3io.DetectorModule","text":"struct DetectorModule\n\nEither a base module or an optical module. A non-zero status means the module is \"not OK\". Individual bits can be read out to identify the problem (see definitions/module_status.jl for the bit positions and check them using the nthbitset() function).\n\nFields\n\nid::Int32\npos::Position{Float64}\nlocation::Location\nn_pmts::Int8\npmts::Vector{PMT}\nq::Union{Missing, Quaternion{Float64}}\nstatus::Int32\ntâ‚€::Float64\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.Detector","page":"API","title":"KM3io.Detector","text":"struct Detector\n\nA KM3NeT detector.\n\nFields\n\nversion::Int8\nid::Int32\nvalidity::Union{Missing, KM3io.DateRange}\npos::Union{Missing, UTMPosition{Float64}}\nutm_ref_grid::Union{Missing, String}\nn_modules::Int32\nmodules::Dict{Int32, DetectorModule}\nlocations::Dict{Tuple{Int64, Int64}, DetectorModule}\nstrings::Vector{Int64}\ncomments::Vector{String}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.modules","page":"API","title":"KM3io.modules","text":"modules(d::Detector) -> Vector{DetectorModule}\n\n\nReturn a vector of all modules of a given detector.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.getmodule","page":"API","title":"KM3io.getmodule","text":"getmodule(\n d::Detector,\n string::Integer,\n floor::Integer\n) -> DetectorModule\n\n\nReturn the detector module for a given string and floor.\n\n\n\n\n\ngetmodule(\n d::Detector,\n loc::Tuple{T<:Integer, T<:Integer}\n) -> DetectorModule\n\n\nReturn the detector module for a given string and floor (as Tuple).\n\n\n\n\n\ngetmodule(d::Detector, loc::Location) -> DetectorModule\n\n\nReturn the detector module for a given location.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.getpmt","page":"API","title":"KM3io.getpmt","text":"getpmt(d::DetectorModule, channel_id::Integer) -> Any\n\n\nGet the PMT for a given DAQ channel ID (TDC)\n\n\n\n\n\n","category":"function"},{"location":"api/#Base.write-Tuple{AbstractString, Detector}","page":"API","title":"Base.write","text":"write(filename::AbstractString, d::Detector; version)\n\n\nWrites the detector definition to a file, according to the DETX format specification. The version parameter can be a version number or :same, which is the default value and writes the same version as the provided detector has.\n\n\n\n\n\n","category":"method"},{"location":"api/#Base.write-Tuple{IO, Detector}","page":"API","title":"Base.write","text":"write(io::IO, d::Detector; version)\n\n\nfunction write(io::IO, d::Detector; version=:same)\n\nWrites the detector to a DETX formatted file. The target version can be specified via the version keyword. Note that if converting to higher versions, missing parameters will be filled with reasonable default values. In case of downgrading, information will be lost.\n\n\n\n\n\n","category":"method"},{"location":"api/#KM3io.Hydrophone","page":"API","title":"KM3io.Hydrophone","text":"struct Hydrophone\n\nA hydrophone, typically installed in the base module of a KM3NeT detector's string.\n\nFields\n\nlocation::Location\npos::Position{Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#Base.read-Tuple{AbstractString, Type{Hydrophone}}","page":"API","title":"Base.read","text":"read(\n filename::AbstractString,\n T::Type{Hydrophone}\n) -> Vector{Hydrophone}\n\n\nfunction read(filename::AbstractString, T::Type{Hydrophone})\n\nReads a vector of Hydrophones from an ASCII file.\n\n\n\n\n\n","category":"method"},{"location":"api/#KM3io.Tripod","page":"API","title":"KM3io.Tripod","text":"struct Tripod\n\nA tripod installed on the seabed which sends acoustic signals to modules.\n\nFields\n\nid::Int8\npos::Position{Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#Base.read-Tuple{AbstractString, Type{Tripod}}","page":"API","title":"Base.read","text":"read(\n filename::AbstractString,\n T::Type{Tripod}\n) -> Vector{Tripod}\n\n\nfunction read(filename:AbstractString, T::Type{Tripod})\n\nReads a vector of Tripods from an ASCII file.\n\n\n\n\n\n","category":"method"},{"location":"api/#Base.write-Tuple{AbstractString, Vector{Tripod}}","page":"API","title":"Base.write","text":"write(filename::AbstractString, tripods::Vector{Tripod})\n\n\nfunction write(filename::AbstractString, tripods::Dict{Int8, Tripod})\n\nWrites the position of tripods out into an ASCII file.\n\n\n\n\n\n","category":"method"},{"location":"api/#KM3io.piezoenabled","page":"API","title":"KM3io.piezoenabled","text":"piezoenabled(m::DetectorModule) -> Bool\n\n\nfunction piezoenabled(m::DetectorModule)\n\nReturn true if the piezo is enabled, false otherwise.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.hydrophoneenabled","page":"API","title":"KM3io.hydrophoneenabled","text":"hydrophoneenabled(m::DetectorModule) -> Bool\n\n\nfunction hydrophonenabled(m::DetectorModule)\n\nReturn true if the hydrophone is enabled, false otherwise.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.center","page":"API","title":"KM3io.center","text":"center(m::DetectorModule) -> Position{Float64}\n\n\nCalculate the centre of a module by fitting the crossing point of the PMT axes.\n\n\n\n\n\ncenter(d::Detector) -> Position{Float64}\n\n\nCalculate the center of the detector based on the location of the optical modules.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.StringMechanics","page":"API","title":"KM3io.StringMechanics","text":"struct StringMechanics\n\nA container structure which holds the mechanical model parameters for multiple strings, including a default value for strings which have specific parameters.\n\nFields\n\ndefault::StringMechanicsParameters\nstringparams::Dict{Int64, StringMechanicsParameters}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.StringMechanicsParameters","page":"API","title":"KM3io.StringMechanicsParameters","text":"struct StringMechanicsParameters\n\nData structure for parameters of the mechanical model of strings. This data structure is used to calculate the effective height conform to the mechanical model of the string.\n\nFields\n\na::Float64\nb::Float64\n\n\n\n\n\n","category":"type"},{"location":"api/#Base.read-Tuple{AbstractString, Type{StringMechanics}}","page":"API","title":"Base.read","text":"read(\n filename::AbstractString,\n T::Type{StringMechanics}\n) -> StringMechanics\n\n\nReads the mechanical models from a text file.\n\n\n\n\n\n","category":"method"},{"location":"api/#Optical-Data","page":"API","title":"Optical Data","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"","category":"page"},{"location":"api/#Acoustics","page":"API","title":"Acoustics","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"Waveform\nread(filename::AbstractString, T::Type{Waveform})\nAcousticSignal\nAcousticsTriggerParameter\nread(filename::AbstractString, T::Type{AcousticsTriggerParameter})","category":"page"},{"location":"api/#KM3io.Waveform","page":"API","title":"KM3io.Waveform","text":"struct Waveform\n\nWaveform translates Emitter ID to Tripod ID.\n\nFields\n\nids::Dict{Int8, Int8}\n\n\n\n\n\n","category":"type"},{"location":"api/#Base.read-Tuple{AbstractString, Type{Waveform}}","page":"API","title":"Base.read","text":"read(\n filename::AbstractString,\n T::Type{Waveform}\n) -> Waveform\n\n\nfunction read(filename::AbstractString, T::Type{Waveform})\n\nReads the waveform ASCII file.\n\n\n\n\n\n","category":"method"},{"location":"api/#KM3io.AcousticSignal","page":"API","title":"KM3io.AcousticSignal","text":"struct AcousticSignal\n\nAcousticSignal is a custom type with four fields to store all the information inside the raw acoustic binary files.\n\ndom_id::Int32 ID of the module\nutc_seconds:: UInt32 storing the first 4 Bytes and is a UNIX time stamp\nns_cycles:: UInt32 storing the second 4 Bytes\nsamples:: UInt32 storing the third 4 Bytes, corresponding to the number of data points accuired during the measring window\npcm:: Vector of Float32 of length frame_length, storing all other 4 Byte blocks. Each entry is a data point of the acoustic signal.\n\nFields\n\ndom_id::Int32\nutc_seconds::UInt32\nns_cycles::UInt32\nsamples::UInt32\npcm::Vector{Float32}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.AcousticsTriggerParameter","page":"API","title":"KM3io.AcousticsTriggerParameter","text":"struct AcousticsTriggerParameter\n\nCertain parameters which define an acoustic event.\n\nFields\n\nq::Float64\ntmax::Float64\nnmin::Int32\n\n\n\n\n\n","category":"type"},{"location":"api/#Base.read-Tuple{AbstractString, Type{AcousticsTriggerParameter}}","page":"API","title":"Base.read","text":"read(\n filename::AbstractString,\n T::Type{AcousticsTriggerParameter}\n) -> AcousticsTriggerParameter\n\n\nfunction read(filename::AbstractString, T::Type{AcousticsTriggerParameter})\n\nReads the 'acousticstriggerparameters.txt' file.\n\n\n\n\n\n","category":"method"},{"location":"api/#Calibration","page":"API","title":"Calibration","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"calibrate\ncombine\nfloordist\nslew","category":"page"},{"location":"api/#KM3io.calibrate","page":"API","title":"KM3io.calibrate","text":"calibrate(det::Detector, hits) -> Vector{XCalibratedHit}\n\n\nApply geometry and time calibration to given hits.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.combine","page":"API","title":"KM3io.combine","text":"combine(\n snapshot_hits::Vector{SnapshotHit},\n triggered_hits::Vector{TriggeredHit}\n) -> Vector{TriggeredHit}\n\n\nCombine snapshot and triggered hits to a single hits-vector.\n\nThis should be used to transfer the trigger information to the snapshot hits from a DAQEvent. The triggered hits are a subset of the snapshot hits.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.floordist","page":"API","title":"KM3io.floordist","text":"floordist(det::Detector) -> Float64\n\n\nCalculates the average floor distance between neighboured modules.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.slew","page":"API","title":"KM3io.slew","text":"slew(tot::Integer) -> Any\n\n\nReturn the time slewing for a ToT.\n\n\n\n\n\n","category":"function"},{"location":"api/#Physics","page":"API","title":"Physics","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"azimuth\nzenith\nphi\ntheta\ncherenkov\nCherenkovPhoton\nK40Rates","category":"page"},{"location":"api/#KM3io.azimuth","page":"API","title":"KM3io.azimuth","text":"azimuth(d::Direction) -> Any\n\n\nCalculates the azimuth from a given Direction according to KM3NeT conventions.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.zenith","page":"API","title":"KM3io.zenith","text":"zenith(d::Direction) -> Any\n\n\nCalculates the zenith from a given Direction according to KM3NeT conventions.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.phi","page":"API","title":"KM3io.phi","text":"phi(d::Direction) -> Any\n\n\nCalculate the phi angle for a given direction\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.theta","page":"API","title":"KM3io.theta","text":"theta(d::Direction) -> Any\n\n\nCalculate the theta angle for a given direction\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.cherenkov","page":"API","title":"KM3io.cherenkov","text":"cherenkov(\n track,\n hits::Array{T<:AbstractCalibratedHit, 1}\n) -> Any\n\n\nCalculates the parameters of cherenkov photons emitted from a track and hitting the PMTs represented as (calibrated) hits. The returned cherenkov photons hold information about the closest distance to track, the time residual, arrival time, impact angle, photon travel distance, track travel distance and photon travel direction. See CherenkovPhoton for more information.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.CherenkovPhoton","page":"API","title":"KM3io.CherenkovPhoton","text":"struct CherenkovPhoton\n\nA Cherenkov photon with parameters calculated from its inducing track. See cherenkov() for more information.\n\nFields\n\nd_closest::Float64\nd_photon::Float64\nd_track::Float64\nt::Float64\nΔt::Float64\nimpact_angle::Float64\ndir::Direction{Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.K40Rates","page":"API","title":"KM3io.K40Rates","text":"struct K40Rates\n\nK40 rates with L0 and higher level rates (with increasing multiplicities).\n\nFields\n\nL0::Float64\nL1::Vector{Float64}\n\n\n\n\n\n","category":"type"},{"location":"api/#Trigger","page":"API","title":"Trigger","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"triggered\nis3dmuon\nis3dshower\nismxshower\nisnb","category":"page"},{"location":"api/#KM3io.triggered","page":"API","title":"KM3io.triggered","text":"triggered(e) -> Vector\n\n\nReturn true if the passed object (hit, event, ...) was triggered by any trigger algorithm.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.is3dmuon","page":"API","title":"KM3io.is3dmuon","text":"is3dmuon(e::DAQEvent) -> Bool\n\n\nis3dmuon(e)\n\ndefined at /builds/common/KM3io.jl/src/tools/trigger.jl:12.\n\nReturn true the 3D Muon trigger bit is set.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.is3dshower","page":"API","title":"KM3io.is3dshower","text":"is3dshower(e::DAQEvent) -> Bool\n\n\nis3dshower(e)\n\ndefined at /builds/common/KM3io.jl/src/tools/trigger.jl:20.\n\nReturn true if the 3D Shower trigger bit is set.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.ismxshower","page":"API","title":"KM3io.ismxshower","text":"ismxshower(x) -> Bool\n\n\nismxshower(x)\n\ndefined at /builds/common/KM3io.jl/src/tools/trigger.jl:28.\n\nismxshower(e)\n\ndefined at /builds/common/KM3io.jl/src/tools/trigger.jl:29.\n\nReturn true if the MX Shower trigger bit is set.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.isnb","page":"API","title":"KM3io.isnb","text":"isnb(x) -> Bool\n\n\nisnb(x)\n\ndefined at /builds/common/KM3io.jl/src/tools/trigger.jl:36.\n\nisnb(e)\n\ndefined at /builds/common/KM3io.jl/src/tools/trigger.jl:37.\n\nReturn true if the NanoBeacon trigger bit is set.\n\n\n\n\n\n","category":"function"},{"location":"api/#ControlHost","page":"API","title":"ControlHost","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"CHClient","category":"page"},{"location":"api/#KM3io.CHClient","page":"API","title":"KM3io.CHClient","text":"struct CHClient{T}\n\nA ControlHost client which can communicate with a Ligier dispatcher to receive messages for all the subscribed tags.\n\nTo connect to a Ligier which is receiving triggered DAQ events e.g. in the KM3NeT monitoring system or in a test setup consisting of a JLigier dispatcher and a JRegurgitate instance which is redispatching DAQ events (JDAQEvent) from a ROOT file in online format to the JLigier, a CHClient can be created to subscribe the event messages with\n\njulia> using KM3io\n\njulia> c = CHClient{DAQEvent}(ip\"127.0.0.1\", 5553)\n\njulia> for event in c\n @show event\n end\ne = KM3io.DAQEvent with 127 snapshot and 6 triggered hits\ne = KM3io.DAQEvent with 147 snapshot and 6 triggered hits\ne = KM3io.DAQEvent with 154 snapshot and 8 triggered hits\ne = KM3io.DAQEvent with 152 snapshot and 6 triggered hits\n...\n...\n...\n\nFields\n\nip::Sockets.IPv4\nport::UInt16\ntags::Vector{CHTag}\nsocket::Sockets.TCPSocket\n\n\n\n\n\n","category":"type"},{"location":"api/#Tools","page":"API","title":"Tools","text":"","category":"section"},{"location":"api/#General-tools","page":"API","title":"General tools","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"categorize\nnthbitset\nmost_frequent","category":"page"},{"location":"api/#KM3io.categorize","page":"API","title":"KM3io.categorize","text":"categorize(field::Symbol, elements::Vector) -> Dict\n\n\nCategorise the struct elements of a vector by a given field into a dictionary of T.field => Vector{T}.\n\nExamples\n\njulia> using KM3io\n\njulia> struct PMT # just an ad-hoc PMT struct for demonstration purposes\n dom_id\n time\n end\n\njulia> pmts = [PMT(2, 10.4), PMT(4, 23.5), PMT(2, 42.0)];\n\njulia> categorize(:dom_id, pmts)\nDict{Any, Vector{PMT}} with 2 entries:\n 4 => [PMT(4, 23.5)]\n 2 => [PMT(2, 10.4), PMT(2, 42.0)]\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.nthbitset","page":"API","title":"KM3io.nthbitset","text":"nthbitset(n, a) -> Any\n\n\nReturn true if the n-th bit of a is set, false otherwise.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.most_frequent","page":"API","title":"KM3io.most_frequent","text":"most_frequent(iterable) -> Any\n\n\nReturn the most frequent value of a given iterable.\n\n\n\n\n\nmost_frequent(f::Function, iterable; rettype) -> Int64\n\n\nReturn the most frequent value of a given iterable based on the return value of a function f which returns (hashable) values of rettype.\n\n\n\n\n\n","category":"function"},{"location":"api/#DAQ","page":"API","title":"DAQ","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"pmtrate\npmtrates\nhrvstatus\nfifostatus\ntdcstatus\nwrstatus\nhasudptrailer\ncount_active_channels\ncount_fifostatus\ncount_hrvstatus\nstatus\nnumber_of_udp_packets_received\nmaximal_udp_sequence_number","category":"page"},{"location":"api/#KM3io.pmtrate","page":"API","title":"KM3io.pmtrate","text":"pmtrate(r::UInt8) -> Float64\n\n\nCalculate the PMT hit rate from the raw byte stored in a summary frame.\n\nThe rate of each PMT is encoded in a single byte to reduce the size of the summary frame, therefore only 256 values are possible which are mapped to an exponential function. The values are precalculated by the _getrate() function for the best performance.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.pmtrates","page":"API","title":"KM3io.pmtrates","text":"pmtrates(\n s::SummaryFrame\n) -> StaticArraysCore.SVector{31, Float64}\n\n\nReturn the actual rates (in Hz) for each PMT in a summary frame.\n\n\n\n\n\npmtrates(\n s::Summaryslice\n) -> Dict{Int32, StaticArraysCore.SVector{31, Float64}}\n\n\nReturn a dictionary of DOM IDs as keys and PMT rates [Hz] as values (Vector{Float64}).\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.hrvstatus","page":"API","title":"KM3io.hrvstatus","text":"hrvstatus(f::SummaryFrame, tdc) -> Any\n\n\nReturn true if the TDC is in high rate veto.\n\n\n\n\n\nhrvstatus(f::SummaryFrame) -> Bool\n\n\nReturn true if any of the TDCs is in high rate veto.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.fifostatus","page":"API","title":"KM3io.fifostatus","text":"fifostatus(f::SummaryFrame, tdc) -> Any\n\n\nReturn true if the TDC has FIFO almost full.\n\n\n\n\n\nfifostatus(f::SummaryFrame) -> Bool\n\n\nReturn true if any of the TDCs is in high rate veto.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.tdcstatus","page":"API","title":"KM3io.tdcstatus","text":"tdcstatus(f::SummaryFrame) -> Bool\n\n\nReturn true if TDC status is OK.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.wrstatus","page":"API","title":"KM3io.wrstatus","text":"wrstatus(f::SummaryFrame) -> Bool\n\n\nReturn true if White Rabbit status is OK.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.hasudptrailer","page":"API","title":"KM3io.hasudptrailer","text":"hasudptrailer(f::SummaryFrame) -> Bool\n\n\nReturn true if the UDP trailer is present.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.count_active_channels","page":"API","title":"KM3io.count_active_channels","text":"count_active_channels(f::SummaryFrame) -> Int64\n\n\nNumber of TDCs without high rate veto or FIFO almost full.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.count_fifostatus","page":"API","title":"KM3io.count_fifostatus","text":"count_fifostatus(f::SummaryFrame) -> Int64\n\n\nNumber of TDCs with FIFO almost full.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.count_hrvstatus","page":"API","title":"KM3io.count_hrvstatus","text":"count_hrvstatus(f::SummaryFrame) -> Int64\n\n\nNumber of TDCs with high rate veto.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.status","page":"API","title":"KM3io.status","text":"status(f::SummaryFrame) -> Bool\n\n\nReturn true if TDC and White Rabbit status are OK.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.number_of_udp_packets_received","page":"API","title":"KM3io.number_of_udp_packets_received","text":"number_of_udp_packets_received(f::SummaryFrame) -> Int32\n\n\nNumber of received UDP packets (excluding the trailer).\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.maximal_udp_sequence_number","page":"API","title":"KM3io.maximal_udp_sequence_number","text":"maximal_udp_sequence_number(f::SummaryFrame) -> Int32\n\n\nMaximal sequence number of all received UDP packets.\n\n\n\n\n\n","category":"function"},{"location":"api/#Reconstruction","page":"API","title":"Reconstruction","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"besttrack\nbestjppmuon\nbestjppshower\nbestaashower\nRecStageRange\nhashistory","category":"page"},{"location":"api/#KM3io.besttrack","page":"API","title":"KM3io.besttrack","text":"besttrack(\n e::Evt,\n rec_type::Integer,\n rsr::RecStageRange\n) -> Union{Missing, Trk}\n\n\nReturn the best reconstructed track for a given reconstruction type and reconstruction stage range. If no track could be found, missing is returned.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.bestjppmuon","page":"API","title":"KM3io.bestjppmuon","text":"bestjppmuon(e::Evt) -> Union{Missing, Trk}\n\n\nReturns the best reconstructed JMuon track of an event or missing if there are none.\n\n\n\n\n\nbestjppmuon(trks::Vector{Trk}) -> Union{Missing, Trk}\n\n\nReturns the best reconstructed JMuon track or missing if there are none.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.bestjppshower","page":"API","title":"KM3io.bestjppshower","text":"bestjppshower(e::Evt) -> Union{Missing, Trk}\n\n\nReturns the best reconstructed JShower \"track\" of an event or missing if there are none.\n\n\n\n\n\nbestjppshower(trks::Vector{Trk}) -> Union{Missing, Trk}\n\n\nReturns the best reconstructed JShower \"track\" or missing if there are none.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.bestaashower","page":"API","title":"KM3io.bestaashower","text":"bestaashower(e::Evt) -> Union{Missing, Trk}\n\n\nReturns the best reconstructed aashower \"track\" of an event or missing if there are none.\n\n\n\n\n\nbestaashower(trks::Vector{Trk}) -> Union{Missing, Trk}\n\n\nReturns the best reconstructed aashower \"track\" or missing if there are none.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.RecStageRange","page":"API","title":"KM3io.RecStageRange","text":"struct RecStageRange{T<:Integer}\n\nThis struct is used to represent a range of reconstruction stages. These are well-defined integers (see KM3NeT Dataformat) for each reconstruction algorithm and are stored in a vector named rec_stages of each Trk.\n\njulia> using KM3io\n\njulia> rsr = RecStageRange(KM3io.RECONSTRUCTION.JMUONBEGIN, KM3io.RECONSTRUCTION.JMUONEND)\nRecStageRange{Int64}(0, 99)\n\njulia> KM3io.RECONSTRUCTION.JMUONSIMPLEX ∈ rsr\ntrue\n\njulia> KM3io.RECONSTRUCTION.AASHOWERFITPREFIT ∈ rsr\nfalse\n\njulia> 23 ∈ rsr\ntrue\n\njulia> 523 ∈ rsr\nfalse\n\nFields\n\nlower::Integer\nupper::Integer\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.hashistory","page":"API","title":"KM3io.hashistory","text":"hashistory(\n t::Trk,\n rec_type::Integer,\n rsr::RecStageRange\n) -> Bool\n\n\nReturns true if a track with a given rec_type contains all the reconstruction stages in rsr::RecStageRange.\n\n\n\n\n\nhashistory(\n t::Trk,\n rec_type::Integer,\n rec_stage::Integer\n) -> Bool\n\n\nReturns true if a track with a given rec_type contains the rec_stage.\n\n\n\n\n\n","category":"function"},{"location":"api/#Math","page":"API","title":"Math","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"angle","category":"page"},{"location":"api/#Base.angle","page":"API","title":"Base.angle","text":"angle(d1::Direction, d2::Direction) -> Any\n\n\nCalculate the angle between two vectors.\n\n\n\n\n\n","category":"function"},{"location":"examples/cherenkov_times/#Cherenkov-times","page":"Cherenkov times","title":"Cherenkov times","text":"","category":"section"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"using PGFPlotsX\nsavefigs = (figname, obj) -> begin\n pgfsave(figname * \".pdf\", obj)\n run(`pdftocairo -svg -l 1 $(figname * \".pdf\") $(figname * \".svg\")`)\n pgfsave(figname * \".tex\", obj);\n return nothing\nend","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"In this example, we will pick the best reconstructed muon (from the Jpp muon reconstruction chain JMuon) in each event and calculate the Cherenkov hit time residuals for each triggered hit.","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"We open the a sample file from the KM3NeTTestData package:","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"using KM3io, KM3NeTTestData\n\nf = ROOTFile(datapath(\"offline\", \"mcv6.0.gsg_muon_highE-CC_50-500GeV.km3sim.jterbr00008357.jorcarec.aanet.905.root\"))","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"Each event holds a vector of reconstructed tracks (Vector{Trk}) behind the .trks field. This vector contains different stages of reconstruction results from a variety of reconstruction algorithms (JMuon, JShower, aashower etc.). KM3io.jl exports helper functions to pick the best reconstructed track for a given reconstruction algorithm. The logic is based on the reference implementation in KM3NeT DataFormat tools. The function bestjppmuon() can be used to select the best reconstructed JMuon for a given event:","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"evt = f.offline[1]\nbest_muon = bestjppmuon(evt)","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"We now use this track as a seed to calculate the Cherenkov photon (see CherenkovPhoton) parameters using cherenkov() for each hit triggered hit in the event. To select only triggered hits, we use the triggered() function together withe filter() which returns a new vector of triggered hits:","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"cherenkov(best_muon, filter(triggered, evt.hits))","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"To obtain more statistics, we iterate through all the events and calculate the Cherenkov time residuals for each set of hits based on the best reconstruction track. We fill the time residuals in a 1D histogram using the FHist package.","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"note: Note\nThis example uses PGFPlotsX which is a wrapper for the LaTeX library PGFPlots. Feel free to adapt the example to use your favourite plotting library.","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"using FHist\n\nΔts = Hist1D(;bins=-10:50)\n\nfor evt ∈ f.offline\n m = bestjppmuon(evt)\n cherenkov_photons = cherenkov(m, filter(triggered, evt.hits))\n for cp ∈ cherenkov_photons\n push!(Δts, cp.Δt)\n end\nend\n\naxis = @pgf Axis(\n {\n ybar, const_plot, grid,\n xlabel=raw\"\\Delta t / ns\",\n ylabel=\"counts\",\n },\n PlotInc(Coordinates(bincenters(Δts), bincounts(Δts)), raw\"\\closedcycle\")\n)\naxis\nsavefigs(\"cherenkov\", ans) # hide","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"[.pdf], [generated .tex]","category":"page"},{"location":"examples/cherenkov_times/","page":"Cherenkov times","title":"Cherenkov times","text":"(Image: )","category":"page"},{"location":"manual/rootfiles/#ROOT-Files","page":"ROOT Files","title":"ROOT Files","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The two main types of ROOT files in KM3NeT are the online and offline files, however, both types can be mixed together as the data is stored in distinct ROOT trees. UnROOT has a single ROOTFile type to represent a KM3NeT ROOT file which can be used to access both the online and offline information. This section describes what kind of data is stored in each tree and how to access them.","category":"page"},{"location":"manual/rootfiles/#offline-dataformat","page":"ROOT Files","title":"Offline Dataformat","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The offline dataformat is used to store Monte Carlo (MC) simulations and reconstruction results. The OfflineTree type represents an actual offline file and it is essentially a vector of events (Vector{Evt}) with some fancy caching, lazy access and slicing magic. The offline tree is accessible via the .offline field of the ROOTFile type.","category":"page"},{"location":"manual/rootfiles/#MC-Header","page":"ROOT Files","title":"MC Header","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The MC header stores metadata related to the simulation chain. The individual entries can be accessed as properties, as shown below.","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"julia> using KM3io, KM3NeTTestData\n\njulia> f = ROOTFile(datapath(\"offline\", \"numucc.root\"))\nROOTFile{OnlineTree (0 events, 0 summaryslices), OfflineTree (10 events)}\n\njulia> f.offline\nOfflineTree (10 events)\n\njulia> f.offline.header\nMCHeader\n DAQ => (livetime = 394,)\n PDF => (i1 = 4, i2 = 58)\n XSecFile => Any[]\n can => (zmin = 0, zmax = 1027, r = 888.4)\n can_user => [0.0, 1027.0, 888.4]\n coord_origin => (x = 0, y = 0, z = 0)\n cut_in => (Emin = 0, Emax = 0, cosTmin = 0, cosTmax = 0)\n cut_nu => (Emin = 100, Emax = 1.0e8, cosTmin = -1, cosTmax = 1)\n cut_primary => (Emin = 0, Emax = 0, cosTmin = 0, cosTmax = 0)\n cut_seamuon => (Emin = 0, Emax = 0, cosTmin = 0, cosTmax = 0)\n decay => [\"doesnt\", \"happen\"]\n detector => NOT\n drawing => Volume\n end_event => Any[]\n genhencut => (gDir = 2000, Emin = 0)\n genvol => (zmin = 0, zmax = 1027, r = 888.4, volume = 2.649e9, numberOfEvents = 100000)\n kcut => 2\n livetime => (numberOfSeconds = 0, errorOfSeconds = 0)\n model => (interaction = 1, muon = 2, scattering = 0, numberOfEnergyBins = 1, field_4 = 12)\n muon_desc_file => Any[]\n ngen => 100000.0\n norma => (primaryFlux = 0, numberOfPrimaries = 0)\n nuflux => Real[0, 3, 0, 0.5, 0.0, 1.0, 3.0]\n physics => (program = \"GENHEN\", version = \"7.2-220514\", date = 181116, time = 1138)\n seed => (program = \"GENHEN\", level = 3, iseed = 305765867, field_3 = 0, field_4 = 0)\n simul => (program = \"JSirene\", version = 11012, date = \"11/17/18\", time = 7)\n sourcemode => diffuse\n spectrum => (alpha = -1.4,)\n start_run => 1\n target => isoscalar\n usedetfile => false\n xlat_user => 0.63297\n xparam => OFF\n zed_user => [0.0, 3450.0]\n\n\njulia> f.offline.header.genvol\n(zmin = 0, zmax = 1027, r = 888.4, volume = 2.649e9, numberOfEvents = 100000)\n\njulia> f.offline.header.genvol.volume\n2.649e9","category":"page"},{"location":"manual/rootfiles/#Event-data","page":"ROOT Files","title":"Event data","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The following REPL session shows how to open a file, access individual events or slices of events, loop through events and access e.g. the tracks which are stored in the events.","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"julia> using KM3io, KM3NeTTestData\n\njulia> f = ROOTFile(datapath(\"offline\", \"km3net_offline.root\"))\nROOTFile{OfflineTree (10 events)}\n\njulia> f.offline[5]\nKM3io.Evt (83 hits, 0 MC hits, 56 tracks, 0 MC tracks)\n\njulia> f.offline[3:5]\n3-element Vector{KM3io.Evt}:\n KM3io.Evt (318 hits, 0 MC hits, 56 tracks, 0 MC tracks)\n KM3io.Evt (157 hits, 0 MC hits, 56 tracks, 0 MC tracks)\n KM3io.Evt (83 hits, 0 MC hits, 56 tracks, 0 MC tracks)\n\njulia> event = f.offline[1]\nKM3io.Evt (176 hits, 0 MC hits, 56 tracks, 0 MC tracks)\n\njulia> event.trks[1:4]\n4-element Vector{KM3io.Trk}:\n KM3io.Trk(1, [445.835395997812, ... , 294.6407542676734, 4000)\n KM3io.Trk(2, [445.835395997812, ... , 294.6407542676734, 4000)\n KM3io.Trk(3, [448.136188112227, ... , 294.6407542676734, 4000)\n KM3io.Trk(4, [448.258348900570, ... , 291.64653112688273, 4000)\n\njulia> for event in f.offline\n @show event\n end\nevent = KM3io.Evt (176 hits, 0 MC hits, 56 tracks, 0 MC tracks)\nevent = KM3io.Evt (125 hits, 0 MC hits, 55 tracks, 0 MC tracks)\nevent = KM3io.Evt (318 hits, 0 MC hits, 56 tracks, 0 MC tracks)\nevent = KM3io.Evt (157 hits, 0 MC hits, 56 tracks, 0 MC tracks)\nevent = KM3io.Evt (83 hits, 0 MC hits, 56 tracks, 0 MC tracks)\nevent = KM3io.Evt (60 hits, 0 MC hits, 56 tracks, 0 MC tracks)\nevent = KM3io.Evt (71 hits, 0 MC hits, 56 tracks, 0 MC tracks)\nevent = KM3io.Evt (84 hits, 0 MC hits, 56 tracks, 0 MC tracks)\nevent = KM3io.Evt (255 hits, 0 MC hits, 54 tracks, 0 MC tracks)\nevent = KM3io.Evt (105 hits, 0 MC hits, 56 tracks, 0 MC tracks)","category":"page"},{"location":"manual/rootfiles/#online_dataformat","page":"ROOT Files","title":"Online Dataformat","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The online dataformat refers to the dataformat which is written by the data acquisition system (DAQ) of the KM3NeT detectors, more precisely, the ROOT files produced by the JDataFilter which is part of the Jpp framework. The very same format is used in run-by-run (RBR) Monte Carlo (MC) productions, which mimic the detector response and therefore produce similarly structured data. The online data can be accessed via the .online field of the ROOTFile type.","category":"page"},{"location":"manual/rootfiles/#Event-data-2","page":"ROOT Files","title":"Event data","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The events are accessible via ROOTFile(filename).online.events which supports indexing, slicing and iteration, just like the we have seen above, in case of the offline events. Notice however that the online format also contains other types of trees, that's why the explicit .events field is needed. Everything is lazily loaded so that the data is only occupying memory when it's actually accessed, similar to the offline access. In the examples below, we use KM3NeTTestdata to get access to small sample files.","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"julia> using KM3io, KM3NeTTestData\n\njulia> f = ROOTFile(datapath(\"online\", \"km3net_online.root\"))\nROOTFile{OnlineTree (3 events, 3 summaryslices), OfflineTree (0 events)}\n\njulia> event = f.online.events[1]\nKM3io.DAQEvent with 96 snapshot and 18 triggered hits\n\njulia> event.triggered_hits[4:8]\n5-element Vector{KM3io.TriggeredHit}:\n KM3io.TriggeredHit(808447186, 0x00, 30733214, 0x19, 0x0000000000000016)\n KM3io.TriggeredHit(808447186, 0x01, 30733214, 0x15, 0x0000000000000016)\n KM3io.TriggeredHit(808447186, 0x02, 30733215, 0x15, 0x0000000000000016)\n KM3io.TriggeredHit(808447186, 0x03, 30733214, 0x1c, 0x0000000000000016)\n KM3io.TriggeredHit(808451907, 0x07, 30733441, 0x1e, 0x0000000000000004)\n\njulia> for event ∈ f.online.events\n @show event.header.frame_index length(event.snapshot_hits)\n end\nevent.header.frame_index = 127\nlength(event.snapshot_hits) = 96\nevent.header.frame_index = 127\nlength(event.snapshot_hits) = 124\nevent.header.frame_index = 129\nlength(event.snapshot_hits) = 78","category":"page"},{"location":"manual/rootfiles/#Summaryslices-and-Summary-Frames","page":"ROOT Files","title":"Summaryslices and Summary Frames","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Summaryslices are generated from timeslices (raw hit data) and are produced by the DataFilter. A slice contains the data of 100ms and is divided into so-called frames, each corresponding to the data of a single optical module. Due to the high amount of data, the storage of timeslices is usually reduced by a factor of 10-100 after the event triggering stage. However, summaryslices are covering the full data taking period. They however do not contain hit data but only the rates of the PMTs encoded into a single byte, which therefore is only capable to store 256 different values. The actual rate is calcuated by the helper functions pmtrate() and pmtrates() which take a SummaryFrame and optionally a PMT channel ID as arguments.","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The summaryslices are accessible using the .summaryslices attribute of the OnlineTree instance, which again is hidden behind the .online field of a ROOTFile:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"julia> using KM3io, KM3NeTTestData\n\njulia> f = ROOTFile(datapath(\"online\", \"km3net_online.root\"))\nROOTFile{OnlineTree (3 events, 3 summaryslices), OfflineTree (0 events)}\n\njulia> f.online.summaryslices\nKM3io.SummarysliceContainer with 3 summaryslices\n\njulia> for s ∈ f.online.summaryslices\n @show s.header\n end\ns.header = KM3io.SummarysliceHeader(44, 6633, 126, KM3io.UTCExtended(0x5dc6018c, 0x23c34600, false))\ns.header = KM3io.SummarysliceHeader(44, 6633, 127, KM3io.UTCExtended(0x5dc6018c, 0x29b92700, false))\ns.header = KM3io.SummarysliceHeader(44, 6633, 128, KM3io.UTCExtended(0x5dc6018c, 0x2faf0800, false))","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Each summaryslice consists of multiple frames, one for every optical module which has sent data during the recording time of the corresponding timeslice.","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"note: Note\nDuring run transistions, the number of summaryframes in a summaryslice is fluctuating a lot until it eventually saturates, usually within a few seconds or minutes. Therefore, it is expected that the number of summaryframes (i.e. active DOMs) is low at the beginning of the file and stabilises after a few summaryslices.","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"To access the actual PMT rates and flags (e.g. for high-rate veto or FIFO status) of a summaryframe, several helper functions exist. Let's grab a summaryslice:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"using KM3io, KM3NeTTestData\n\nf = ROOTFile(datapath(\"online\", \"km3net_online.root\"))\n\ns = f.online.summaryslices[1]","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"and have a look at one of the frames, the 23rd of the first summaryslice:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"frame = s.frames[23]","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The White Rabbit status:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"wrstatus(frame)","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Checking if any of the PMTs is in high rate veto:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"hrvstatus(frame)","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The number of PMTs in high rate veto:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"count_hrvstatus(frame)","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Checking if any of the TDC FIFOs were almost full:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"fifostatus(frame)","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Counting the number of TDCs which had FIFO almost full:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"count_fifostatus(frame)","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The rates of each individual PMT channel ordered by increasing channel ID:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"pmtrates(frame)","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Individual PMT parameters can be accessed as well, by passing the summaryframe and the PMT ID (DAQ channel ID):","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"pmtrate(frame, 3)","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Here is an example of a simple summary output:","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"for pmt in 0:30\n println(\"PMT $(pmt): HRV($(hrvstatus(frame, pmt))) FIFO($(fifostatus(frame, pmt)))\")\nend","category":"page"},{"location":"manual/rootfiles/#xrootd-access","page":"ROOT Files","title":"xrootd access","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"You can access files directly via xrootd by providing the URL on e.g. HPSS. Be aware that URL has to be typed correctly, / instead of // results in an error!), so it should always start with something like root://ccxroot:1999//hpss/....","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"julia> using KM3io\n\njulia> f = ROOTFile(\"root://ccxroot:1999//hpss/in2p3.fr/group/km3net/data/raw/sea/KM3NeT_00000132/14/KM3NeT_00000132_00014481.root\")\nROOTFile{OnlineTree (136335 events, 107632 summaryslices)}","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"Now you can use it as if it was on your local filesystem. UnROOT.jl will take care of loading only the needed data from the server.","category":"page"},{"location":"examples/hdf5/#HDF5","page":"HDF5","title":"HDF5","text":"","category":"section"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"Plain ASCII (CSV) files are often perfectly fine for small, tabular datasets but when dealing with larger amounts of data, HDF5 comes in handy with compression, metadata and hierachical datasets. KM3NeT uses HDF5 in many analysis chains, often to store intermediate or end results.","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"This example shows how to create an HDF5 file and write some vectors of structs into different datasets.","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"using KM3io\nusing Random\n\nRandom.seed!(23) # to make things reproducible ;)\n\nf = H5File(\"foo.h5\", \"w\")","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"We now have an H5File instance which we can use to store datasets.","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"Let's say we have our custom data type (struct) like","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"struct Particle\n x::Float32\n y::Float32\n E::Int64\nend","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"and we generate instances of Particle in a loop which we want to dump directly into an HDF5 file to the dataset stored at simulation/particles, meaning that simulation is the group name and particles the dataset name.","category":"page"},{"location":"examples/hdf5/#Creating-datasets","page":"HDF5","title":"Creating datasets","text":"","category":"section"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"First, we create our dataset with our type Particle. This is a so called H5CompoundDataset and resembles a dataset wich has a compound type (struct) associated with it:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"dset = create_dataset(f, \"simulation/particles\", Particle)","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"We fill some random particles using the dummy loop:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"for i in 1:1000\n # creates some random particle\n particle = Particle(rand(), rand(), rand(1:1000))\n # we push to the dataset, just like if it was an Array\n push!(dset, particle)\nend","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"note: Note\nTo avoid excessive I/O, KM3io uses a cache for each H5CompoundDataset. If you don't close the H5File properly, you might lose data which is still sitting in the cache. Therefore, always use close(f) to make sure that all the caches are dumped to the HDF5 file. The methods flush(d::H5CompoundDataset) and flush(f::H5File) can be used to manually to prematurely flush the cache of a dataset or all caches of an HDF5 file respectively.","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"Let's close the file","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"close(f)","category":"page"},{"location":"examples/hdf5/#Reading-datasets","page":"HDF5","title":"Reading datasets","text":"","category":"section"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"We open the file from the previous example with HDF5.jl, just to demonstrate that we can read it without any KM3NeT related libraries:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"using HDF5\n\nf = h5open(\"foo.h5\")\nparticles = f[\"simulation/particles\"]\n\n@show particles[1:5]","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"Notice that HDF5.jl automatically created NamedTuple instances with the same fieldnames as our own struct definition of Particle. This means that the elements behave just like the original one regarding the field access:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"particles[2].E","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"The whole vector can also be reinterpreted to the original struct definition with zero-cost. This can be mandatory if the data is then passed to other methods which require a specific type (in this case Particle). The following line will only work if Particle is already defined (i.e. the correspoinding module has been loaded). It is also mandatory to pass a slice (here, we pass the full slice by using [:]) to reinterpret and not the dataset itself:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"reinterpreted_particles = reinterpret(Particle, particles[:])","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"Each element is now a proper Particle instance:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"reinterpreted_particles[4]","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"KM3io also writes the name of the struct into the attributes of the dataset:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"attrs(particles)[\"struct_name\"]","category":"page"},{"location":"examples/hdf5/#Adding-metadata","page":"HDF5","title":"Adding metadata","text":"","category":"section"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"Sometimes it's useful to keep track of additional metadata, e.g. a given set of parameters for a specific dataset. The addmeta() function can be used to attach key-value-pairs from a struct to a variety of HDF5 structures, like files, datasets or groups. The following example demonstrates it:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"using KM3io\nusing HDF5\n\nstruct SimulationParameters\n can_height::Int32\n can_radius::Int32\n minimum_energy::Float64\n maximum_energy::Float64\nend\n\nsimparams = SimulationParameters(800, 200, 1e3, 1e7)\n\nf = h5open(\"simulation.h5\", \"w\")\naddmeta(f, simparams)\n\nattributes(f)","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"To access individual attributes, use HDF5.read_attribute:","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"read_attribute(f, \"can_radius\")","category":"page"},{"location":"examples/hdf5/","page":"HDF5","title":"HDF5","text":"note: Note\nIt is possible to add metadata to datasets and groups too. Make sure that the struct you pass to addmeta() only contains primitive types or strings in their fields. Arrays and other nested or compound fieldtypes are not supported by HDF5.","category":"page"},{"location":"examples/offline_data/#Offline-data","page":"Offline data","title":"Offline data","text":"","category":"section"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"Let's use the KM3NeTTestData Julia package which contains all kinds of KM3NeT related sample files. The datapath() function can be used to get a path to such a file. In the following, we will discover the numucc.root file which contains 10 muon neutrino charged current interaction events.","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"using KM3io, KM3NeTTestData\n\nf = ROOTFile(datapath(\"offline\", \"numucc.root\"))","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"The ROOTFile is the container object which gives access to both the online and offline tree. In this case, the online tree is empty","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"f.online","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"and the offline tree holds our 10 MC events:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"f.offline","category":"page"},{"location":"examples/offline_data/#Events","page":"Offline data","title":"Events","text":"","category":"section"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"To access a single event, you can use the usual indexing syntax:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"some_event = f.offline[5]","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"or ranges of events:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"events = f.offline[6:9]","category":"page"},{"location":"examples/offline_data/#Hits","page":"Offline data","title":"Hits","text":"","category":"section"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"Each event consists of a vector of hits, MC hits, tracks and MC tracks. Depending on the file, they may be empty. They are accessible via the fields .hit, .mc_hits, .trks and .mc_trks.","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"Let's grab an event:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"evt = f.offline[3]","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"and have a look at its contents:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"evt.hits","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"Let's close this file properly:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"close(f)","category":"page"},{"location":"examples/offline_data/#Usr-data","page":"Offline data","title":"Usr data","text":"","category":"section"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"You can also access \"usr\"-data, which is a dynamic placeholder (Dict{String, Float64}) to store arbitrary data. Some software store values here which are only losely defined. Ideally, if these fields are used regulary by a software, a proper definition in the KM3NeT dataformat should be created and added to the according Struct as a field.","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"Here is an example how to access the \"usr\"-data of a single event:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"f = ROOTFile(datapath(\"offline\", \"usr-sample.root\"))\n\nf.offline[1].usr","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"close(f)","category":"page"},{"location":"manual/hdf5/#HDF5-Files","page":"HDF5 Files","title":"HDF5 Files","text":"","category":"section"},{"location":"manual/hdf5/","page":"HDF5 Files","title":"HDF5 Files","text":"...","category":"page"},{"location":"#KM3io.jl","page":"Home","title":"KM3io.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"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 (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++.","category":"page"},{"location":"","page":"Home","title":"Home","text":"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.","category":"page"},{"location":"","page":"Home","title":"Home","text":"note: Note\nThe library is still under development so that the API might slightly change. Feedback and contributions are highly welcome!","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"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","category":"page"},{"location":"","page":"Home","title":"Home","text":"git clone https://git.km3net.de/common/julia-registry ~/.julia/registries/KM3NeT","category":"page"},{"location":"","page":"Home","title":"Home","text":"After that, you can instal KM3io.jl just like any other Julia package:","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> import Pkg; Pkg.add(\"KM3io\")","category":"page"},{"location":"","page":"Home","title":"Home","text":"note: Note\nIf you encounter the error UndefVarError: libhdf5 not defined, you are probably using an M1 or M2 Mac computer. There is an issue with HDF5.jll due to a missing precompiled libhdf5 artifact for the M1 and M2 architectures, so you need to install it manually and set an envrionment variable before starting Julia. You can easily install hdf5lib using e.g. brew:brew install hdf5and then set the environment variable JULIA_HDF5_PATH to point to the location of the HDF5 files (put this line into your ~/.bashrc or ~/.zshrc or whatever shell you use):export JULIA_HDF5_PATH=/opt/homebrew/Cellar/hdf5/1.12.2_2Make sure that the path is correct, you might have a different version number.","category":"page"},{"location":"#Quickstart","page":"Home","title":"Quickstart","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"julia> using KM3io, KM3NeTTestData\n\njulia> f = ROOTFile(datapath(\"offline\", \"numucc.root\"))\nROOTFile{OnlineTree (0 events, 0 summaryslices), OfflineTree (10 events)}\n\njulia> f.offline\nOfflineTree (10 events)\n\njulia> some_event = f.offline[3]\nKM3io.Evt (3680 hits, 28 MC hits, 38 tracks, 12 MC tracks)","category":"page"},{"location":"#Acknowledgements","page":"Home","title":"Acknowledgements","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Thanks to Johannes Schumann for providing the awesome project logo!","category":"page"},{"location":"manual/tools/#Tools","page":"Tools","title":"Tools","text":"","category":"section"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"There are many commonly used routines to find for example the best reconstructed muon track or find out if a given hit was flagged by a specific trigger algorithm. This section will show some helper functions available in KM3io.jl.","category":"page"},{"location":"manual/tools/#Best-track/shower","page":"Tools","title":"Best track/shower","text":"","category":"section"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"In KM3NeT, the best reconstructed track or shower of a given set of tracks respectively showers is the one with the highest value of the likelihood parameter (lik) and the longest reconstruction history (rec_stages) which is a record of reconstruction stages performed during the whole fitting procedure.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"The offline dataformat, which is used to store reconstruction information, has only a single Vector{Trk} per event which is a flat list of reconstructed tracks and showers. This vector can be a mix of different reconstruction algorithms (JGandalf, aashower, FibonacciFit, ...) and different stages of each, like prefit candidates, intermediate fits and final results. Therefore it is necessary to take the reconstruction type (rec_type) and also the values of the reconstruction stages (rec_stages) into account. Each reconstruction algorithm and each of their reconstruction stages have their own unique identifiers, which are stored in these two fields.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"note: Note\nBoth tracks and showers are stored as Trk. This comes from the fact that the original KM3NeT dataformat defintion for offline files uses the same C++ class (named Trk).","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"The helper functions in KM3io.jl to pick the best track/shower always start with the prefix best, followed by the common name of the reconstruction routine, like jppmuon, or aashower. For example bestjppmuon(), bestjppshower() or besttrack(), latter being a more general function which gives the possibility to fine tune the selection criteria.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"The API documentation of all related functions can be found in the Reconstruction section.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"The input can be an event (Evt) or a vector of reconstructed tracks (Vector{Trk}). If no track/shower could be found, missing is returned instead.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"Below are some examples of how to use these functions.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"using KM3io, KM3NeTTestData\n\nf = ROOTFile(datapath(\"offline\", \"km3net_offline.root\"))","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"event = f.offline[1]","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"bestjppmuon(event)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"bestjppshower(event)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"bestaashower(event)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"bestjppshower(event.trks)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"bestaashower(event.trks)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"Additonally, there are helper functions which can be used to check if a specific reconstruction stage or result is present in an event or a given set of tracks/showers.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"track = event.trks |> first","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasjppmuonprefit(track)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasjppmuonsimplex(track)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasjppmuongandalf(track)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasjppmuonfit(track)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasaashowerfit(track)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasreconstructedjppmuon(event)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasreconstructedjppshower(event)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"hasreconstructedaashower(event)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"note: Note\nTo check multiple events in one go, use the Broadcasting feature of the Julia language by putting a dot (.) at the end of the function name, e.g. bestjppmuon.(f.offline) which will find the best Jpp muon reconstruction result for each event in the offline tree.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"bestjppmuon.(f.offline[2:5])","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"Let's close our file ;)","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"close(f)","category":"page"},{"location":"manual/tools/#Trigger-masks/flags","page":"Tools","title":"Trigger masks/flags","text":"","category":"section"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"KM3NeT uses a 64bit integer type to store information about which triggers have fired for a given event or hit. The index of the bit which indicates if a specific trigger has fired is defined in the KM3NeT Dataformat specification which is used in KM3io.jl.","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"Functions to check if a trigger has fired are for example","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"is3dmuon()\nis3dshower()\nismxshower()\nisnb()","category":"page"},{"location":"manual/tools/","page":"Tools","title":"Tools","text":"which all accept either an event is input or something which has a .trigger_mask field, like a triggered hit.","category":"page"}] } -- GitLab