diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index aeb89ff905ee754c33690a6c0c4f9fba44395cf0..1626edacd428ba78611b16c3555c5f085a6c3239 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2025-02-24T15:08:49","documenter_version":"1.8.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2025-02-28T15:01:37","documenter_version":"1.8.1"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index d75278f143a7f13a514c249f4cc5fa059aa346de..37d2d25158f924fbf32cb612ae47a3726fa40a8f 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,9 +1,9 @@ <!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/catppuccin-mocha.css" data-theme-name="catppuccin-mocha"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-macchiato.css" data-theme-name="catppuccin-macchiato"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-frappe.css" data-theme-name="catppuccin-frappe"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-latte.css" data-theme-name="catppuccin-latte"/><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/auxfiles/">Auxiliary Files</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/online_data/">Online data</a></li><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/orientations/">Orientations</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.CalibratedSnapshotHit"><code>KM3io.CalibratedSnapshotHit</code></a></li><li><a href="#KM3io.CalibratedTriggeredHit"><code>KM3io.CalibratedTriggeredHit</code></a></li><li><a href="#KM3io.CherenkovPhoton"><code>KM3io.CherenkovPhoton</code></a></li><li><a href="#KM3io.Compass"><code>KM3io.Compass</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.FitInformation"><code>KM3io.FitInformation</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.Orientations"><code>KM3io.Orientations</code></a></li><li><a href="#KM3io.PMT"><code>KM3io.PMT</code></a></li><li><a href="#KM3io.PMTData"><code>KM3io.PMTData</code></a></li><li><a href="#KM3io.PMTFile"><code>KM3io.PMTFile</code></a></li><li><a href="#KM3io.Position"><code>KM3io.Position</code></a></li><li><a href="#KM3io.Quaternion"><code>KM3io.Quaternion</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.SummarysliceIntervalIterator"><code>KM3io.SummarysliceIntervalIterator</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="#KM3io.XCalibratedHit"><code>KM3io.XCalibratedHit</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{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.read-Tuple{AbstractString, Type{Hydrophone}}"><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.calibratetime"><code>KM3io.calibratetime</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.distance"><code>KM3io.distance</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.getevent"><code>KM3io.getevent</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.haslocation"><code>KM3io.haslocation</code></a></li><li><a href="#KM3io.hasstring"><code>KM3io.hasstring</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.isbasemodule"><code>KM3io.isbasemodule</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.isopticalmodule"><code>KM3io.isopticalmodule</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.slerp"><code>KM3io.slerp</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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/root/offline.jl#LL99">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct CalibratedMCHit <: KM3io.AbstractCalibratedMCHit</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/a326c08f8cd8589387af910f3af85c95ec612b59/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.XCalibratedHit" href="#KM3io.XCalibratedHit"><code>KM3io.XCalibratedHit</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct XCalibratedHit <: AbstractCalibratedHit</code></pre><p>A fully dressed hit with all calibration information which can be obtained. This structure is similar to the Hit structure in aanet and should be used wisely. Most of the time it's much more performant to use dedicated (simplified) structures.</p><p><strong>Fields</strong></p><ul><li><p><code>dom_id::UInt32</code></p></li><li><p><code>channel_id::UInt32</code></p></li><li><p><code>t::Float64</code></p></li><li><p><code>tot::UInt8</code></p></li><li><p><code>trigger_mask::UInt64</code></p></li><li><p><code>pos::Position{Float64}</code></p></li><li><p><code>dir::Direction{Float64}</code></p></li><li><p><code>t0::Float64</code></p></li><li><p><code>string::UInt8</code></p></li><li><p><code>floor::UInt8</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/types.jl#LL106">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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::FitInformation</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/root/offline.jl#LL67">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/root/offline.jl#LL83">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.FitInformation" href="#KM3io.FitInformation"><code>KM3io.FitInformation</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct FitInformation</code></pre><p>A container object to store fit information which uses 0-based indexing. It implements the array interface. The entries is this vector are float values and their position encodes the meaning of their meaning which is defined in the <a href="https://git.km3net.de/common/km3net-dataformat">KM3NeT DataFormat</a></p><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>The elements of this object should always be accessed using constants defined in <code>KM3io.FITINFORMATION</code>. The use of magic numbers should be avoided to ensure that future changes in the <a href="https://git.km3net.de/common/km3net-dataformat">KM3NeT DataFormat</a> do not break existing code.</p></div></div><p><strong>Fields</strong></p><ul><li><code>values::Vector{Float64}</code></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/root/offline.jl#LL40">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/types.jl#LL203">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/types.jl#LL188">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/types.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.TriggeredHit" href="#KM3io.TriggeredHit"><code>KM3io.TriggeredHit</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/types.jl#LL79">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.CalibratedSnapshotHit" href="#KM3io.CalibratedSnapshotHit"><code>KM3io.CalibratedSnapshotHit</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct CalibratedSnapshotHit <: AbstractCalibratedHit</code></pre><p>A calibrated 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::Float64</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/a326c08f8cd8589387af910f3af85c95ec612b59/src/types.jl#LL67">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.CalibratedTriggeredHit" href="#KM3io.CalibratedTriggeredHit"><code>KM3io.CalibratedTriggeredHit</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct CalibratedTriggeredHit <: AbstractCalibratedHit</code></pre><p>A calibrated triggered 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::Float64</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/a326c08f8cd8589387af910f3af85c95ec612b59/src/types.jl#LL92">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/types.jl#LL127">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/types.jl#LL139">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/root/online.jl#LL104">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/types.jl#LL176">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/types.jl#LL158">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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><li><p><code>_lock::ReentrantLock</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/hdf5/hdf5.jl#LL39">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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><li><p><code>_lock::ReentrantLock</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/catppuccin-mocha.css" data-theme-name="catppuccin-mocha"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-macchiato.css" data-theme-name="catppuccin-macchiato"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-frappe.css" data-theme-name="catppuccin-frappe"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-latte.css" data-theme-name="catppuccin-latte"/><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/auxfiles/">Auxiliary Files</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/online_data/">Online data</a></li><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/orientations/">Orientations</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="#Oscillations-Open-Data"><span>Oscillations Open Data</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.CalibratedSnapshotHit"><code>KM3io.CalibratedSnapshotHit</code></a></li><li><a href="#KM3io.CalibratedTriggeredHit"><code>KM3io.CalibratedTriggeredHit</code></a></li><li><a href="#KM3io.CherenkovPhoton"><code>KM3io.CherenkovPhoton</code></a></li><li><a href="#KM3io.Compass"><code>KM3io.Compass</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.FitInformation"><code>KM3io.FitInformation</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.OSCFile"><code>KM3io.OSCFile</code></a></li><li><a href="#KM3io.Orientations"><code>KM3io.Orientations</code></a></li><li><a href="#KM3io.OscOpenDataTree"><code>KM3io.OscOpenDataTree</code></a></li><li><a href="#KM3io.OscillationsData"><code>KM3io.OscillationsData</code></a></li><li><a href="#KM3io.PMT"><code>KM3io.PMT</code></a></li><li><a href="#KM3io.PMTData"><code>KM3io.PMTData</code></a></li><li><a href="#KM3io.PMTFile"><code>KM3io.PMTFile</code></a></li><li><a href="#KM3io.Position"><code>KM3io.Position</code></a></li><li><a href="#KM3io.Quaternion"><code>KM3io.Quaternion</code></a></li><li><a href="#KM3io.RecStageRange"><code>KM3io.RecStageRange</code></a></li><li><a href="#KM3io.ResponseMatrixBin"><code>KM3io.ResponseMatrixBin</code></a></li><li><a href="#KM3io.ResponseMatrixBinData"><code>KM3io.ResponseMatrixBinData</code></a></li><li><a href="#KM3io.ResponseMatrixBinMuons"><code>KM3io.ResponseMatrixBinMuons</code></a></li><li><a href="#KM3io.ResponseMatrixBinNeutrinos"><code>KM3io.ResponseMatrixBinNeutrinos</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.SummarysliceIntervalIterator"><code>KM3io.SummarysliceIntervalIterator</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="#KM3io.XCalibratedHit"><code>KM3io.XCalibratedHit</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{Tripod}}"><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{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.calibratetime"><code>KM3io.calibratetime</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.distance"><code>KM3io.distance</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.getevent"><code>KM3io.getevent</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.haslocation"><code>KM3io.haslocation</code></a></li><li><a href="#KM3io.hasstring"><code>KM3io.hasstring</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.isbasemodule"><code>KM3io.isbasemodule</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.isopticalmodule"><code>KM3io.isopticalmodule</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.slerp"><code>KM3io.slerp</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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/root/offline.jl#LL99">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct CalibratedMCHit <: KM3io.AbstractCalibratedMCHit</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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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.XCalibratedHit" href="#KM3io.XCalibratedHit"><code>KM3io.XCalibratedHit</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct XCalibratedHit <: AbstractCalibratedHit</code></pre><p>A fully dressed hit with all calibration information which can be obtained. This structure is similar to the Hit structure in aanet and should be used wisely. Most of the time it's much more performant to use dedicated (simplified) structures.</p><p><strong>Fields</strong></p><ul><li><p><code>dom_id::UInt32</code></p></li><li><p><code>channel_id::UInt32</code></p></li><li><p><code>t::Float64</code></p></li><li><p><code>tot::UInt8</code></p></li><li><p><code>trigger_mask::UInt64</code></p></li><li><p><code>pos::Position{Float64}</code></p></li><li><p><code>dir::Direction{Float64}</code></p></li><li><p><code>t0::Float64</code></p></li><li><p><code>string::UInt8</code></p></li><li><p><code>floor::UInt8</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/types.jl#LL106">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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::FitInformation</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/root/offline.jl#LL67">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/root/offline.jl#LL83">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.FitInformation" href="#KM3io.FitInformation"><code>KM3io.FitInformation</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct FitInformation</code></pre><p>A container object to store fit information which uses 0-based indexing. It implements the array interface. The entries is this vector are float values and their position encodes the meaning of their meaning which is defined in the <a href="https://git.km3net.de/common/km3net-dataformat">KM3NeT DataFormat</a></p><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>The elements of this object should always be accessed using constants defined in <code>KM3io.FITINFORMATION</code>. The use of magic numbers should be avoided to ensure that future changes in the <a href="https://git.km3net.de/common/km3net-dataformat">KM3NeT DataFormat</a> do not break existing code.</p></div></div><p><strong>Fields</strong></p><ul><li><code>values::Vector{Float64}</code></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/root/offline.jl#LL40">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/types.jl#LL203">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/types.jl#LL188">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/types.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.TriggeredHit" href="#KM3io.TriggeredHit"><code>KM3io.TriggeredHit</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/types.jl#LL79">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.CalibratedSnapshotHit" href="#KM3io.CalibratedSnapshotHit"><code>KM3io.CalibratedSnapshotHit</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct CalibratedSnapshotHit <: AbstractCalibratedHit</code></pre><p>A calibrated 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::Float64</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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/types.jl#LL67">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.CalibratedTriggeredHit" href="#KM3io.CalibratedTriggeredHit"><code>KM3io.CalibratedTriggeredHit</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct CalibratedTriggeredHit <: AbstractCalibratedHit</code></pre><p>A calibrated triggered 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::Float64</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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/types.jl#LL92">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/types.jl#LL127">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/types.jl#LL139">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/root/online.jl#LL104">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/types.jl#LL176">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/types.jl#LL158">source</a></section></article><h2 id="Oscillations-Open-Data"><a class="docs-heading-anchor" href="#Oscillations-Open-Data">Oscillations Open Data</a><a id="Oscillations-Open-Data-1"></a><a class="docs-heading-anchor-permalink" href="#Oscillations-Open-Data" 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.OscillationsData" href="#KM3io.OscillationsData"><code>KM3io.OscillationsData</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">abstract type OscillationsData</code></pre><p><code>OscillationsData</code> is an abstract type representing the data in an oscillation open data file.</p><p><strong>Fields</strong></p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/root/oscillations.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.OSCFile" href="#KM3io.OSCFile"><code>KM3io.OSCFile</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct OSCFile</code></pre><p><code>OSCFile</code> is a structure representing an oscillation open data file. Depending on the trees inside the root file it will have different fields (neutrino, muons, data).</p><p><strong>Fields</strong></p><ul><li><p><code>_fobj::Union{UnROOT.ROOTFile, Dict}</code></p></li><li><p><code>rawroot::Union{Nothing, UnROOT.ROOTFile}</code></p></li><li><p><code>osc_opendata_nu::Union{Nothing, OscillationsData}</code></p></li><li><p><code>osc_opendata_data::Union{Nothing, OscillationsData}</code></p></li><li><p><code>osc_opendata_muons::Union{Nothing, OscillationsData}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/root/oscillations.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.ResponseMatrixBin" href="#KM3io.ResponseMatrixBin"><code>KM3io.ResponseMatrixBin</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">abstract type ResponseMatrixBin</code></pre><p>A <code>ResponseMatrixBin</code> is an abstract type representing a bin in a response matrix.</p><p><strong>Fields</strong></p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/root/oscillations.jl#LL51">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.ResponseMatrixBinNeutrinos" href="#KM3io.ResponseMatrixBinNeutrinos"><code>KM3io.ResponseMatrixBinNeutrinos</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct ResponseMatrixBinNeutrinos <: ResponseMatrixBin</code></pre><p>A concrete type representing a response matrix bin for neutrino events.</p><p><strong>Fields</strong></p><ul><li><p><code>E_reco_bin::Int64</code></p></li><li><p><code>Ct_reco_bin::Int64</code></p></li><li><p><code>E_true_bin::Int64</code></p></li><li><p><code>Ct_true_bin::Int64</code></p></li><li><p><code>Flav::Int16</code></p></li><li><p><code>IsCC::Int16</code></p></li><li><p><code>AnaClass::Int16</code></p></li><li><p><code>W::Float64</code></p></li><li><p><code>Werr::Float64</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/root/oscillations.jl#LL58">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.ResponseMatrixBinMuons" href="#KM3io.ResponseMatrixBinMuons"><code>KM3io.ResponseMatrixBinMuons</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct ResponseMatrixBinMuons <: ResponseMatrixBin</code></pre><p>A concrete type representing a response matrix bin for muon events. There is no true quantities for muon events.</p><p><strong>Fields</strong></p><ul><li><p><code>E_reco_bin::Int64</code></p></li><li><p><code>Ct_reco_bin::Int64</code></p></li><li><p><code>AnaClass::Int16</code></p></li><li><p><code>W::Float64</code></p></li><li><p><code>Werr::Float64</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/root/oscillations.jl#LL75">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.ResponseMatrixBinData" href="#KM3io.ResponseMatrixBinData"><code>KM3io.ResponseMatrixBinData</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct ResponseMatrixBinData <: ResponseMatrixBin</code></pre><p>A concrete type representing a response matrix bin for data events. There is no true quantities for data events.</p><p><strong>Fields</strong></p><ul><li><p><code>E_reco_bin::Int64</code></p></li><li><p><code>Ct_reco_bin::Int64</code></p></li><li><p><code>AnaClass::Int16</code></p></li><li><p><code>W::Float64</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/root/oscillations.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.OscOpenDataTree" href="#KM3io.OscOpenDataTree"><code>KM3io.OscOpenDataTree</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct OscOpenDataTree{T} <: OscillationsData</code></pre><p><code>OscOpenDataTree</code> is a structure representing an oscillation open data tree, it will be represented as response functions.</p><p><strong>Fields</strong></p><ul><li><p><code>_fobj::UnROOT.ROOTFile</code></p></li><li><p><code>_bin_lookup_map::Dict{Tuple{Int64, Int64, Int64}, Int64}</code></p></li><li><p><code>_t::Any</code></p></li><li><p><code>tpath::String</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/root/oscillations.jl#LL129">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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><li><p><code>_lock::ReentrantLock</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hdf5/hdf5.jl#LL39">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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><li><p><code>_lock::ReentrantLock</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hdf5/hdf5.jl#LL106">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hdf5/hdf5.jl#LL106">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">create_dataset( f::H5File, path::AbstractString, ::Type{T}; @@ -12,88 +12,88 @@ filters, kwargs... ) -> 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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hdf5/hdf5.jl#LL79">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">flush(d::H5CompoundDataset; nolock) -> H5CompoundDataset -</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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hdf5/hdf5.jl#LL22">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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><li><p><code>_pmt_id_module_map::Dict{Int64, DetectorModule}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL268">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.PMTFile" href="#KM3io.PMTFile"><code>KM3io.PMTFile</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct PMTFile</code></pre><p>A container type to hold PMT data which are stored in "PMT files", created by K40 calibrations. This type can be passe to <code>Base.read</code> to load the contents of such a file.</p><p><strong>Example</strong></p><pre><code class="nohighlight hljs">julia> f = read("path/to/pmt.txt", PMTFile) -PMTFile containing parameters of 7254 PMTs</code></pre><p><strong>Fields</strong></p><ul><li><p><code>QE::Float64</code></p></li><li><p><code>mu::Float64</code></p></li><li><p><code>comments::Vector{String}</code></p></li><li><p><code>parameters::KM3io.PMTParameters</code></p></li><li><p><code>pmt_data::Dict{Tuple{Int64, Int64}, PMTData}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL802">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.PMTData" href="#KM3io.PMTData"><code>KM3io.PMTData</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct PMTData</code></pre><p>PMT parameters as stored in <a href="#KM3io.PMTFile"><code>PMTFile</code></a>s.</p><p><strong>Fields</strong></p><ul><li><p><code>QE::Float64</code></p></li><li><p><code>gain::Float64</code></p></li><li><p><code>gainSpread::Float64</code></p></li><li><p><code>riseTime_ns::Float64</code></p></li><li><p><code>TTS_ns::Float64</code></p></li><li><p><code>threshold::Float64</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL788">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL286">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">getmodule(d::Detector, module_id::Integer) -> DetectorModule -</code></pre><p>Return the detector module for a given module ID.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL310">source</a></section><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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hdf5/hdf5.jl#LL79">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">flush(d::H5CompoundDataset; nolock) -> H5CompoundDataset +</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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hdf5/hdf5.jl#LL22">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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><li><p><code>_pmt_id_module_map::Dict{Int64, DetectorModule}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL268">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.PMTFile" href="#KM3io.PMTFile"><code>KM3io.PMTFile</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct PMTFile</code></pre><p>A container type to hold PMT data which are stored in "PMT files", created by K40 calibrations. This type can be passe to <code>Base.read</code> to load the contents of such a file.</p><p><strong>Example</strong></p><pre><code class="nohighlight hljs">julia> f = read("path/to/pmt.txt", PMTFile) +PMTFile containing parameters of 7254 PMTs</code></pre><p><strong>Fields</strong></p><ul><li><p><code>QE::Float64</code></p></li><li><p><code>mu::Float64</code></p></li><li><p><code>comments::Vector{String}</code></p></li><li><p><code>parameters::KM3io.PMTParameters</code></p></li><li><p><code>pmt_data::Dict{Tuple{Int64, Int64}, PMTData}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL802">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.PMTData" href="#KM3io.PMTData"><code>KM3io.PMTData</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct PMTData</code></pre><p>PMT parameters as stored in <a href="#KM3io.PMTFile"><code>PMTFile</code></a>s.</p><p><strong>Fields</strong></p><ul><li><p><code>QE::Float64</code></p></li><li><p><code>gain::Float64</code></p></li><li><p><code>gainSpread::Float64</code></p></li><li><p><code>riseTime_ns::Float64</code></p></li><li><p><code>TTS_ns::Float64</code></p></li><li><p><code>threshold::Float64</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL788">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL286">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">getmodule(d::Detector, module_id::Integer) -> DetectorModule +</code></pre><p>Return the detector module for a given module ID.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL310">source</a></section><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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL314">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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL314">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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL318">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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL322">source</a></section><section><div><pre><code class="language-julia hljs">getmodule(d::Detector, hit::KM3io.AbstractDAQHit) -> Any -</code></pre><p>Return the detector module for a given DAQ hit.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL330">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 (as <code>Tuple</code>).</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL318">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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL322">source</a></section><section><div><pre><code class="language-julia hljs">getmodule(d::Detector, hit::KM3io.AbstractDAQHit) -> Any +</code></pre><p>Return the detector module for a given DAQ hit.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL330">source</a></section><section><div><pre><code class="language-julia hljs">getmodule( d::Detector, hit::KM3io.AbstractMCHit ) -> DetectorModule -</code></pre><p>Return the detector module for a given MC hit.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL334">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL89">source</a></section><section><div><pre><code class="language-julia hljs">getpmt(d::Detector, hit::KM3io.AbstractDAQHit) -> Any -</code></pre><p>Return the <code>PMT</code> for a given hit.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL326">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.haslocation" href="#KM3io.haslocation"><code>KM3io.haslocation</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">haslocation(d::Detector, loc::Location) -> Bool -</code></pre><p>Returns true if there is a module at the given location.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL359">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.hasstring" href="#KM3io.hasstring"><code>KM3io.hasstring</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">hasstring(d::Detector, s::Integer) -> Union{Missing, Bool} -</code></pre><p>Returns true if there is a string with a given number.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL366">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.isbasemodule" href="#KM3io.isbasemodule"><code>KM3io.isbasemodule</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">isbasemodule(d::DetectorModule) -> Bool -</code></pre><p>Returns true if the module is a basemodule.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL80">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.isopticalmodule" href="#KM3io.isopticalmodule"><code>KM3io.isopticalmodule</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">isopticalmodule(d::DetectorModule) -> Bool -</code></pre><p>Returns true if the module is an optical module.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.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="Base.write-Tuple{AbstractString, Detector}" href="#Base.write-Tuple{AbstractString, Detector}"><code>Base.write</code></a> — <span class="docstring-category">Method</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL623">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL640">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL142">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">read( +</code></pre><p>Return the detector module for a given MC hit.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL334">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL89">source</a></section><section><div><pre><code class="language-julia hljs">getpmt(d::Detector, hit::KM3io.AbstractDAQHit) -> Any +</code></pre><p>Return the <code>PMT</code> for a given hit.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL326">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.haslocation" href="#KM3io.haslocation"><code>KM3io.haslocation</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">haslocation(d::Detector, loc::Location) -> Bool +</code></pre><p>Returns true if there is a module at the given location.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL359">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.hasstring" href="#KM3io.hasstring"><code>KM3io.hasstring</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">hasstring(d::Detector, s::Integer) -> Union{Missing, Bool} +</code></pre><p>Returns true if there is a string with a given number.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL366">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.isbasemodule" href="#KM3io.isbasemodule"><code>KM3io.isbasemodule</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">isbasemodule(d::DetectorModule) -> Bool +</code></pre><p>Returns true if the module is a basemodule.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL80">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.isopticalmodule" href="#KM3io.isopticalmodule"><code>KM3io.isopticalmodule</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">isopticalmodule(d::DetectorModule) -> Bool +</code></pre><p>Returns true if the module is an optical module.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.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="Base.write-Tuple{AbstractString, Detector}" href="#Base.write-Tuple{AbstractString, Detector}"><code>Base.write</code></a> — <span class="docstring-category">Method</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL623">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL640">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL142">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL151">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL169">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL151">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL169">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL176">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL194">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL96">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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL374">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL731">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL719">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL176">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL194">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL96">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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL374">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL731">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL719">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL744">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL213">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL744">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL213">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL219">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL240">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL219">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL240">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/hardware.jl#LL248">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">calibrate(det::Detector, hits) -> Vector{XCalibratedHit} -</code></pre><p>Apply full geometry and time calibration to given hits. This way of calibration should be used wisely since it creates a very bloaded <a href="#KM3io.XCalibratedHit"><code>XCalibratedHit</code></a> object, which might not be necessary. Often, we only need time the calibration to be applied.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/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.calibratetime" href="#KM3io.calibratetime"><code>KM3io.calibratetime</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">calibratetime( +</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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/hardware.jl#LL248">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">calibrate(det::Detector, hits) -> Vector{XCalibratedHit} +</code></pre><p>Apply full geometry and time calibration to given hits. This way of calibration should be used wisely since it creates a very bloaded <a href="#KM3io.XCalibratedHit"><code>XCalibratedHit</code></a> object, which might not be necessary. Often, we only need time the calibration to be applied.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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.calibratetime" href="#KM3io.calibratetime"><code>KM3io.calibratetime</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">calibratetime( det::Detector, hits::Array{T<:SnapshotHit, 1} ) -> Vector{CalibratedSnapshotHit} -</code></pre><p>Calibrate the time of a given array of snapshot hits.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/calibration.jl#LL35">source</a></section><section><div><pre><code class="language-julia hljs">calibratetime( +</code></pre><p>Calibrate the time of a given array of snapshot hits.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/calibration.jl#LL35">source</a></section><section><div><pre><code class="language-julia hljs">calibratetime( det::Detector, hits::Array{T<:TriggeredHit, 1} ) -> Vector{CalibratedTriggeredHit} -</code></pre><p>Calibrate the time of a given array of triggered hits.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/calibration.jl#LL48">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">combine( +</code></pre><p>Calibrate the time of a given array of triggered hits.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/calibration.jl#LL48">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/calibration.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.Orientations" href="#KM3io.Orientations"><code>KM3io.Orientations</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct Orientations</code></pre><p>A data structure to hold orientations data. This struct should be instantiated by <code>Base.read(filename, Orientations)</code>.</p><p><strong>Fields</strong></p><ul><li><p><code>module_ids::Set{Int64}</code></p></li><li><p><code>times::Dict{Int64, Vector{Float64}}</code></p></li><li><p><code>quaternions::Dict{Int64, Vector{Quaternion}}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/root/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.Compass" href="#KM3io.Compass"><code>KM3io.Compass</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct Compass{T} <: StaticArraysCore.FieldVector{3, T}</code></pre><p>A compass with yaw, pitch and roll.</p><p><strong>Fields</strong></p><ul><li><p><code>yaw::Any</code></p></li><li><p><code>pitch::Any</code></p></li><li><p><code>roll::Any</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/root/calibration.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.Quaternion" href="#KM3io.Quaternion"><code>KM3io.Quaternion</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct Quaternion{T} <: StaticArraysCore.FieldVector{4, T}</code></pre><p>A simple quaternion derived from a <code>FieldVector</code> of StaticArrays, no more, no less.</p><p><strong>Fields</strong></p><ul><li><p><code>q0::Any</code></p></li><li><p><code>qx::Any</code></p></li><li><p><code>qy::Any</code></p></li><li><p><code>qz::Any</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/types.jl#LL32">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/calibration.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.slew" href="#KM3io.slew"><code>KM3io.slew</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/calibration.jl#LL102">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.slerp" href="#KM3io.slerp"><code>KM3io.slerp</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">slerp(qâ‚, qâ‚‚, t::Real; dot_threshold, normalized) -> Any -</code></pre><p>Interpolate between two vectors (e.g. quaternions) using the slerp method. <code>t</code> should be between 0 and 1. 0 will produce <code>qâ‚</code> and <code>1</code> <code>qâ‚‚</code>.</p><p>The input vectors <code>qâ‚</code> and <code>qâ‚‚</code> will be normalised unless <code>normalized</code> is <code>false</code>. It is not done by default to shave off a few dozens of nanoseconds. Make sure to set <code>normalized=false</code> if the input vectors are not unit vectors.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/tools/math.jl#LL17">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/calibration.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.Orientations" href="#KM3io.Orientations"><code>KM3io.Orientations</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct Orientations</code></pre><p>A data structure to hold orientations data. This struct should be instantiated by <code>Base.read(filename, Orientations)</code>.</p><p><strong>Fields</strong></p><ul><li><p><code>module_ids::Set{Int64}</code></p></li><li><p><code>times::Dict{Int64, Vector{Float64}}</code></p></li><li><p><code>quaternions::Dict{Int64, Vector{Quaternion}}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/root/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.Compass" href="#KM3io.Compass"><code>KM3io.Compass</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct Compass{T} <: StaticArraysCore.FieldVector{3, T}</code></pre><p>A compass with yaw, pitch and roll.</p><p><strong>Fields</strong></p><ul><li><p><code>yaw::Any</code></p></li><li><p><code>pitch::Any</code></p></li><li><p><code>roll::Any</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/root/calibration.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.Quaternion" href="#KM3io.Quaternion"><code>KM3io.Quaternion</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct Quaternion{T} <: StaticArraysCore.FieldVector{4, T}</code></pre><p>A simple quaternion derived from a <code>FieldVector</code> of StaticArrays, no more, no less.</p><p><strong>Fields</strong></p><ul><li><p><code>q0::Any</code></p></li><li><p><code>qx::Any</code></p></li><li><p><code>qy::Any</code></p></li><li><p><code>qz::Any</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/types.jl#LL32">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/calibration.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.slew" href="#KM3io.slew"><code>KM3io.slew</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/calibration.jl#LL102">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.slerp" href="#KM3io.slerp"><code>KM3io.slerp</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">slerp(qâ‚, qâ‚‚, t::Real; dot_threshold, normalized) -> Any +</code></pre><p>Interpolate between two vectors (e.g. quaternions) using the slerp method. <code>t</code> should be between 0 and 1. 0 will produce <code>qâ‚</code> and <code>1</code> <code>qâ‚‚</code>.</p><p>The input vectors <code>qâ‚</code> and <code>qâ‚‚</code> will be normalised unless <code>normalized</code> is <code>false</code>. It is not done by default to shave off a few dozens of nanoseconds. Make sure to set <code>normalized=false</code> if the input vectors are not unit vectors.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/tools/math.jl#LL17">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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">cherenkov( track, hits::Array{T<:AbstractCalibratedHit, 1} ) -> Vector -</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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">triggered(e) -> Vector{T} where T<:KM3io.AbstractDAQHit -</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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59//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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59//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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59//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/a326c08f8cd8589387af910f3af85c95ec612b59//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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59//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/a326c08f8cd8589387af910f3af85c95ec612b59//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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">triggered(e) -> Vector{T} where T<:KM3io.AbstractDAQHit +</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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a//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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a//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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a//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/d256d1d852266e72d98afaaa4c29bf60d281ee7a//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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a//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/d256d1d852266e72d98afaaa4c29bf60d281ee7a//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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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) @@ -106,7 +106,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/a326c08f8cd8589387af910f3af85c95ec612b59/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.SummarysliceIntervalIterator" href="#KM3io.SummarysliceIntervalIterator"><code>KM3io.SummarysliceIntervalIterator</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct SummarysliceIntervalIterator</code></pre><p>An iterator which yields a <code>Vector{Summaryslice}</code> containing summaryslices of a given <code>time_interval</code> (in seconds). Useful when analysing summary data with fixed time intervals. The returned summaryslices are also sorted in time.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia> f = ROOTFile("KM3NeT_00000133_00014728.root") +...</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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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.SummarysliceIntervalIterator" href="#KM3io.SummarysliceIntervalIterator"><code>KM3io.SummarysliceIntervalIterator</code></a> — <span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct SummarysliceIntervalIterator</code></pre><p>An iterator which yields a <code>Vector{Summaryslice}</code> containing summaryslices of a given <code>time_interval</code> (in seconds). Useful when analysing summary data with fixed time intervals. The returned summaryslices are also sorted in time.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia> f = ROOTFile("KM3NeT_00000133_00014728.root") ROOTFile{OnlineTree (83509 events, 106969 summaryslices)} julia> sii = SummarysliceIntervalIterator(f, 60) @@ -135,12 +135,12 @@ n = 100 n = 100 n = 100 n = 96 -n = 31</code></pre><p><strong>Fields</strong></p><ul><li><p><code>sc::KM3io.SummarysliceContainer</code></p></li><li><p><code>first_frame_index::Int64</code></p></li><li><p><code>time_interval::Int64</code></p></li><li><p><code>n_chunks::Int64</code></p></li><li><p><code>timespan::Float64</code></p></li><li><p><code>indices::Vector{Int64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/tools/helpers.jl#LL63">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.getevent" href="#KM3io.getevent"><code>KM3io.getevent</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">getevent( +n = 31</code></pre><p><strong>Fields</strong></p><ul><li><p><code>sc::KM3io.SummarysliceContainer</code></p></li><li><p><code>first_frame_index::Int64</code></p></li><li><p><code>time_interval::Int64</code></p></li><li><p><code>n_chunks::Int64</code></p></li><li><p><code>timespan::Float64</code></p></li><li><p><code>indices::Vector{Int64}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/tools/helpers.jl#LL65">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.getevent" href="#KM3io.getevent"><code>KM3io.getevent</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">getevent( tree::Union{KM3io.OnlineTree, KM3io.OfflineTree}, frame_index, trigger_counter ) -> Any -</code></pre><p>Retrieves the event with for a given <code>frame_index</code> and <code>trigger_counter</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/tools/helpers.jl#LL30">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.categorize" href="#KM3io.categorize"><code>KM3io.categorize</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">categorize( +</code></pre><p>Retrieves the event with for a given <code>frame_index</code> and <code>trigger_counter</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/tools/helpers.jl#LL31">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.categorize" href="#KM3io.categorize"><code>KM3io.categorize</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">categorize( field::Symbol, elements::Vector ) -> Dict{_A, Vector{_A1}} where {_A, _A1} @@ -156,41 +156,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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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) @@ -205,16 +205,16 @@ 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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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/a326c08f8cd8589387af910f3af85c95ec612b59/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/a326c08f8cd8589387af910f3af85c95ec612b59/src/tools/math.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.distance" href="#KM3io.distance"><code>KM3io.distance</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">distance(a::Position, b::Position) -> Any -</code></pre><p>Calculates the disance between two points.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/a326c08f8cd8589387af910f3af85c95ec612b59/src/tools/math.jl#LL9">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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Monday 24 February 2025 15:08">Monday 24 February 2025</span>. Using Julia version 1.10.4.</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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/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><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></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/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/tools/math.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.distance" href="#KM3io.distance"><code>KM3io.distance</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">distance(a::Position, b::Position) -> Any +</code></pre><p>Calculates the disance between two points.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.km3net.de/common/KM3io.jl/blob/d256d1d852266e72d98afaaa4c29bf60d281ee7a/src/tools/math.jl#LL9">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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Friday 28 February 2025 15:01">Friday 28 February 2025</span>. Using Julia version 1.10.4.</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 fc32d76de2ae5d73f1f2b61a6d19174b34dc6ea9..e72cf34753653ecf545e3bb206549a900f1bc8b4 100644 Binary files a/dev/examples/cherenkov.pdf and b/dev/examples/cherenkov.pdf differ diff --git a/dev/examples/cherenkov_times/index.html b/dev/examples/cherenkov_times/index.html index 2c6d8a3be565aeea4079cb7388b092a66db6734b..372a5edd9ac74bc5350a977b9d7d9700fd96885d 100644 --- a/dev/examples/cherenkov_times/index.html +++ b/dev/examples/cherenkov_times/index.html @@ -53,4 +53,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="../orientations/">Orientations »</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Monday 24 February 2025 15:08">Monday 24 February 2025</span>. Using Julia version 1.10.4.</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="../orientations/">Orientations »</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Friday 28 February 2025 15:01">Friday 28 February 2025</span>. Using Julia version 1.10.4.</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 446dfad583ff0b70ebc387fc39f3ce2fb02e35db..a31610feaa1bb843a6d8301a8c70d07401e45cd5 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="../orientations/">« Orientations</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Monday 24 February 2025 15:08">Monday 24 February 2025</span>. Using Julia version 1.10.4.</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="../orientations/">« Orientations</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Friday 28 February 2025 15:01">Friday 28 February 2025</span>. Using Julia version 1.10.4.</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 92f7dc85e7ab54a36722cddbc0cc81146a402adb..cd8d95aeec0ff67467b1ecee90936335ffcd25f0 100644 Binary files a/dev/examples/foo.h5 and b/dev/examples/foo.h5 differ diff --git a/dev/examples/hdf5/index.html b/dev/examples/hdf5/index.html index 6433a6473973f0def5c8c4c7bf2a43d75f3b5e5c..7193b7a9306ce45372f1b1ed771d00ee33735728 100644 --- a/dev/examples/hdf5/index.html +++ b/dev/examples/hdf5/index.html @@ -4,11 +4,11 @@ using Random Random.seed!(23) # to make things reproducible ;) -f = H5File("foo.h5", "w")</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">H5File(HDF5.File: (read-write) foo.h5, Dict{String, H5CompoundDataset}(), ReentrantLock(nothing, 0x00000000, 0x00, Base.GenericCondition{Base.Threads.SpinLock}(Base.IntrusiveLinkedList{Task}(nothing, nothing), Base.Threads.SpinLock(0)), (2, 140655058735536, 140655058738704)))</code></pre><p>We now have an <code>H5File</code> instance which we can use to store datasets.</p><p>Let's say we have our custom data type (<code>struct</code>) like</p><pre><code class="language-julia hljs">struct Particle +f = H5File("foo.h5", "w")</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">H5File(HDF5.File: (read-write) foo.h5, Dict{String, H5CompoundDataset}(), ReentrantLock(nothing, 0x00000000, 0x00, Base.GenericCondition{Base.Threads.SpinLock}(Base.IntrusiveLinkedList{Task}(nothing, nothing), Base.Threads.SpinLock(0)), (8, 139639913747662, 139644454441600)))</code></pre><p>We now have an <code>H5File</code> instance which we can use to store datasets.</p><p>Let's say we have our custom data type (<code>struct</code>) like</p><pre><code class="language-julia hljs">struct Particle x::Float32 y::Float32 E::Int64 -end</code></pre><p>and we generate instances of <code>Particle</code> in a loop which we want to dump directly into an HDF5 file to the dataset stored at <code>simulation/particles</code>, meaning that <code>simulation</code> is the group name and <code>particles</code> the dataset name.</p><h2 id="Creating-datasets"><a class="docs-heading-anchor" href="#Creating-datasets">Creating datasets</a><a id="Creating-datasets-1"></a><a class="docs-heading-anchor-permalink" href="#Creating-datasets" title="Permalink"></a></h2><p>First, we create our dataset with our type <code>Particle</code>. This is a so called <code>H5CompoundDataset</code> and resembles a dataset wich has a compound type (<code>struct</code>) associated with it:</p><pre><code class="language-julia hljs">dset = create_dataset(f, "simulation/particles", Particle)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">H5CompoundDataset{Main.Particle}(HDF5.Dataset: /simulation/particles (file: foo.h5 xfer_mode: 0), KM3io.H5CompoundDatasetCache{Main.Particle}(Main.Particle[], 10000), ReentrantLock(nothing, 0x00000000, 0x00, Base.GenericCondition{Base.Threads.SpinLock}(Base.IntrusiveLinkedList{Task}(nothing, nothing), Base.Threads.SpinLock(0)), (2, 140655058735536, 140655058738704)))</code></pre><p>We fill some random particles using the dummy loop:</p><pre><code class="language-julia hljs">for i in 1:1000 +end</code></pre><p>and we generate instances of <code>Particle</code> in a loop which we want to dump directly into an HDF5 file to the dataset stored at <code>simulation/particles</code>, meaning that <code>simulation</code> is the group name and <code>particles</code> the dataset name.</p><h2 id="Creating-datasets"><a class="docs-heading-anchor" href="#Creating-datasets">Creating datasets</a><a id="Creating-datasets-1"></a><a class="docs-heading-anchor-permalink" href="#Creating-datasets" title="Permalink"></a></h2><p>First, we create our dataset with our type <code>Particle</code>. This is a so called <code>H5CompoundDataset</code> and resembles a dataset wich has a compound type (<code>struct</code>) associated with it:</p><pre><code class="language-julia hljs">dset = create_dataset(f, "simulation/particles", Particle)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">H5CompoundDataset{Main.Particle}(HDF5.Dataset: /simulation/particles (file: foo.h5 xfer_mode: 0), KM3io.H5CompoundDatasetCache{Main.Particle}(Main.Particle[], 10000), ReentrantLock(nothing, 0x00000000, 0x00, Base.GenericCondition{Base.Threads.SpinLock}(Base.IntrusiveLinkedList{Task}(nothing, nothing), Base.Threads.SpinLock(0)), (8, 139639913747662, 139644454441600)))</code></pre><p>We fill some random particles using the dummy loop:</p><pre><code class="language-julia hljs">for i in 1:1000 # creates some random particle particle = Particle(rand(), rand(), rand(1:1000)) # we push to the dataset, just like if it was an Array @@ -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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Monday 24 February 2025 15:08">Monday 24 February 2025</span>. Using Julia version 1.10.4.</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Friday 28 February 2025 15:01">Friday 28 February 2025</span>. Using Julia version 1.10.4.</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 1d019d7b4c1e2ba75cb8b2221b556007fc58aa08..c129d51f4dbc0fbbcb7ec75f8702b1cc30d1a6a9 100644 --- a/dev/examples/offline_data/index.html +++ b/dev/examples/offline_data/index.html @@ -68,4 +68,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="../online_data/">« Online data</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Monday 24 February 2025 15:08">Monday 24 February 2025</span>. Using Julia version 1.10.4.</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="../online_data/">« Online data</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Friday 28 February 2025 15:01">Friday 28 February 2025</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/examples/online_data/index.html b/dev/examples/online_data/index.html index 99746567974ebe74dc8319ace64920858ade8de2..8538fdd5040177d740135bc5f1c185ae36bc5d8b 100644 --- a/dev/examples/online_data/index.html +++ b/dev/examples/online_data/index.html @@ -3,4 +3,4 @@ f = ROOTFile(datapath("online", "km3net_online.root"))</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">ROOTFile{OnlineTree (3 events, 3 summaryslices), OfflineTree (0 events)}</code></pre><p>The <code>ROOTFile</code> is the container object which gives access to both the online and offline tree. In this case, the online tree is empty</p><pre><code class="language-julia hljs">f.offline</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">OfflineTree (0 events)</code></pre><p>and the online tree holds 3 events and 3 summaryslices:</p><pre><code class="language-julia hljs">f.online</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">OnlineTree (3 events, 3 summaryslices)</code></pre><h2 id="Events"><a class="docs-heading-anchor" href="#Events">Events</a><a id="Events-1"></a><a class="docs-heading-anchor-permalink" href="#Events" title="Permalink"></a></h2><p>To access a single event, you can use the usual indexing syntax:</p><pre><code class="language-julia hljs">some_event = f.online.events[2]</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">DAQEvent with 124 snapshot and 53 triggered hits</code></pre><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>While both the offline and online tree contain events which are essentially an array of events (<code>Vector{Evt}</code> respectively <code>Vector{DAQEvent}</code>), the online tree also contains summaryslices and timeslices (timeslices are not implemented yet). For simplicity, indexing into an <code>OfflineTree</code> is directly indexing into events by default, while in case of the <code>OfflineTree</code> the field <code>.events</code> is necessary.</p></div></div><p>or ranges of events:</p><pre><code class="language-julia hljs">events = f.online.events[2:3]</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">2-element Vector{DAQEvent}: DAQEvent with 124 snapshot and 53 triggered hits - DAQEvent with 78 snapshot and 9 triggered hits</code></pre><p>Another way to access events is given by getter function <code>getevent()</code> (which also works for online trees). If a single number if passed, it will be treated as a regular index, just like above:</p><pre><code class="language-julia hljs">event = getevent(f.online, 2)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">DAQEvent with 124 snapshot and 53 triggered hits</code></pre><p>when two numbers are passed, the first one is interpreted as <code>frame_index</code> and the second one as <code>trigger_counter</code>:</p><pre><code class="language-julia hljs">event = getevent(f.online, 127, 1)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">DAQEvent with 124 snapshot and 53 triggered hits</code></pre><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>Events in a ROOT tree are not strictly ordered by time or <code>frame_index</code> and <code>trigger_counter</code>, therefore accessing an event via these two parameters needs a traverse through the tree. The indices are cached for future access but you may experience some delays especially dependening on the location of the event in the tree. In future, a fuzzy binary search might be implemented to speed up this process signifficantly.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../manual/tools/">« Tools</a><a class="docs-footer-nextpage" href="../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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Monday 24 February 2025 15:08">Monday 24 February 2025</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> + DAQEvent with 78 snapshot and 9 triggered hits</code></pre><p>Another way to access events is given by getter function <code>getevent()</code> (which also works for online trees). If a single number if passed, it will be treated as a regular index, just like above:</p><pre><code class="language-julia hljs">event = getevent(f.online, 2)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">DAQEvent with 124 snapshot and 53 triggered hits</code></pre><p>when two numbers are passed, the first one is interpreted as <code>frame_index</code> and the second one as <code>trigger_counter</code>:</p><pre><code class="language-julia hljs">event = getevent(f.online, 127, 1)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">DAQEvent with 124 snapshot and 53 triggered hits</code></pre><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>Events in a ROOT tree are not strictly ordered by time or <code>frame_index</code> and <code>trigger_counter</code>, therefore accessing an event via these two parameters needs a traverse through the tree. The indices are cached for future access but you may experience some delays especially dependening on the location of the event in the tree. In future, a fuzzy binary search might be implemented to speed up this process signifficantly.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../manual/tools/">« Tools</a><a class="docs-footer-nextpage" href="../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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Friday 28 February 2025 15:01">Friday 28 February 2025</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/examples/orientations/b6aaed3c.png b/dev/examples/orientations/b6aaed3c.png deleted file mode 100644 index 9c355c74504a7501dfb1e9d8d3aebbfb7a053589..0000000000000000000000000000000000000000 Binary files a/dev/examples/orientations/b6aaed3c.png and /dev/null differ diff --git a/dev/examples/orientations/cc83a880.png b/dev/examples/orientations/cc83a880.png new file mode 100644 index 0000000000000000000000000000000000000000..df923e5be16e737a28086e6bf3f950aa83680908 Binary files /dev/null and b/dev/examples/orientations/cc83a880.png differ diff --git a/dev/examples/orientations/index.html b/dev/examples/orientations/index.html index cb6f6155a55d8848e755dac4025a7893327e1436..e48ef7ea52b5061305f7bbd7046bcf4fe6cc164b 100644 --- a/dev/examples/orientations/index.html +++ b/dev/examples/orientations/index.html @@ -56,4 +56,4 @@ scatter!(ax_pitch_and_roll, times, pitches, label="pitch") scatter!(ax_pitch_and_roll, times, rolls, label="roll") axislegend(ax_pitch_and_roll, position = :rt) -fig</code></pre><img src="b6aaed3c.png" alt="Example block output"/></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../cherenkov_times/">« Cherenkov times</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Monday 24 February 2025 15:08">Monday 24 February 2025</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +fig</code></pre><img src="cc83a880.png" alt="Example block output"/></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../cherenkov_times/">« Cherenkov times</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Friday 28 February 2025 15:01">Friday 28 February 2025</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/index.html b/dev/index.html index 7008f3091b5eef282f871b8214e27bb0ca3aaa61..823413baabb6852fc1079aebd761a8e3422ce440 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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Monday 24 February 2025 15:08">Monday 24 February 2025</span>. Using Julia version 1.10.4.</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Friday 28 February 2025 15:01">Friday 28 February 2025</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/manual/auxfiles/index.html b/dev/manual/auxfiles/index.html index e4b3ca01ed2320532b52dc33021edb99c1e9107d..9bd8c274e7b80b7084ae10e4fb76343df5eb53da 100644 --- a/dev/manual/auxfiles/index.html +++ b/dev/manual/auxfiles/index.html @@ -3,4 +3,4 @@ using KM3NeTTestData pmtfile = read(datapath("pmt", "calibration_00000117_H_1.0.0_00013757_00013826_1.txt"), PMTFile)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">PMTFile containing parameters of 7254 PMTs</code></pre><p>Data for individual PMTs can be accessed by indexing using the module ID and the DAQ channel ID of the PMT:</p><pre><code class="language-julia hljs">pmtdata = pmtfile[806451572, 4] -pmtdata.gain</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">0.95</code></pre><p>The returned type is <a href="../../api/#KM3io.PMTData"><code>PMTData</code></a> with following fields:</p><pre><code class="language-julia hljs">fieldnames(typeof(pmtdata))</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">(:QE, :gain, :gainSpread, :riseTime_ns, :TTS_ns, :threshold)</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../calibration/">« Calibration</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Monday 24 February 2025 15:08">Monday 24 February 2025</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +pmtdata.gain</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">0.95</code></pre><p>The returned type is <a href="../../api/#KM3io.PMTData"><code>PMTData</code></a> with following fields:</p><pre><code class="language-julia hljs">fieldnames(typeof(pmtdata))</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">(:QE, :gain, :gainSpread, :riseTime_ns, :TTS_ns, :threshold)</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../calibration/">« Calibration</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Friday 28 February 2025 15:01">Friday 28 February 2025</span>. Using Julia version 1.10.4.</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 8630a4350b324bc4364a11abdfa3a840b9159749..7a233f13f6af70588bb7adf711d3cd57ba91fa8a 100644 --- a/dev/manual/calibration/index.html +++ b/dev/manual/calibration/index.html @@ -12,4 +12,4 @@ q = o(module_id, 1693408347)</code></pre><pre class="documenter-example-output" -0.5579828704058057</code></pre><p>The quaternions can be converted to <a href="../../api/#KM3io.Compass"><code>Compass</code></a> object which has the fields <code>.yaw</code>, <code>.pitch</code> and <code>.roll</code>:</p><pre><code class="language-julia hljs">compass = Compass(q)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">3-element Compass{Float64} with indices SOneTo(3): 1.183950558241863 -0.004362150757249865 - -0.0104520470353834</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../detector/">« Detector and its Components</a><a class="docs-footer-nextpage" href="../auxfiles/">Auxiliary 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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Monday 24 February 2025 15:08">Monday 24 February 2025</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> + -0.0104520470353834</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../detector/">« Detector and its Components</a><a class="docs-footer-nextpage" href="../auxfiles/">Auxiliary 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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Friday 28 February 2025 15:01">Friday 28 February 2025</span>. Using Julia version 1.10.4.</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 b42e665429fbc49bbdb92c860ee2873c34e256b1..b2e71f249381244b5d68fb8cbfd880b2918b329b 100644 --- a/dev/manual/detector/index.html +++ b/dev/manual/detector/index.html @@ -199,4 +199,4 @@ DOM(806487219, S009 F17)</code></pre><div class="admonition is-warning"><header pos: Position{Float64}(474.314, 583.421, 161.816) dir: Direction{Float64}(0.819, -0.144, 0.555) tâ‚€: 208297.659 - status: 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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Monday 24 February 2025 15:08">Monday 24 February 2025</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> + status: 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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Friday 28 February 2025 15:01">Friday 28 February 2025</span>. Using Julia version 1.10.4.</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 0277871669dedaddf15ba451740e28c0fe62af51..bf61364902b6032af5c900ac0ddf90988038d66c 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/catppuccin-mocha.css" data-theme-name="catppuccin-mocha"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-macchiato.css" data-theme-name="catppuccin-macchiato"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-frappe.css" data-theme-name="catppuccin-frappe"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-latte.css" data-theme-name="catppuccin-latte"/><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="../auxfiles/">Auxiliary Files</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/online_data/">Online data</a></li><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/orientations/">Orientations</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Monday 24 February 2025 15:08">Monday 24 February 2025</span>. Using Julia version 1.10.4.</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/catppuccin-mocha.css" data-theme-name="catppuccin-mocha"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-macchiato.css" data-theme-name="catppuccin-macchiato"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-frappe.css" data-theme-name="catppuccin-frappe"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-latte.css" data-theme-name="catppuccin-latte"/><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="../auxfiles/">Auxiliary Files</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/online_data/">Online data</a></li><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/orientations/">Orientations</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Friday 28 February 2025 15:01">Friday 28 February 2025</span>. Using Julia version 1.10.4.</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 4269fda5ac4aa24f2a63a9429023ae37e1cdd969..858dad96a3c2a3ecc5880c2102720def0b1855dc 100644 --- a/dev/manual/rootfiles/index.html +++ b/dev/manual/rootfiles/index.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>ROOT Files · KM3io.jl</title><meta name="title" content="ROOT Files · KM3io.jl"/><meta property="og:title" content="ROOT Files · KM3io.jl"/><meta property="twitter:title" content="ROOT 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/catppuccin-mocha.css" data-theme-name="catppuccin-mocha"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-macchiato.css" data-theme-name="catppuccin-macchiato"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-frappe.css" data-theme-name="catppuccin-frappe"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-latte.css" data-theme-name="catppuccin-latte"/><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 class="is-active"><a class="tocitem" href>ROOT Files</a><ul class="internal"><li><a class="tocitem" href="#offline-dataformat"><span>Offline Dataformat</span></a></li><li><a class="tocitem" href="#online_dataformat"><span>Online Dataformat</span></a></li><li><a class="tocitem" href="#xrootd-access"><span>xrootd access</span></a></li></ul></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="../auxfiles/">Auxiliary Files</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/online_data/">Online data</a></li><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/orientations/">Orientations</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>ROOT Files</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>ROOT 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/rootfiles.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="ROOT-Files"><a class="docs-heading-anchor" href="#ROOT-Files">ROOT Files</a><a id="ROOT-Files-1"></a><a class="docs-heading-anchor-permalink" href="#ROOT-Files" title="Permalink"></a></h1><p>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. <code>UnROOT</code> has a single <code>ROOTFile</code> 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.</p><h2 id="offline-dataformat"><a class="docs-heading-anchor" href="#offline-dataformat">Offline Dataformat</a><a id="offline-dataformat-1"></a><a class="docs-heading-anchor-permalink" href="#offline-dataformat" title="Permalink"></a></h2><p>The <a href="https://git.km3net.de/common/km3net-dataformat/-/tree/master/offline">offline dataformat</a> is used to store Monte Carlo (MC) simulations and reconstruction results. The <code>OfflineTree</code> type represents an actual offline file and it is essentially a vector of events (<code>Vector{Evt}</code>) with some fancy caching, lazy access and slicing magic. The offline tree is accessible via the <code>.offline</code> field of the <code>ROOTFile</code> type.</p><h3 id="MC-Header"><a class="docs-heading-anchor" href="#MC-Header">MC Header</a><a id="MC-Header-1"></a><a class="docs-heading-anchor-permalink" href="#MC-Header" title="Permalink"></a></h3><p>The MC header stores metadata related to the simulation chain. The individual entries can be accessed as properties, as shown below.</p><pre><code class="language-julia-repl hljs">julia> using KM3io, KM3NeTTestData +<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>ROOT Files · KM3io.jl</title><meta name="title" content="ROOT Files · KM3io.jl"/><meta property="og:title" content="ROOT Files · KM3io.jl"/><meta property="twitter:title" content="ROOT 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/catppuccin-mocha.css" data-theme-name="catppuccin-mocha"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-macchiato.css" data-theme-name="catppuccin-macchiato"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-frappe.css" data-theme-name="catppuccin-frappe"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-latte.css" data-theme-name="catppuccin-latte"/><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 class="is-active"><a class="tocitem" href>ROOT Files</a><ul class="internal"><li><a class="tocitem" href="#offline-dataformat"><span>Offline Dataformat</span></a></li><li><a class="tocitem" href="#online_dataformat"><span>Online Dataformat</span></a></li><li><a class="tocitem" href="#xrootd-access"><span>xrootd access</span></a></li><li><a class="tocitem" href="#oscillations-dataformat"><span>Oscillations Open Dataformat</span></a></li></ul></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="../auxfiles/">Auxiliary Files</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/online_data/">Online data</a></li><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/orientations/">Orientations</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>ROOT Files</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>ROOT 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/rootfiles.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="ROOT-Files"><a class="docs-heading-anchor" href="#ROOT-Files">ROOT Files</a><a id="ROOT-Files-1"></a><a class="docs-heading-anchor-permalink" href="#ROOT-Files" title="Permalink"></a></h1><p>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. <code>UnROOT</code> has a single <code>ROOTFile</code> 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.</p><h2 id="offline-dataformat"><a class="docs-heading-anchor" href="#offline-dataformat">Offline Dataformat</a><a id="offline-dataformat-1"></a><a class="docs-heading-anchor-permalink" href="#offline-dataformat" title="Permalink"></a></h2><p>The <a href="https://git.km3net.de/common/km3net-dataformat/-/tree/master/offline">offline dataformat</a> is used to store Monte Carlo (MC) simulations and reconstruction results. The <code>OfflineTree</code> type represents an actual offline file and it is essentially a vector of events (<code>Vector{Evt}</code>) with some fancy caching, lazy access and slicing magic. The offline tree is accessible via the <code>.offline</code> field of the <code>ROOTFile</code> type.</p><h3 id="MC-Header"><a class="docs-heading-anchor" href="#MC-Header">MC Header</a><a id="MC-Header-1"></a><a class="docs-heading-anchor-permalink" href="#MC-Header" title="Permalink"></a></h3><p>The MC header stores metadata related to the simulation chain. The individual entries can be accessed as properties, as shown below.</p><pre><code class="language-julia-repl hljs">julia> using KM3io, KM3NeTTestData julia> f = ROOTFile(datapath("offline", "numucc.root")) ROOTFile{OnlineTree (0 events, 0 summaryslices), OfflineTree (10 events)} @@ -181,4 +181,29 @@ 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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Monday 24 February 2025 15:08">Monday 24 February 2025</span>. Using Julia version 1.10.4.</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><h2 id="oscillations-dataformat"><a class="docs-heading-anchor" href="#oscillations-dataformat">Oscillations Open Dataformat</a><a id="oscillations-dataformat-1"></a><a class="docs-heading-anchor-permalink" href="#oscillations-dataformat" title="Permalink"></a></h2><p>The <a href="https://git.km3net.de/vcarretero/prepare-opendata-orca6-433kty/-/tree/main?ref_type=heads">oscillations dataformat</a> is used to store the responses from a particular oscillations analysis data release. The <code>OSCFile</code> type represents an actual ROOT file and it is essentially a vector of Response like entries (<code>Vector{ResponseMatrixBin}</code>) . Depending on what is stored in the initial ROOT file, neutrinos, data and muons response trees are accessible via the <code>.osc_opendata_nu</code>, <code>.osc_opendata_data</code> and <code>.osc_opendata_muons</code> fields of the <code>ROOTFile</code> type respectively.</p><h3 id="ResponseMatrixBin"><a class="docs-heading-anchor" href="#ResponseMatrixBin">ResponseMatrixBin</a><a id="ResponseMatrixBin-1"></a><a class="docs-heading-anchor-permalink" href="#ResponseMatrixBin" title="Permalink"></a></h3><p>The <code>ResponseMatrixBin</code> stores individual directions of a bin in order to fill a histogram.</p><pre><code class="language-julia-repl hljs">julia> using KM3io, KM3NeTTestData + +julia> f = OSCFile(datapath("oscillations", "ORCA6_433kt-y_opendata_v0.4_testdata.root")) +OSCFile{OscOpenDataTree of Neutrinos (59301 events), OscOpenDataTree of Data (106 events), OscOpenDataTree of Muons (99 events)} + +julia> f.osc_opendata_nu +OscOpenDataTree (59301 events) + +julia> f.osc_opendata_nu[1] +KM3io.ResponseMatrixBinNeutrinos(10, 1, 30, 18, -12, 1, 1, 52.25311519561337, 2730.388047646041) + +julia> dump(f.osc_opendata_nu[1]) +KM3io.ResponseMatrixBinNeutrinos + E_reco_bin: Int64 10 + Ct_reco_bin: Int64 1 + E_true_bin: Int64 30 + Ct_true_bin: Int64 18 + Flav: Int16 -12 + IsCC: Int16 1 + AnaClass: Int16 1 + W: Float64 52.25311519561337 + Werr: Float64 2730.388047646041 + +julia> f.osc_opendata_data[1] +KM3io.ResponseMatrixBinData(2, 6, 1, 2.0) +</code></pre></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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Friday 28 February 2025 15:01">Friday 28 February 2025</span>. Using Julia version 1.10.4.</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 0a1e363c9c594f2e6973df7d6614fb785820c050..9fd30239797113b4e7f0d17187f1066cb4adf970 100644 --- a/dev/manual/tools/index.html +++ b/dev/manual/tools/index.html @@ -31,4 +31,4 @@ f = ROOTFile(datapath("offline", "km3net_offline.root"))</co Trk(1, Position{Float64}(465.057, 532.682, 80.732), Direction{Float64}(-0.175, 0.521, -0.835), 8.106927901568094e7, 99.10458562488608, 0.0, 96.75133289411137, 4000, Int32[1, 3, 5, 4], FitInformation([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, Position{Float64}(456.976, 592.751, 193.825), Direction{Float64}(-0.082, -0.122, -0.989), 2.128187723727164e7, 99.10458562488608, 0.0, 560.2775306614813, 4000, Int32[1, 3, 5, 4], FitInformation([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, Position{Float64}(439.747, 590.475, 203.835), Direction{Float64}(-0.102, -0.230, -0.968), 1.6513108700491736e7, 37.8551524925863, 0.0, 278.2872951665753, 4000, Int32[1, 3, 5, 4], FitInformation([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, Position{Float64}(439.743, 546.334, 58.645), Direction{Float64}(0.187, 0.540, -0.821), 4.717893801990337e7, 99.10458562488608, 0.0, 99.59098153341449, 4000, Int32[1, 3, 5, 4], FitInformation([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="../auxfiles/">« Auxiliary Files</a><a class="docs-footer-nextpage" href="../../examples/online_data/">Online 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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Monday 24 February 2025 15:08">Monday 24 February 2025</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> + Trk(1, Position{Float64}(439.743, 546.334, 58.645), Direction{Float64}(0.187, 0.540, -0.821), 4.717893801990337e7, 99.10458562488608, 0.0, 99.59098153341449, 4000, Int32[1, 3, 5, 4], FitInformation([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="../auxfiles/">« Auxiliary Files</a><a class="docs-footer-nextpage" href="../../examples/online_data/">Online 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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Friday 28 February 2025 15:01">Friday 28 February 2025</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/objects.inv b/dev/objects.inv index 7a67663c89199a23977d9008bd4b6844a9c22314..593542a6f18c5155b8688de48cdedc955a153ff8 100644 Binary files a/dev/objects.inv and b/dev/objects.inv differ diff --git a/dev/search_index.js b/dev/search_index.js index e1f96f48ba44fe8165fbbb7c295ed632a81a3175..6ab45f52c6943312cd5a71110c35a68335b14da4 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"manual/auxfiles/#Auxiliary-Files","page":"Auxiliary Files","title":"Auxiliary Files","text":"","category":"section"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"There are a bunch of auxiliary file formats in KM3NeT which are used in different stages of processing and calibration procedures. KM3io.jl supports many of them by defining a container type and extending the Base.read function so that the general pattern is:","category":"page"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"f = read(\"path/to/the.file\", FileContainerType)","category":"page"},{"location":"manual/auxfiles/#PMT-File","page":"Auxiliary Files","title":"PMT File","text":"","category":"section"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"The container type PMTFile is used to load PMT files which are produced by the K40 calibration procedure in Jpp.","category":"page"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"Below is an example, using a PMT file from the KM3NeTTestData.jl package.","category":"page"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"using KM3io\nusing KM3NeTTestData\n\npmtfile = read(datapath(\"pmt\", \"calibration_00000117_H_1.0.0_00013757_00013826_1.txt\"), PMTFile)","category":"page"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"Data for individual PMTs can be accessed by indexing using the module ID and the DAQ channel ID of the PMT:","category":"page"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"pmtdata = pmtfile[806451572, 4]\npmtdata.gain","category":"page"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"The returned type is PMTData with following fields:","category":"page"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"fieldnames(typeof(pmtdata))","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/#Retrieve-a-detector-from-the-DB","page":"Detector and its Components","title":"Retrieve a detector from the DB","text":"","category":"section"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"KM3io.jl comes with a KM3DB.jl extension which allows to load detector information directly from the database. The extension is automatically loaded when KM3DB is imported:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"using KM3io\nusing KM3DB\n\ndet = Detector(133)","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"Keyword arguments passed as Detector(det_id; kwarg1=..., kwarg2=..., ...) are handed over to the detx() function in KM3DB.jl.","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":"In general, data related to detector calibration are either stored in the database or in the Calibration Archive.","category":"page"},{"location":"manual/calibration/#Hits","page":"Calibration","title":"Hits","text":"","category":"section"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"Hit calibration is implemented but not documented here yet. Check out the docs for calibrate().","category":"page"},{"location":"manual/calibration/#Module-Orientations","page":"Calibration","title":"Module Orientations","text":"","category":"section"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"Module orientation data is stored in ROOT files which are generated by the Jpp framework. The corresponding ROOT files, which are the output of the dynamic calibration procedure, are stored in the Calibration Archive under orientations/.","category":"page"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"KM3io.jl extends the Base.read function with a method which reads the whole orientations file at once in an object of type Orientations. This object can be called to calculate the orientation of a module (as a quaternion) for a given time, as long as the time is within the time range of the orientation data. The quaternions from the orientation data are interpolated for the given time using slerp().","category":"page"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"The following example shows how to read the orientation data and obtain the orientation quaternion for a module at a given time.","category":"page"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"using KM3io, KM3NeTTestData\n\no = read(datapath(\"calib\", \"KM3NeT_00000133_D_1.0.0_00017397_00017496_1.orientations.root\"), Orientations)\n\nmodule_id = 817589211\n\nq = o(module_id, 1693408347)","category":"page"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"The quaternions can be converted to Compass object which has the fields .yaw, .pitch and .roll:","category":"page"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"compass = Compass(q)","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\nXCalibratedHit\nTrk\nMCTrk\nFitInformation","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 <: KM3io.AbstractCalibratedMCHit\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.XCalibratedHit","page":"API","title":"KM3io.XCalibratedHit","text":"struct XCalibratedHit <: AbstractCalibratedHit\n\nA fully dressed hit with all calibration information which can be obtained. This structure is similar to the Hit structure in aanet and should be used wisely. Most of the time it's much more performant to use dedicated (simplified) structures.\n\nFields\n\ndom_id::UInt32\nchannel_id::UInt32\nt::Float64\ntot::UInt8\ntrigger_mask::UInt64\npos::Position{Float64}\ndir::Direction{Float64}\nt0::Float64\nstring::UInt8\nfloor::UInt8\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::FitInformation\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/#KM3io.FitInformation","page":"API","title":"KM3io.FitInformation","text":"struct FitInformation\n\nA container object to store fit information which uses 0-based indexing. It implements the array interface. The entries is this vector are float values and their position encodes the meaning of their meaning which is defined in the KM3NeT DataFormat\n\nnote: Note\nThe elements of this object should always be accessed using constants defined in KM3io.FITINFORMATION. The use of magic numbers should be avoided to ensure that future changes in the KM3NeT DataFormat do not break existing code.\n\nFields\n\nvalues::Vector{Float64}\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\nCalibratedSnapshotHit\nCalibratedTriggeredHit\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.CalibratedSnapshotHit","page":"API","title":"KM3io.CalibratedSnapshotHit","text":"struct CalibratedSnapshotHit <: AbstractCalibratedHit\n\nA calibrated snapshot hit.\n\nFields\n\ndom_id::UInt32\nchannel_id::UInt8\nt::Float64\ntot::UInt8\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.CalibratedTriggeredHit","page":"API","title":"KM3io.CalibratedTriggeredHit","text":"struct CalibratedTriggeredHit <: AbstractCalibratedHit\n\nA calibrated triggered hit.\n\nFields\n\ndom_id::UInt32\nchannel_id::UInt8\nt::Float64\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_lock::ReentrantLock\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_lock::ReentrantLock\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 chunk,\n filters,\n kwargs...\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; nolock) -> H5CompoundDataset\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\nPMTFile\nPMTData\nmodules\ngetmodule\ngetpmt\nhaslocation\nhasstring\nisbasemodule\nisopticalmodule\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_pmt_id_module_map::Dict{Int64, DetectorModule}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.PMTFile","page":"API","title":"KM3io.PMTFile","text":"struct PMTFile\n\nA container type to hold PMT data which are stored in \"PMT files\", created by K40 calibrations. This type can be passe to Base.read to load the contents of such a file.\n\nExample\n\njulia> f = read(\"path/to/pmt.txt\", PMTFile)\nPMTFile containing parameters of 7254 PMTs\n\nFields\n\nQE::Float64\nmu::Float64\ncomments::Vector{String}\nparameters::KM3io.PMTParameters\npmt_data::Dict{Tuple{Int64, Int64}, PMTData}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.PMTData","page":"API","title":"KM3io.PMTData","text":"struct PMTData\n\nPMT parameters as stored in PMTFiles.\n\nFields\n\nQE::Float64\ngain::Float64\ngainSpread::Float64\nriseTime_ns::Float64\nTTS_ns::Float64\nthreshold::Float64\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(d::Detector, module_id::Integer) -> DetectorModule\n\n\nReturn the detector module for a given module ID.\n\n\n\n\n\ngetmodule(\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\ngetmodule(d::Detector, hit::KM3io.AbstractDAQHit) -> Any\n\n\nReturn the detector module for a given DAQ hit.\n\n\n\n\n\ngetmodule(\n d::Detector,\n hit::KM3io.AbstractMCHit\n) -> DetectorModule\n\n\nReturn the detector module for a given MC hit.\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\ngetpmt(d::Detector, hit::KM3io.AbstractDAQHit) -> Any\n\n\nReturn the PMT for a given hit.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.haslocation","page":"API","title":"KM3io.haslocation","text":"haslocation(d::Detector, loc::Location) -> Bool\n\n\nReturns true if there is a module at the given location.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.hasstring","page":"API","title":"KM3io.hasstring","text":"hasstring(d::Detector, s::Integer) -> Union{Missing, Bool}\n\n\nReturns true if there is a string with a given number.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.isbasemodule","page":"API","title":"KM3io.isbasemodule","text":"isbasemodule(d::DetectorModule) -> Bool\n\n\nReturns true if the module is a basemodule.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.isopticalmodule","page":"API","title":"KM3io.isopticalmodule","text":"isopticalmodule(d::DetectorModule) -> Bool\n\n\nReturns true if the module is an optical module.\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\ncalibratetime\ncombine\nOrientations\nCompass\nQuaternion\nfloordist\nslew\nslerp","category":"page"},{"location":"api/#KM3io.calibrate","page":"API","title":"KM3io.calibrate","text":"calibrate(det::Detector, hits) -> Vector{XCalibratedHit}\n\n\nApply full geometry and time calibration to given hits. This way of calibration should be used wisely since it creates a very bloaded XCalibratedHit object, which might not be necessary. Often, we only need time the calibration to be applied.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.calibratetime","page":"API","title":"KM3io.calibratetime","text":"calibratetime(\n det::Detector,\n hits::Array{T<:SnapshotHit, 1}\n) -> Vector{CalibratedSnapshotHit}\n\n\nCalibrate the time of a given array of snapshot hits.\n\n\n\n\n\ncalibratetime(\n det::Detector,\n hits::Array{T<:TriggeredHit, 1}\n) -> Vector{CalibratedTriggeredHit}\n\n\nCalibrate the time of a given array of triggered 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.Orientations","page":"API","title":"KM3io.Orientations","text":"struct Orientations\n\nA data structure to hold orientations data. This struct should be instantiated by Base.read(filename, Orientations).\n\nFields\n\nmodule_ids::Set{Int64}\ntimes::Dict{Int64, Vector{Float64}}\nquaternions::Dict{Int64, Vector{Quaternion}}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.Compass","page":"API","title":"KM3io.Compass","text":"struct Compass{T} <: StaticArraysCore.FieldVector{3, T}\n\nA compass with yaw, pitch and roll.\n\nFields\n\nyaw::Any\npitch::Any\nroll::Any\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.Quaternion","page":"API","title":"KM3io.Quaternion","text":"struct Quaternion{T} <: StaticArraysCore.FieldVector{4, T}\n\nA simple quaternion derived from a FieldVector of StaticArrays, no more, no less.\n\nFields\n\nq0::Any\nqx::Any\nqy::Any\nqz::Any\n\n\n\n\n\n","category":"type"},{"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/#KM3io.slerp","page":"API","title":"KM3io.slerp","text":"slerp(qâ‚, qâ‚‚, t::Real; dot_threshold, normalized) -> Any\n\n\nInterpolate between two vectors (e.g. quaternions) using the slerp method. t should be between 0 and 1. 0 will produce qâ‚ and 1 qâ‚‚.\n\nThe input vectors qâ‚ and qâ‚‚ will be normalised unless normalized is false. It is not done by default to shave off a few dozens of nanoseconds. Make sure to set normalized=false if the input vectors are not unit vectors.\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) -> Vector\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{T} where T<:KM3io.AbstractDAQHit\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":"SummarysliceIntervalIterator\ngetevent\ncategorize\nnthbitset\nmost_frequent","category":"page"},{"location":"api/#KM3io.SummarysliceIntervalIterator","page":"API","title":"KM3io.SummarysliceIntervalIterator","text":"struct SummarysliceIntervalIterator\n\nAn iterator which yields a Vector{Summaryslice} containing summaryslices of a given time_interval (in seconds). Useful when analysing summary data with fixed time intervals. The returned summaryslices are also sorted in time.\n\nExamples\n\njulia> f = ROOTFile(\"KM3NeT_00000133_00014728.root\")\nROOTFile{OnlineTree (83509 events, 106969 summaryslices)}\n\njulia> sii = SummarysliceIntervalIterator(f, 60)\nSummarysliceIntervalIterator (10739.7s, 60s intervals, 179 chunks)\n\njulia> for summaryslices in sii\n @show length(summaryslices)\n @show summaryslices[1].header\n break\n end\nlength(summaryslices) = 599\n(summaryslices[1]).header = SummarysliceHeader(133, 14728, 134, UTCExtended(1676246413, 400000000, 0))\n\nnote: Note\nShort time intervals (a few tens of seconds) will likely return Vector{Summaryslice}s with few entries in the first and last iterations due to a delay in run changes. The number of frames per summaryslice will gradually increase due to the asynchronous nature of the run transition. See the example below with a time inteval of 10s and 100 active optical modules.\n\njulia> sii = SummarysliceIntervalIterator(f, 10)\nSummarysliceIntervalIterator (106.2s, 10s intervals, 11 chunks)\n\njulia> for summaryslices in sii\n n = length(summaryslices)\n @show n\n end\nn = 73\nn = 100\nn = 100\nn = 100\nn = 100\nn = 100\nn = 100\nn = 100\nn = 100\nn = 96\nn = 31\n\nFields\n\nsc::KM3io.SummarysliceContainer\nfirst_frame_index::Int64\ntime_interval::Int64\nn_chunks::Int64\ntimespan::Float64\nindices::Vector{Int64}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.getevent","page":"API","title":"KM3io.getevent","text":"getevent(\n tree::Union{KM3io.OnlineTree, KM3io.OfflineTree},\n frame_index,\n trigger_counter\n) -> Any\n\n\nRetrieves the event with for a given frame_index and trigger_counter.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.categorize","page":"API","title":"KM3io.categorize","text":"categorize(\n field::Symbol,\n elements::Vector\n) -> Dict{_A, Vector{_A1}} where {_A, _A1}\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\ndistance","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":"api/#KM3io.distance","page":"API","title":"KM3io.distance","text":"distance(a::Position, b::Position) -> Any\n\n\nCalculates the disance between two points.\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 KM3io, KM3NeTTestData\nusing FHist\nusing PGFPlotsX\n\nf = ROOTFile(datapath(\"offline\", \"mcv6.0.gsg_muon_highE-CC_50-500GeV.km3sim.jterbr00008357.jorcarec.aanet.905.root\"))\nΔts = Hist1D(; counttype=Int, binedges=-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/","page":"Offline data","title":"Offline data","text":"Another way to access events is given by getter function getevent() (which also works for online trees). If a single number if passed, it will be treated as a regular index, just like above:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"event = getevent(f.offline, 3)","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"when two numbers are passed, the first one is interpreted as frame_index and the second one as trigger_counter:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"event = getevent(f.offline, 87, 2)","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":"examples/orientations/#Orientations","page":"Orientations","title":"Orientations","text":"","category":"section"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"The following example shows how to read orientations from a calibration output (ROOT file) and plot the yaw, pitch and roll values for an optical module.","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"The data used in this example is provided by KM3NeTTestData.jl.","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"using KM3io\nusing KM3NeTTestData\nusing CairoMakie\nusing Dates","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"We use Makie for plotting:","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"fig = Figure(size=(900, 400), fontsize=16)\nax_yaw = Axis(fig[1, 1])\nax_pitch_and_roll = Axis(fig[1, 2])","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"We load the orientations data and extract the quaternions including the corresponding times from it:","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"o = read(datapath(\"calib\", \"KM3NeT_00000049_0.0.0_00007631_00007676_1.orientations.root\"), Orientations)\nqdata = o(808972593)","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"The times are converted to DateTime objects, which Makie will understand and display them in a human readable way.","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"times = unix2datetime.(qdata.t)","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"We convert the Quaternions to Compasses to be able to access the yaw, pitch and roll values.","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"compasses = Compass.(qdata.q)\nyaws = [c.yaw for c in compasses]\npitches = [c.pitch for c in compasses]\nrolls = [c.roll for c in compasses]","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"...and we populate the plots:","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"scatter!(ax_yaw, times, yaws, label=\"yaw\")\naxislegend(ax_yaw, position = :rb)\n\nscatter!(ax_pitch_and_roll, times, pitches, label=\"pitch\")\nscatter!(ax_pitch_and_roll, times, rolls, label=\"roll\")\naxislegend(ax_pitch_and_roll, position = :rt)\n\nfig","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":"#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":"examples/online_data/#Online-data","page":"Online data","title":"Online data","text":"","category":"section"},{"location":"examples/online_data/","page":"Online data","title":"Online 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/online_data/","page":"Online data","title":"Online data","text":"using KM3io, KM3NeTTestData\n\nf = ROOTFile(datapath(\"online\", \"km3net_online.root\"))","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online 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/online_data/","page":"Online data","title":"Online data","text":"f.offline","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"and the online tree holds 3 events and 3 summaryslices:","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"f.online","category":"page"},{"location":"examples/online_data/#Events","page":"Online data","title":"Events","text":"","category":"section"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"To access a single event, you can use the usual indexing syntax:","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"some_event = f.online.events[2]","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"note: Note\nWhile both the offline and online tree contain events which are essentially an array of events (Vector{Evt} respectively Vector{DAQEvent}), the online tree also contains summaryslices and timeslices (timeslices are not implemented yet). For simplicity, indexing into an OfflineTree is directly indexing into events by default, while in case of the OfflineTree the field .events is necessary.","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"or ranges of events:","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"events = f.online.events[2:3]","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"Another way to access events is given by getter function getevent() (which also works for online trees). If a single number if passed, it will be treated as a regular index, just like above:","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"event = getevent(f.online, 2)","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"when two numbers are passed, the first one is interpreted as frame_index and the second one as trigger_counter:","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"event = getevent(f.online, 127, 1)","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"note: Note\nEvents in a ROOT tree are not strictly ordered by time or frame_index and trigger_counter, therefore accessing an event via these two parameters needs a traverse through the tree. The indices are cached for future access but you may experience some delays especially dependening on the location of the event in the tree. In future, a fuzzy binary search might be implemented to speed up this process signifficantly.","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/auxfiles/#Auxiliary-Files","page":"Auxiliary Files","title":"Auxiliary Files","text":"","category":"section"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"There are a bunch of auxiliary file formats in KM3NeT which are used in different stages of processing and calibration procedures. KM3io.jl supports many of them by defining a container type and extending the Base.read function so that the general pattern is:","category":"page"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"f = read(\"path/to/the.file\", FileContainerType)","category":"page"},{"location":"manual/auxfiles/#PMT-File","page":"Auxiliary Files","title":"PMT File","text":"","category":"section"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"The container type PMTFile is used to load PMT files which are produced by the K40 calibration procedure in Jpp.","category":"page"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"Below is an example, using a PMT file from the KM3NeTTestData.jl package.","category":"page"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"using KM3io\nusing KM3NeTTestData\n\npmtfile = read(datapath(\"pmt\", \"calibration_00000117_H_1.0.0_00013757_00013826_1.txt\"), PMTFile)","category":"page"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"Data for individual PMTs can be accessed by indexing using the module ID and the DAQ channel ID of the PMT:","category":"page"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"pmtdata = pmtfile[806451572, 4]\npmtdata.gain","category":"page"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"The returned type is PMTData with following fields:","category":"page"},{"location":"manual/auxfiles/","page":"Auxiliary Files","title":"Auxiliary Files","text":"fieldnames(typeof(pmtdata))","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/#Retrieve-a-detector-from-the-DB","page":"Detector and its Components","title":"Retrieve a detector from the DB","text":"","category":"section"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"KM3io.jl comes with a KM3DB.jl extension which allows to load detector information directly from the database. The extension is automatically loaded when KM3DB is imported:","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"using KM3io\nusing KM3DB\n\ndet = Detector(133)","category":"page"},{"location":"manual/detector/","page":"Detector and its Components","title":"Detector and its Components","text":"Keyword arguments passed as Detector(det_id; kwarg1=..., kwarg2=..., ...) are handed over to the detx() function in KM3DB.jl.","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":"In general, data related to detector calibration are either stored in the database or in the Calibration Archive.","category":"page"},{"location":"manual/calibration/#Hits","page":"Calibration","title":"Hits","text":"","category":"section"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"Hit calibration is implemented but not documented here yet. Check out the docs for calibrate().","category":"page"},{"location":"manual/calibration/#Module-Orientations","page":"Calibration","title":"Module Orientations","text":"","category":"section"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"Module orientation data is stored in ROOT files which are generated by the Jpp framework. The corresponding ROOT files, which are the output of the dynamic calibration procedure, are stored in the Calibration Archive under orientations/.","category":"page"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"KM3io.jl extends the Base.read function with a method which reads the whole orientations file at once in an object of type Orientations. This object can be called to calculate the orientation of a module (as a quaternion) for a given time, as long as the time is within the time range of the orientation data. The quaternions from the orientation data are interpolated for the given time using slerp().","category":"page"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"The following example shows how to read the orientation data and obtain the orientation quaternion for a module at a given time.","category":"page"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"using KM3io, KM3NeTTestData\n\no = read(datapath(\"calib\", \"KM3NeT_00000133_D_1.0.0_00017397_00017496_1.orientations.root\"), Orientations)\n\nmodule_id = 817589211\n\nq = o(module_id, 1693408347)","category":"page"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"The quaternions can be converted to Compass object which has the fields .yaw, .pitch and .roll:","category":"page"},{"location":"manual/calibration/","page":"Calibration","title":"Calibration","text":"compass = Compass(q)","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\nXCalibratedHit\nTrk\nMCTrk\nFitInformation","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 <: KM3io.AbstractCalibratedMCHit\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.XCalibratedHit","page":"API","title":"KM3io.XCalibratedHit","text":"struct XCalibratedHit <: AbstractCalibratedHit\n\nA fully dressed hit with all calibration information which can be obtained. This structure is similar to the Hit structure in aanet and should be used wisely. Most of the time it's much more performant to use dedicated (simplified) structures.\n\nFields\n\ndom_id::UInt32\nchannel_id::UInt32\nt::Float64\ntot::UInt8\ntrigger_mask::UInt64\npos::Position{Float64}\ndir::Direction{Float64}\nt0::Float64\nstring::UInt8\nfloor::UInt8\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::FitInformation\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/#KM3io.FitInformation","page":"API","title":"KM3io.FitInformation","text":"struct FitInformation\n\nA container object to store fit information which uses 0-based indexing. It implements the array interface. The entries is this vector are float values and their position encodes the meaning of their meaning which is defined in the KM3NeT DataFormat\n\nnote: Note\nThe elements of this object should always be accessed using constants defined in KM3io.FITINFORMATION. The use of magic numbers should be avoided to ensure that future changes in the KM3NeT DataFormat do not break existing code.\n\nFields\n\nvalues::Vector{Float64}\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\nCalibratedSnapshotHit\nCalibratedTriggeredHit\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.CalibratedSnapshotHit","page":"API","title":"KM3io.CalibratedSnapshotHit","text":"struct CalibratedSnapshotHit <: AbstractCalibratedHit\n\nA calibrated snapshot hit.\n\nFields\n\ndom_id::UInt32\nchannel_id::UInt8\nt::Float64\ntot::UInt8\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.CalibratedTriggeredHit","page":"API","title":"KM3io.CalibratedTriggeredHit","text":"struct CalibratedTriggeredHit <: AbstractCalibratedHit\n\nA calibrated triggered hit.\n\nFields\n\ndom_id::UInt32\nchannel_id::UInt8\nt::Float64\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/#Oscillations-Open-Data","page":"API","title":"Oscillations Open Data","text":"","category":"section"},{"location":"api/","page":"API","title":"API","text":"OscillationsData\nOSCFile\nResponseMatrixBin\nResponseMatrixBinNeutrinos\nResponseMatrixBinMuons\nResponseMatrixBinData\nOscOpenDataTree","category":"page"},{"location":"api/#KM3io.OscillationsData","page":"API","title":"KM3io.OscillationsData","text":"abstract type OscillationsData\n\nOscillationsData is an abstract type representing the data in an oscillation open data file.\n\nFields\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.OSCFile","page":"API","title":"KM3io.OSCFile","text":"struct OSCFile\n\nOSCFile is a structure representing an oscillation open data file. Depending on the trees inside the root file it will have different fields (neutrino, muons, data).\n\nFields\n\n_fobj::Union{UnROOT.ROOTFile, Dict}\nrawroot::Union{Nothing, UnROOT.ROOTFile}\nosc_opendata_nu::Union{Nothing, OscillationsData}\nosc_opendata_data::Union{Nothing, OscillationsData}\nosc_opendata_muons::Union{Nothing, OscillationsData}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.ResponseMatrixBin","page":"API","title":"KM3io.ResponseMatrixBin","text":"abstract type ResponseMatrixBin\n\nA ResponseMatrixBin is an abstract type representing a bin in a response matrix.\n\nFields\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.ResponseMatrixBinNeutrinos","page":"API","title":"KM3io.ResponseMatrixBinNeutrinos","text":"struct ResponseMatrixBinNeutrinos <: ResponseMatrixBin\n\nA concrete type representing a response matrix bin for neutrino events.\n\nFields\n\nE_reco_bin::Int64\nCt_reco_bin::Int64\nE_true_bin::Int64\nCt_true_bin::Int64\nFlav::Int16\nIsCC::Int16\nAnaClass::Int16\nW::Float64\nWerr::Float64\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.ResponseMatrixBinMuons","page":"API","title":"KM3io.ResponseMatrixBinMuons","text":"struct ResponseMatrixBinMuons <: ResponseMatrixBin\n\nA concrete type representing a response matrix bin for muon events. There is no true quantities for muon events.\n\nFields\n\nE_reco_bin::Int64\nCt_reco_bin::Int64\nAnaClass::Int16\nW::Float64\nWerr::Float64\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.ResponseMatrixBinData","page":"API","title":"KM3io.ResponseMatrixBinData","text":"struct ResponseMatrixBinData <: ResponseMatrixBin\n\nA concrete type representing a response matrix bin for data events. There is no true quantities for data events.\n\nFields\n\nE_reco_bin::Int64\nCt_reco_bin::Int64\nAnaClass::Int16\nW::Float64\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.OscOpenDataTree","page":"API","title":"KM3io.OscOpenDataTree","text":"struct OscOpenDataTree{T} <: OscillationsData\n\nOscOpenDataTree is a structure representing an oscillation open data tree, it will be represented as response functions.\n\nFields\n\n_fobj::UnROOT.ROOTFile\n_bin_lookup_map::Dict{Tuple{Int64, Int64, Int64}, Int64}\n_t::Any\ntpath::String\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_lock::ReentrantLock\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_lock::ReentrantLock\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 chunk,\n filters,\n kwargs...\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; nolock) -> H5CompoundDataset\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\nPMTFile\nPMTData\nmodules\ngetmodule\ngetpmt\nhaslocation\nhasstring\nisbasemodule\nisopticalmodule\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_pmt_id_module_map::Dict{Int64, DetectorModule}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.PMTFile","page":"API","title":"KM3io.PMTFile","text":"struct PMTFile\n\nA container type to hold PMT data which are stored in \"PMT files\", created by K40 calibrations. This type can be passe to Base.read to load the contents of such a file.\n\nExample\n\njulia> f = read(\"path/to/pmt.txt\", PMTFile)\nPMTFile containing parameters of 7254 PMTs\n\nFields\n\nQE::Float64\nmu::Float64\ncomments::Vector{String}\nparameters::KM3io.PMTParameters\npmt_data::Dict{Tuple{Int64, Int64}, PMTData}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.PMTData","page":"API","title":"KM3io.PMTData","text":"struct PMTData\n\nPMT parameters as stored in PMTFiles.\n\nFields\n\nQE::Float64\ngain::Float64\ngainSpread::Float64\nriseTime_ns::Float64\nTTS_ns::Float64\nthreshold::Float64\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(d::Detector, module_id::Integer) -> DetectorModule\n\n\nReturn the detector module for a given module ID.\n\n\n\n\n\ngetmodule(\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\ngetmodule(d::Detector, hit::KM3io.AbstractDAQHit) -> Any\n\n\nReturn the detector module for a given DAQ hit.\n\n\n\n\n\ngetmodule(\n d::Detector,\n hit::KM3io.AbstractMCHit\n) -> DetectorModule\n\n\nReturn the detector module for a given MC hit.\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\ngetpmt(d::Detector, hit::KM3io.AbstractDAQHit) -> Any\n\n\nReturn the PMT for a given hit.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.haslocation","page":"API","title":"KM3io.haslocation","text":"haslocation(d::Detector, loc::Location) -> Bool\n\n\nReturns true if there is a module at the given location.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.hasstring","page":"API","title":"KM3io.hasstring","text":"hasstring(d::Detector, s::Integer) -> Union{Missing, Bool}\n\n\nReturns true if there is a string with a given number.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.isbasemodule","page":"API","title":"KM3io.isbasemodule","text":"isbasemodule(d::DetectorModule) -> Bool\n\n\nReturns true if the module is a basemodule.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.isopticalmodule","page":"API","title":"KM3io.isopticalmodule","text":"isopticalmodule(d::DetectorModule) -> Bool\n\n\nReturns true if the module is an optical module.\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\ncalibratetime\ncombine\nOrientations\nCompass\nQuaternion\nfloordist\nslew\nslerp","category":"page"},{"location":"api/#KM3io.calibrate","page":"API","title":"KM3io.calibrate","text":"calibrate(det::Detector, hits) -> Vector{XCalibratedHit}\n\n\nApply full geometry and time calibration to given hits. This way of calibration should be used wisely since it creates a very bloaded XCalibratedHit object, which might not be necessary. Often, we only need time the calibration to be applied.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.calibratetime","page":"API","title":"KM3io.calibratetime","text":"calibratetime(\n det::Detector,\n hits::Array{T<:SnapshotHit, 1}\n) -> Vector{CalibratedSnapshotHit}\n\n\nCalibrate the time of a given array of snapshot hits.\n\n\n\n\n\ncalibratetime(\n det::Detector,\n hits::Array{T<:TriggeredHit, 1}\n) -> Vector{CalibratedTriggeredHit}\n\n\nCalibrate the time of a given array of triggered 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.Orientations","page":"API","title":"KM3io.Orientations","text":"struct Orientations\n\nA data structure to hold orientations data. This struct should be instantiated by Base.read(filename, Orientations).\n\nFields\n\nmodule_ids::Set{Int64}\ntimes::Dict{Int64, Vector{Float64}}\nquaternions::Dict{Int64, Vector{Quaternion}}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.Compass","page":"API","title":"KM3io.Compass","text":"struct Compass{T} <: StaticArraysCore.FieldVector{3, T}\n\nA compass with yaw, pitch and roll.\n\nFields\n\nyaw::Any\npitch::Any\nroll::Any\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.Quaternion","page":"API","title":"KM3io.Quaternion","text":"struct Quaternion{T} <: StaticArraysCore.FieldVector{4, T}\n\nA simple quaternion derived from a FieldVector of StaticArrays, no more, no less.\n\nFields\n\nq0::Any\nqx::Any\nqy::Any\nqz::Any\n\n\n\n\n\n","category":"type"},{"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/#KM3io.slerp","page":"API","title":"KM3io.slerp","text":"slerp(qâ‚, qâ‚‚, t::Real; dot_threshold, normalized) -> Any\n\n\nInterpolate between two vectors (e.g. quaternions) using the slerp method. t should be between 0 and 1. 0 will produce qâ‚ and 1 qâ‚‚.\n\nThe input vectors qâ‚ and qâ‚‚ will be normalised unless normalized is false. It is not done by default to shave off a few dozens of nanoseconds. Make sure to set normalized=false if the input vectors are not unit vectors.\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) -> Vector\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{T} where T<:KM3io.AbstractDAQHit\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":"SummarysliceIntervalIterator\ngetevent\ncategorize\nnthbitset\nmost_frequent","category":"page"},{"location":"api/#KM3io.SummarysliceIntervalIterator","page":"API","title":"KM3io.SummarysliceIntervalIterator","text":"struct SummarysliceIntervalIterator\n\nAn iterator which yields a Vector{Summaryslice} containing summaryslices of a given time_interval (in seconds). Useful when analysing summary data with fixed time intervals. The returned summaryslices are also sorted in time.\n\nExamples\n\njulia> f = ROOTFile(\"KM3NeT_00000133_00014728.root\")\nROOTFile{OnlineTree (83509 events, 106969 summaryslices)}\n\njulia> sii = SummarysliceIntervalIterator(f, 60)\nSummarysliceIntervalIterator (10739.7s, 60s intervals, 179 chunks)\n\njulia> for summaryslices in sii\n @show length(summaryslices)\n @show summaryslices[1].header\n break\n end\nlength(summaryslices) = 599\n(summaryslices[1]).header = SummarysliceHeader(133, 14728, 134, UTCExtended(1676246413, 400000000, 0))\n\nnote: Note\nShort time intervals (a few tens of seconds) will likely return Vector{Summaryslice}s with few entries in the first and last iterations due to a delay in run changes. The number of frames per summaryslice will gradually increase due to the asynchronous nature of the run transition. See the example below with a time inteval of 10s and 100 active optical modules.\n\njulia> sii = SummarysliceIntervalIterator(f, 10)\nSummarysliceIntervalIterator (106.2s, 10s intervals, 11 chunks)\n\njulia> for summaryslices in sii\n n = length(summaryslices)\n @show n\n end\nn = 73\nn = 100\nn = 100\nn = 100\nn = 100\nn = 100\nn = 100\nn = 100\nn = 100\nn = 96\nn = 31\n\nFields\n\nsc::KM3io.SummarysliceContainer\nfirst_frame_index::Int64\ntime_interval::Int64\nn_chunks::Int64\ntimespan::Float64\nindices::Vector{Int64}\n\n\n\n\n\n","category":"type"},{"location":"api/#KM3io.getevent","page":"API","title":"KM3io.getevent","text":"getevent(\n tree::Union{KM3io.OnlineTree, KM3io.OfflineTree},\n frame_index,\n trigger_counter\n) -> Any\n\n\nRetrieves the event with for a given frame_index and trigger_counter.\n\n\n\n\n\n","category":"function"},{"location":"api/#KM3io.categorize","page":"API","title":"KM3io.categorize","text":"categorize(\n field::Symbol,\n elements::Vector\n) -> Dict{_A, Vector{_A1}} where {_A, _A1}\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\ndistance","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":"api/#KM3io.distance","page":"API","title":"KM3io.distance","text":"distance(a::Position, b::Position) -> Any\n\n\nCalculates the disance between two points.\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 KM3io, KM3NeTTestData\nusing FHist\nusing PGFPlotsX\n\nf = ROOTFile(datapath(\"offline\", \"mcv6.0.gsg_muon_highE-CC_50-500GeV.km3sim.jterbr00008357.jorcarec.aanet.905.root\"))\nΔts = Hist1D(; counttype=Int, binedges=-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":"manual/rootfiles/#oscillations-dataformat","page":"ROOT Files","title":"Oscillations Open Dataformat","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The oscillations dataformat is used to store the responses from a particular oscillations analysis data release. The OSCFile type represents an actual ROOT file and it is essentially a vector of Response like entries (Vector{ResponseMatrixBin}) . Depending on what is stored in the initial ROOT file, neutrinos, data and muons response trees are accessible via the .osc_opendata_nu, .osc_opendata_data and .osc_opendata_muons fields of the ROOTFile type respectively.","category":"page"},{"location":"manual/rootfiles/#ResponseMatrixBin","page":"ROOT Files","title":"ResponseMatrixBin","text":"","category":"section"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"The ResponseMatrixBin stores individual directions of a bin in order to fill a histogram.","category":"page"},{"location":"manual/rootfiles/","page":"ROOT Files","title":"ROOT Files","text":"julia> using KM3io, KM3NeTTestData\n\njulia> f = OSCFile(datapath(\"oscillations\", \"ORCA6_433kt-y_opendata_v0.4_testdata.root\"))\nOSCFile{OscOpenDataTree of Neutrinos (59301 events), OscOpenDataTree of Data (106 events), OscOpenDataTree of Muons (99 events)}\n\njulia> f.osc_opendata_nu\nOscOpenDataTree (59301 events)\n\njulia> f.osc_opendata_nu[1]\nKM3io.ResponseMatrixBinNeutrinos(10, 1, 30, 18, -12, 1, 1, 52.25311519561337, 2730.388047646041)\n\njulia> dump(f.osc_opendata_nu[1])\nKM3io.ResponseMatrixBinNeutrinos\n E_reco_bin: Int64 10\n Ct_reco_bin: Int64 1\n E_true_bin: Int64 30\n Ct_true_bin: Int64 18\n Flav: Int16 -12\n IsCC: Int16 1\n AnaClass: Int16 1\n W: Float64 52.25311519561337\n Werr: Float64 2730.388047646041\n\njulia> f.osc_opendata_data[1]\nKM3io.ResponseMatrixBinData(2, 6, 1, 2.0)\n","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/","page":"Offline data","title":"Offline data","text":"Another way to access events is given by getter function getevent() (which also works for online trees). If a single number if passed, it will be treated as a regular index, just like above:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"event = getevent(f.offline, 3)","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"when two numbers are passed, the first one is interpreted as frame_index and the second one as trigger_counter:","category":"page"},{"location":"examples/offline_data/","page":"Offline data","title":"Offline data","text":"event = getevent(f.offline, 87, 2)","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":"examples/orientations/#Orientations","page":"Orientations","title":"Orientations","text":"","category":"section"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"The following example shows how to read orientations from a calibration output (ROOT file) and plot the yaw, pitch and roll values for an optical module.","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"The data used in this example is provided by KM3NeTTestData.jl.","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"using KM3io\nusing KM3NeTTestData\nusing CairoMakie\nusing Dates","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"We use Makie for plotting:","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"fig = Figure(size=(900, 400), fontsize=16)\nax_yaw = Axis(fig[1, 1])\nax_pitch_and_roll = Axis(fig[1, 2])","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"We load the orientations data and extract the quaternions including the corresponding times from it:","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"o = read(datapath(\"calib\", \"KM3NeT_00000049_0.0.0_00007631_00007676_1.orientations.root\"), Orientations)\nqdata = o(808972593)","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"The times are converted to DateTime objects, which Makie will understand and display them in a human readable way.","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"times = unix2datetime.(qdata.t)","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"We convert the Quaternions to Compasses to be able to access the yaw, pitch and roll values.","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"compasses = Compass.(qdata.q)\nyaws = [c.yaw for c in compasses]\npitches = [c.pitch for c in compasses]\nrolls = [c.roll for c in compasses]","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"...and we populate the plots:","category":"page"},{"location":"examples/orientations/","page":"Orientations","title":"Orientations","text":"scatter!(ax_yaw, times, yaws, label=\"yaw\")\naxislegend(ax_yaw, position = :rb)\n\nscatter!(ax_pitch_and_roll, times, pitches, label=\"pitch\")\nscatter!(ax_pitch_and_roll, times, rolls, label=\"roll\")\naxislegend(ax_pitch_and_roll, position = :rt)\n\nfig","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":"#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":"examples/online_data/#Online-data","page":"Online data","title":"Online data","text":"","category":"section"},{"location":"examples/online_data/","page":"Online data","title":"Online 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/online_data/","page":"Online data","title":"Online data","text":"using KM3io, KM3NeTTestData\n\nf = ROOTFile(datapath(\"online\", \"km3net_online.root\"))","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online 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/online_data/","page":"Online data","title":"Online data","text":"f.offline","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"and the online tree holds 3 events and 3 summaryslices:","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"f.online","category":"page"},{"location":"examples/online_data/#Events","page":"Online data","title":"Events","text":"","category":"section"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"To access a single event, you can use the usual indexing syntax:","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"some_event = f.online.events[2]","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"note: Note\nWhile both the offline and online tree contain events which are essentially an array of events (Vector{Evt} respectively Vector{DAQEvent}), the online tree also contains summaryslices and timeslices (timeslices are not implemented yet). For simplicity, indexing into an OfflineTree is directly indexing into events by default, while in case of the OfflineTree the field .events is necessary.","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"or ranges of events:","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"events = f.online.events[2:3]","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"Another way to access events is given by getter function getevent() (which also works for online trees). If a single number if passed, it will be treated as a regular index, just like above:","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"event = getevent(f.online, 2)","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"when two numbers are passed, the first one is interpreted as frame_index and the second one as trigger_counter:","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"event = getevent(f.online, 127, 1)","category":"page"},{"location":"examples/online_data/","page":"Online data","title":"Online data","text":"note: Note\nEvents in a ROOT tree are not strictly ordered by time or frame_index and trigger_counter, therefore accessing an event via these two parameters needs a traverse through the tree. The indices are cached for future access but you may experience some delays especially dependening on the location of the event in the tree. In future, a fuzzy binary search might be implemented to speed up this process signifficantly.","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"}] }