From f207a8568cce73b52f2686a68866e28948c88eb7 Mon Sep 17 00:00:00 2001
From: Tamas Gal <himself@tamasgal.com>
Date: Wed, 30 Oct 2024 11:40:48 +0100
Subject: [PATCH] Updates

---
 km3net-dataformat-specifications.tex | 441 +++++++++++++++++++++------
 1 file changed, 346 insertions(+), 95 deletions(-)

diff --git a/km3net-dataformat-specifications.tex b/km3net-dataformat-specifications.tex
index 883f965..e28b6e6 100644
--- a/km3net-dataformat-specifications.tex
+++ b/km3net-dataformat-specifications.tex
@@ -1,11 +1,12 @@
-\documentclass[a4paper, 11pt]{article}
+\documentclass[a4paper, 11pt]{book}
 
 \usepackage{graphicx}
 \usepackage{color}
 \usepackage{hyperref}
 \usepackage{alertmessage}
 \usepackage{listings}
-\usepackage{forest}
+% \usepackage{forest}
+\usepackage{dirtree}
 \usepackage{bytefield}
 \usepackage{xcolor}
 
@@ -49,6 +50,12 @@
    }
 }
 
+\newenvironment{fieldspecs}
+{
+}
+{
+}
+%
 
 \begin{document}
 
@@ -62,13 +69,14 @@
 \part{Introduction}
 
 
-
 \part{Detector Description}
 
+
 The KM3NeT detector description is stored in two different file formats: ASCII
 (.detx) and binary (.datx). The ASCII version uses UTF-16 encoding. The file
-contains information about the position of the active elements (anchors, DOMs
-and PMTs) of the detector and the timing information.
+contains information about the position of the active elements (depending on the
+version: anchors, optical and base modules and PMTs) of the detector and the
+timing information.
 
 
 \section{DETX}
@@ -76,28 +84,28 @@ and PMTs) of the detector and the timing information.
 \begin{lstlisting}
 global_det_id ndoms\n
 dom_id line_id floor_id npmts\n
-pmt_id_global x y z dx dy dz t0 additional_parameters\n
-pmt_id_global x y z dx dy dz t0 additional_parameters\n
+pmt_id_global x y z dx dy dz t0 opt\n
+pmt_id_global x y z dx dy dz t0 opt\n
 ...
-pmt_id_global x y z dx dy dz t0 additional_parameters\n
+pmt_id_global x y z dx dy dz t0 opt\n
 #repeat for each dom
 \end{lstlisting}
 
-\datafield[int]{global_det_id}{The global detector identifier. Negative values between -100 and 0 are indicating simulation detectors. It is 1 for the PPM-DU and follows the KM3NeT serial number for all detectors in testing and the sea.}
-\datafield[unsigned int]{ndoms}{Number of optical modules, can be 0, which automatically means the ``end of the file''.}
-\datafield[int]{dom_id}{The unique optical module ID. For real detectors, the number is part of the product number and is usually the last 9 digits of the CLBs MAC address).}
-\datafield[int]{line_id}{The string number.}
-\datafield[int]{floor_id}{The floor number starting at 1. In some older DETX files, this might be -1. In this case, the floors are assumed to be numbered strictly monotonically increasing as they appear in the file.}
-\datafield[unsigned int]{npmts}{The number of PMTs. Can be 0.}
-\datafield[int]{pmt_id_global}{The unique global PMT ID. When applicable, the ID corresponds to the ID in the MC files or the KM3NeT product number.}
-\datafield[int or float]{x, y, z}{The position of the PMT.}
-\datafield[int or float]{dx, dy, dz}{The direction where the PMT is pointing at.}
-\datafield[int or float]{t0}{The calibration time offset which has to be added to the detected hit times.}
-\datafield[int or float]{Optional (undocumented) calibration values might appear here.}
-
-
-\alertinfo{Within each DOM section, the PMTs are listed according to an ascending order of their channel ID, starting at 0.}
+\begin{fieldspecs}
+  \datafield[int]{global_det_id}{The global detector identifier. Negative values between -100 and 0 are indicating simulation detectors. It is 1 for the PPM-DU and follows the KM3NeT serial number for all detectors in testing and the sea.}
+  \datafield[unsigned int]{ndoms}{Number of optical modules, can be 0, which automatically means the ``end of the file''.}
+  \datafield[int]{dom_id}{The unique optical module ID. For real detectors, the number is part of the product number and is usually the last 9 digits of the CLBs MAC address.}
+  \datafield[int]{line_id}{The string number.}
+  \datafield[int]{floor_id}{The floor number starting at 1. In some older DETX files, this might be -1. In this case, the floors are assumed to be numbered strictly monotonically increasing as they appear in the file.}
+  \datafield[unsigned int]{npmts}{The number of PMTs. Can be 0.}
+  \datafield[int]{pmt_id_global}{The unique global PMT ID. When applicable, the ID corresponds to the ID in the MC files or the KM3NeT product number.}
+  \datafield[int or float]{x, y, z}{The position of the PMT.}
+  \datafield[int or float]{dx, dy, dz}{The direction where the PMT is pointing at.}
+  \datafield[int or float]{t0}{The calibration time offset which has to be added to the detected hit times.}
+  \datafield[int or float]{opt}{Optional (undocumented) calibration values (space separated) might appear here.}
+\end{fieldspecs}
 
+\alertinfo{Within each DOM section, the PMTs are listed according to an ascending order of their DAQ channel ID, starting at 0.}
 
 
 \subsubsection*{Example}
@@ -123,22 +131,263 @@ global_det_id format_version\n
 UTC_validity_from UTC_validity_to \n
 UTM_ref_grid UTM_ref_easting UTM_ref_northing UTM_ref_z \n
 ndoms \n
-dom_id line_id floor_id npmts \n
- pmt_id_global x y z dx dy dz t0 \n
- pmt_id_global x y z dx dy dz t0 \n
+dom_id line_id floor_id npmts\n
+ pmt_id_global x y z dx dy dz t0 opt\n
+ pmt_id_global x y z dx dy dz t0 opt\n
  ...
- pmt_id_global x y z dx dy dz t0 \n
+ pmt_id_global x y z dx dy dz t0 opt\n
 #repeat for each dom
 \end{lstlisting}
 
 The main additions in the second version of the DETX format are the format
 version, the validity time range and the UTM coordinates of the detector.
 
-  (v|V)[1-9][0-9]+
+\begin{fieldspecs}
+  \datafield[int]{global_det_id}{The global detector identifier. Negative values between -100 and 0 are indicating simulation detectors. It is 1 for the PPM-DU and follows the KM3NeT serial number for all detectors in testing and the sea.}
+  \datafield[string]{format_version}{The version of the data format with the following format: (v|V)[1-9][0-9]+}
+  \datafield[float with 0.1 precision, min: 0.0]{UTC_validity_from}{The begin of the valid time range for the detector description in seconds.}
+  \datafield[float with 0.1 precision, max: 999999999999.9]{UTC_validity_to}{The end of the valid time range for the detector description in seconds.}
+  \datafield[string]{UTM_ref_grid}{The reference ellipsoid of the UTM grid of the detector, e.g. "UTM WGS84 33N"}
+  \datafield[int]{UTM_ref_easting}{Easting of the reference point in the UTM grid.}
+  \datafield[int]{UTM_ref_northing}{Northing of the reference point in the UTM grid.}
+  \datafield[int]{UTM_ref_ref_z}{z-position of the reference point in the UTM grid.}
+  \datafield[unsigned int]{ndoms}{Number of optical modules, can be 0, which automatically means the ``end of the file''.}
+  \datafield[int]{dom_id}{The unique optical module ID. For real detectors, the number is part of the product number and is usually the last 9 digits of the CLBs MAC address.}
+  \datafield[int]{line_id}{The string number.}
+  \datafield[int]{floor_id}{The floor number starting at 1. In some older DETX files, this might be -1. In this case, the floors are assumed to be numbered strictly monotonically increasing as they appear in the file.}
+  \datafield[unsigned int]{npmts}{The number of PMTs. Can be 0.}
+  \datafield[int]{pmt_id_global}{The unique global PMT ID. When applicable, the ID corresponds to the ID in the MC files or the KM3NeT product number.}
+  \datafield[int or float]{x, y, z}{The position of the PMT with reference to the UTM coordinate with x (y) defining the relative distance in Easting (Northing) in metres.}
+  \datafield[int or float]{dx, dy, dz}{The direction where the PMT is pointing at.}
+  \datafield[int or float]{t0}{The calibration time offset which has to be added to the detected hit times.}
+  \datafield[int or float]{opt}{Optional (undocumented) calibration values (space separated) might appear here.}
+\end{fieldspecs}
+
+\alertinfo{Within each DOM section, the PMTs are listed according to an ascending order of their DAQ channel ID, starting at 0.}
+
+\subsubsection*{Example}
+
+Example for ARCA28 (D0ARCA028, detector-ID 160):
+
+\begin{lstlisting}
+160 v2
+1695281794.0 9999999999.0
+UTM WGS84 33N 587600 4016800 -3450
+504
+817606477 1 1 31
+ 28677 -23.09 49.51363 67.363 0 -0.83185 0.555 0
+ 29160 -23.2811 49.68 67.311 -0.9555 0 0.295 0
+ 28685 -23.18555 49.5145 67.311 -0.47775 -0.82748 0.295 0
+ 29152 -22.99445 49.5145 67.311 0.47775 -0.82748 0.295 0
+ 28692 -22.94592 49.59681 67.363 0.7204 -0.41593 0.555 0
+...
+817595519 1 2 31
+ 25019 -23.09 49.51363 103.363 0 -0.83185 0.555 0
+ 25039 -23.2811 49.68 103.311 -0.9555 0 0.295 0
+...
+\end{lstlisting}
 
 \subsection{Version 3 (November 2018)}
+
+\begin{lstlisting}
+# comment line(s) - meta data\n
+global_det_id format_version\n
+UTC_validity_from UTC_validity_to \n
+UTM_ref_grid UTM_ref_easting UTM_ref_northing UTM_ref_z \n
+ndoms \n
+dom_id line_id floor_id npmts\n
+ pmt_id_global x y z dx dy dz t0 PMT_STATUS\n
+ pmt_id_global x y z dx dy dz t0 PMT_STATUS\n
+ ...
+ pmt_id_global x y z dx dy dz t0 PMT_STATUS\n
+#repeat for each dom
+\end{lstlisting}
+
+The main additions in the third version of the DETX format are PMT status flags
+for every PMT and comment lines at the beginning of the file to store meta data.
+
+\begin{fieldspecs}
+  \datafield[hashtag-prefixed string]{comment line}{Only allowed at beginning of the file. New lines may appear inside double quotes (") and are treated as multi-line comments.}
+  \datafield[string]{format_version}{The version of the data format with the following format: (v|V)[1-9][0-9]+}
+  \datafield[float with 0.1 precision, min: 0.0]{UTC_validity_from}{The begin of the valid time range for the detector description in seconds.}
+  \datafield[float with 0.1 precision, max: 999999999999.9]{UTC_validity_to}{The end of the valid time range for the detector description in seconds.}
+  \datafield[string]{UTM_ref_grid}{The reference ellipsoid of the UTM grid of the detector, e.g. "UTM WGS84 33N"}
+  \datafield[int]{UTM_ref_easting}{Easting of the reference point in the UTM grid.}
+  \datafield[int]{UTM_ref_northing}{Northing of the reference point in the UTM grid.}
+  \datafield[int]{UTM_ref_ref_z}{z-position of the reference point in the UTM grid.}
+  \datafield[unsigned int]{ndoms}{Number of optical modules, can be 0, which automatically means the ``end of the file''.}
+  \datafield[int]{dom_id}{The unique optical module ID. For real detectors, the number is part of the product number and is usually the last 9 digits of the CLBs MAC address.}
+  \datafield[int]{line_id}{The string number.}
+  \datafield[int]{floor_id}{The floor number starting at 1. In some older DETX files, this might be -1. In this case, the floors are assumed to be numbered strictly monotonically increasing as they appear in the file.}
+  \datafield[unsigned int]{npmts}{The number of PMTs. Can be 0.}
+  \datafield[int]{pmt_id_global}{The unique global PMT ID. When applicable, the ID corresponds to the ID in the MC files or the KM3NeT product number.}
+  \datafield[int or float]{x, y, z}{The position of the PMT with reference to the UTM coordinate with x (y) defining the relative distance in Easting (Northing) in metres.}
+  \datafield[int or float]{dx, dy, dz}{The direction where the PMT is pointing at.}
+  \datafield[int or float]{t0}{The calibration time offset which has to be added to the detected hit times.}
+  \datafield[int]{PMT_STATUS}{MSB: default = 0 means PMT OK for analysis; 1 = PMT NOT OK for analysis; other status flags to be updated}
+\end{fieldspecs}
+
+\alertinfo{Within each DOM section, the PMTs are listed according to an ascending order of their DAQ channel ID, starting at 0.}
+
+\subsubsection*{Example}
+
+Example for ARCA28 (D0ARCA028, detector-ID 160):
+
+\begin{lstlisting}
+160 v3
+1695281794.0 9999999999.0
+UTM WGS84 33N 587600 4016800 -3450
+504
+817606477 1 1 31
+ 28677 -23.09 49.51363 67.363 0 -0.83185 0.555 0 0
+ 29160 -23.2811 49.68 67.311 -0.9555 0 0.295 0 0
+ 28685 -23.18555 49.5145 67.311 -0.47775 -0.82748 0.295 0 0
+ 29152 -22.99445 49.5145 67.311 0.47775 -0.82748 0.295 0 0
+ 28692 -22.94592 49.59681 67.363 0.7204 -0.41593 0.555 0 0
+...
+817595519 1 2 31
+ 25019 -23.09 49.51363 103.363 0 -0.83185 0.555 0 0
+ 25039 -23.2811 49.68 103.311 -0.9555 0 0.295 0 0
+...
+\end{lstlisting}
+
 \subsection{Version 4 (November 2020)}
+\begin{lstlisting}
+# comment line(s) - meta data\n
+global_det_id format_version\n
+UTC_validity_from UTC_validity_to \n
+UTM_ref_grid UTM_ref_easting UTM_ref_northing UTM_ref_z \n
+nmodules \n
+module_id line_id floor_id m_x m_y m_z q0 qx qy qz m_t0 npmts\n
+ pmt_id_global p_x p_y p_z dx dy dz p_t0 PMT_STATUS\n
+ pmt_id_global p_x p_y p_z dx dy dz p_t0 PMT_STATUS\n
+ ...
+ pmt_id_global p_x p_y p_z dx dy dz p_t0 PMT_STATUS\n
+#repeat for each dom
+\end{lstlisting}
+
+The main additions in the fourth version of the DETX format are extended module
+parameters: position, orientation (represented by a quaternion) and t0 to allow
+for defining non-optical modules (like base modules).
+
+\begin{fieldspecs}
+  \datafield[hashtag-prefixed string]{comment line}{Only allowed at beginning of the file. New lines may appear inside double quotes (") and are treated as multi-line comments.}
+  \datafield[string]{format_version}{The version of the data format with the following format: (v|V)[1-9][0-9]+}
+  \datafield[float with 0.1 precision, min: 0.0]{UTC_validity_from}{The begin of the valid time range for the detector description in seconds.}
+  \datafield[float with 0.1 precision, max: 999999999999.9]{UTC_validity_to}{The end of the valid time range for the detector description in seconds.}
+  \datafield[string]{UTM_ref_grid}{The reference ellipsoid of the UTM grid of the detector, e.g. "UTM WGS84 33N"}
+  \datafield[int]{UTM_ref_easting}{Easting of the reference point in the UTM grid.}
+  \datafield[int]{UTM_ref_northing}{Northing of the reference point in the UTM grid.}
+  \datafield[int]{UTM_ref_ref_z}{z-position of the reference point in the UTM grid.}
+  \datafield[unsigned int]{nmodules}{Number of optical modules, can be 0, which automatically means the ``end of the file''.}
+  \datafield[int]{module_id}{The unique optical module ID. For real detectors, the number is part of the product number and is usually the last 9 digits of the CLBs MAC address.}
+  \datafield[int]{line_id}{The string number.}
+  \datafield[int]{floor_id}{The floor number starting at 1. In some older DETX files, this might be -1. In this case, the floors are assumed to be numbered strictly monotonically increasing as they appear in the file.}
+  \datafield[int or float]{m_x, m_y, m_z}{The position of the module with reference to the UTM coordinate with x (y) defining the relative distance in Easting (Northing) in metres.}
+  \datafield[int or float]{q0, qx, qy, qz}{The orientation of the module represented by a quaternion.}
+  \datafield[int or float]{m_t0}{The calibration time offset which has to be added to the detected hit times.}
+  \datafield[unsigned int]{npmts}{The number of PMTs. Can be 0.}
+  \datafield[int]{pmt_id_global}{The unique global PMT ID. When applicable, the ID corresponds to the ID in the MC files or the KM3NeT product number.}
+  \datafield[int or float]{p_x, p_y, p_z}{The position of the PMT with reference to the UTM coordinate with x (y) defining the relative distance in Easting (Northing) in metres.}
+  \datafield[int or float]{dx, dy, dz}{The direction where the PMT is pointing at.}
+  \datafield[int or float]{p_t0}{The calibration time offset which has to be added to the detected hit times.}
+  \datafield[int]{PMT_STATUS}{MSB: default = 0 means PMT OK for analysis; 1 = PMT NOT OK for analysis; other status flags to be updated}
+\end{fieldspecs}
+
+\alertinfo{Within each module section, the PMTs are listed according to an ascending order of their DAQ channel ID, starting at 0.}
+
+\subsubsection*{Example}
+
+Example for ARCA28 (D0ARCA028, detector-ID 160):
+
+\begin{lstlisting}
+160 v4
+1695281794.0 9999999999.0
+UTM WGS84 33N 587600 4016800 -3450
+532
+809503302 1 0 -23.09 49.68 0 1 0 0 0 0 0
+817606477 1 1 -23.09 49.68 67.252 1 0 0 0 0 31
+ 28677 -23.09 49.51363 67.363 0 -0.83185 0.555 0 0
+ 29160 -23.2811 49.68 67.311 -0.9555 0 0.295 0 0
+ 28685 -23.18555 49.5145 67.311 -0.47775 -0.82748 0.295 0 0
+ 29152 -22.99445 49.5145 67.311 0.47775 -0.82748 0.295 0 0
+ 28692 -22.94592 49.59681 67.363 0.7204 -0.41593 0.555 0 0
+...
+817595519 1 2 -23.09 49.68 103.252 1 0 0 0 0 31
+ 25019 -23.09 49.51363 103.363 0 -0.83185 0.555 0 0
+ 25039 -23.2811 49.68 103.311 -0.9555 0 0.295 0 0
+...
+\end{lstlisting}
+
+
 \subsection{Version 5 (October 2021)}
+
+\begin{lstlisting}
+# comment line(s) - meta data\n
+global_det_id format_version\n
+UTC_validity_from UTC_validity_to\n
+UTM_ref_grid UTM_ref_easting UTM_ref_northing UTM_ref_z\n
+nmodules\n
+module_id line_id floor_id m_x m_y m_z q0 qx qy qz m_t0 COMPONENT_STATUS npmts\n
+ pmt_id_global p_x p_y p_z dx dy dz p_t0 PMT_STATUS\n
+ pmt_id_global p_x p_y p_z dx dy dz p_t0 PMT_STATUS\n
+ ...
+ pmt_id_global p_x p_y p_z dx dy dz p_t0 PMT_STATUS\n
+#repeat for each module
+\end{lstlisting}
+
+The main additions in the fifth version of the DETX format is the COMPONENTESTATUS
+
+\begin{fieldspecs}
+  \datafield[hashtag-prefixed string]{comment line}{Only allowed at beginning of the file. New lines may appear inside double quotes (") and are treated as multi-line comments.}
+  \datafield[string]{format_version}{The version of the data format with the following format: (v|V)[1-9][0-9]+}
+  \datafield[float with 0.1 precision, min: 0.0]{UTC_validity_from}{The begin of the valid time range for the detector description in seconds.}
+  \datafield[float with 0.1 precision, max: 999999999999.9]{UTC_validity_to}{The end of the valid time range for the detector description in seconds.}
+  \datafield[string]{UTM_ref_grid}{The reference ellipsoid of the UTM grid of the detector, e.g. "UTM WGS84 33N".}
+  \datafield[int]{UTM_ref_easting}{Easting of the reference point in the UTM grid.}
+  \datafield[int]{UTM_ref_northing}{Northing of the reference point in the UTM grid.}
+  \datafield[int]{UTM_ref_ref_z}{z-position of the reference point in the UTM grid.}
+  \datafield[unsigned int]{nmodules}{Number of optical modules, can be 0, which automatically means the ``end of the file''.}
+  \datafield[int]{module_id}{The unique module ID. For real detectors, the number is part of the product number and is usually the last 9 digits of the CLBs MAC address.}
+  \datafield[int]{line_id}{The string number.}
+  \datafield[int]{floor_id}{The floor number starting at 1. In some older DETX files, this might be -1. In this case, the floors are assumed to be numbered strictly monotonically increasing as they appear in the file.}
+  \datafield[int or float]{m_x, m_y, m_z}{The position of the module with reference to the UTM coordinate with x (y) defining the relative distance in Easting (Northing) in metres.}
+  \datafield[int or float]{q0, qx, qy, qz}{The orientation of the module represented by a quaternion.}
+  \datafield[int or float]{m_t0}{The calibration time offset which has to be added to the detected hit times.}
+  \datafield[unsigned int]{npmts}{The number of PMTs. Can be 0.}
+  \datafield[int]{pmt_id_global}{The unique global PMT ID. When applicable, the ID corresponds to the ID in the MC files or the KM3NeT product number.}
+  \datafield[int or float]{p_x, p_y, p_z}{The position of the PMT with reference to the UTM coordinate with x (y) defining the relative distance in Easting (Northing) in metres.}
+  \datafield[int or float]{dx, dy, dz}{The direction where the PMT is pointing at.}
+  \datafield[int or float]{p_t0}{The calibration time offset which has to be added to the detected hit times.}
+  \datafield[int]{PMT_STATUS}{MSB: default = 0 means PMT OK for analysis; 1 = PMT NOT OK for analysis; other status flags to be updated}
+\end{fieldspecs}
+
+\alertinfo{Within each module section, the PMTs are listed according to an ascending order of their DAQ channel ID, starting at 0.}
+
+\subsubsection*{Example}
+
+Example for ARCA28 (D0ARCA028, detector-ID 160):
+
+\begin{lstlisting}
+160 v4
+1695281794.0 9999999999.0
+UTM WGS84 33N 587600 4016800 -3450
+532
+809503302 1 0 -23.09 49.68 0 1 0 0 0 0 0
+817606477 1 1 -23.09 49.68 67.252 1 0 0 0 0 31
+ 28677 -23.09 49.51363 67.363 0 -0.83185 0.555 0 0
+ 29160 -23.2811 49.68 67.311 -0.9555 0 0.295 0 0
+ 28685 -23.18555 49.5145 67.311 -0.47775 -0.82748 0.295 0 0
+ 29152 -22.99445 49.5145 67.311 0.47775 -0.82748 0.295 0 0
+ 28692 -22.94592 49.59681 67.363 0.7204 -0.41593 0.555 0 0
+...
+817595519 1 2 -23.09 49.68 103.252 1 0 0 0 0 31
+ 25019 -23.09 49.51363 103.363 0 -0.83185 0.555 0 0
+ 25039 -23.2811 49.68 103.311 -0.9555 0 0.295 0 0
+...
+\end{lstlisting}
+
+
 \section{DATX}
 
 The corresponding Google drive document: https://drive.google.com/open?id=0B6l8SNtndcwaUTZPOWZOXzd6R3M
@@ -283,76 +532,78 @@ Test
 \part{Online Dataformat}
 \part{Offline Dataformat}
 
-\part{Analysis Formats}
+\part{Analysis Data Formats}
 \section{PMT Rates Summary File}
 
-file extension: pmtrates.h5
-
-\begin{forest}
-  for tree={
-    font=\ttfamily,
-    grow'=0,
-    child anchor=west,
-    parent anchor=south,
-    anchor=west,
-    calign=first,
-    edge path={
-      \noexpand\path [draw, \forestoption{edge}]
-      (!u.south west) +(7.5pt,0) |- node[fill,inner sep=1.25pt] {} (.child anchor)\forestoption{edge label};
-    },
-    before typesetting nodes={
-      if n=1
-        {insert before={[,phantom]}}
-        {}
-    },
-    fit=band,
-    before computing xy={l=15pt},
-  }
-[HDF5 root
-  [806451584
-    [max\_rate]
-    [min\_rate]
-    [mean\_rate]
-    [std\_rate]
-  ]
-  [806455816
-    [max\_rate]
-    [min\_rate]
-    [mean\_rate]
-    [std\_rate]
-  ]
-  [806459597
-    [max\_rate]
-    [min\_rate]
-    [mean\_rate]
-    [std\_rate]
-  ]
-]
-\end{forest}
+% file extension: pmtrates.h5
+
+\dirtree{%
+ .1 HDF5 root (group).
+ .2 806451584 (group).
+ .3 max\_rate.
+ .3 min\_rate.
+ .3 mean\_rate.
+ .3 median\_rate.
+ .3 std\_rate.
+ .2 806455816 (group).
+ .3 max\_rate.
+ .3 min\_rate.
+ .3 mean\_rate.
+ .3 median\_rate.
+ .3 std\_rate.
+ .2 806459597 (group).
+ .3 max\_rate.
+ .3 min\_rate.
+ .3 mean\_rate.
+ .3 median\_rate.
+ .3 std\_rate.
+ .2 ....
+}
 
-\begin{lstlisting}
- Row │ utc_s       utc_ns     duty_cycle  ch0             ch1            ch2   ⋯
-     │ Int32       Int32      Float32     Float32         Float32        Float ⋯
-─────┼──────────────────────────────────────────────────────────────────────────
-   1 │ 1676246415  900000000    0.955      55987.2        39368.4         3629 ⋯
-   2 │ 1676247015  900000000    1.0        10160.4         6586.84         754
-   3 │ 1676247615  900000000    1.0        53034.6        15254.0         3256
-   4 │ 1676248215  900000000    1.0        17946.1        11953.7         1261
-   5 │ 1676248815  900000000    1.0         7749.35        6586.84         695 ⋯
-   6 │ 1676249415  900000000    1.0       136875.0        73406.7         9117
-   7 │ 1676250015  900000000    1.0            3.16979e5  20549.2        14846
-   8 │ 1676250615  900000000    1.0        18945.3        14449.5         1444
-   9 │ 1676251215  900000000    1.0            2.0e6          2.0e6            ⋯
-  10 │ 1676251815  900000000    1.0            2.0e6      16999.7
-  11 │ 1676252415  900000000    1.0        15254.0        11020.6         1163
-  12 │ 1676253015  900000000    1.0        86362.3        13687.5         3532
-  13 │ 1676253615  900000000    1.0        18438.9         8873.38        1654 ⋯
-  14 │ 1676254215  900000000    1.0        10439.4        16103.2         1072
-  15 │ 1676254815  900000000    1.0        40449.4        15254.0         3256
-  16 │ 1676255415  900000000    1.0        43873.9        42701.4         4387
-  17 │ 1676256015  900000000    1.0       774935.0            4.38739e5        ⋯
-  18 │ 1676256615  900000000    0.854833   46316.5        34381.4         3831
-                                                              29 columns omitted
-\end{lstlisting}
+
+% \begin{forest}
+%   for tree={
+%     font=\ttfamily,
+%     grow'=0,
+%     child anchor=west,
+%     parent anchor=south,
+%     anchor=west,
+%     calign=first,
+%     edge path={
+%       \noexpand\path [draw, \forestoption{edge} ]
+%       (!u.south west) +(7.5pt,0) |- node[fill,inner sep=1.25pt] {} (.child anchor)\forestoption{edge label};
+%     },
+%     before typesetting nodes={
+%       if n=1
+%         {insert before={[,phantom]}}
+%         {}
+%     },
+%     fit=band,
+%     before computing xy={l=15pt},
+%   }
+% [HDF5 root
+%   [806451584
+%     [max\_rate]
+%     [min\_rate]
+%     [mean\_rate]
+%     [std\_rate]
+%   ]
+%   [806455816
+%     [max\_rate]
+%     [min\_rate]
+%     [mean\_rate]
+%     [std\_rate]
+%   ]
+%   [806459597
+%     [max\_rate]
+%     [min\_rate]
+%     [mean\_rate]
+%     [std\_rate]
+%   ]
+% ]
+% \end{forest}
+
+%\begin{lstlisting}
+%\end{lstlisting}
 
 \end{document}
-- 
GitLab