From d2e72a5bc9df198d721afb04fc5238b40080ee94 Mon Sep 17 00:00:00 2001
From: Tamas Gal <himself@tamasgal.com>
Date: Wed, 30 Oct 2024 14:36:52 +0100
Subject: [PATCH] Fixes

---
 km3net-dataformat-specifications.tex | 48 +++++++++++++++++-----------
 1 file changed, 30 insertions(+), 18 deletions(-)

diff --git a/km3net-dataformat-specifications.tex b/km3net-dataformat-specifications.tex
index f7e2935..b2078da 100644
--- a/km3net-dataformat-specifications.tex
+++ b/km3net-dataformat-specifications.tex
@@ -156,7 +156,7 @@ dom_id line_id floor_id npmts\n
   \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 grid, composed of the string \verb|UTM|, the reference ellipsoid and the UTM grid of the detector, e.g. "UTM WGS84 33N" for the ARCA site in Italy.}
+  \datafield[string]{UTM_ref_grid}{The reference grid, composed of the string UTM, the reference ellipsoid and the UTM grid of the detector, e.g. "UTM WGS84 33N" for the ARCA site in Italy.}
   \datafield[int]{UTM_ref_easting, UTM_ref_northing, UTM_ref_z}{Easting, Northing and z-position of the reference point in the UTM grid. See Section~\ref{section:utm_grid} for more information.}
   \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.}
@@ -172,18 +172,6 @@ dom_id line_id floor_id npmts\n
 
 \alertinfo{Within each DOM section, the PMTs are listed according to an ascending order of their DAQ channel ID, starting at 0.}
 
-\subsubsection{UTM Grid}
-\label{section:utm_grid}
-
-The KM3NeT coordinate system is proposed in \verb|KM3NeT_SOFT_WD_2016_002|, the reference
-point for the ARCA site is defined within the building block one with:
-
-\begin{itemize}
-  \item UTM reference ellipsoid: WGS84
-  \item UTM grid zone: 33N (where N is for North\footnote{A note of caution: The method used here simply adds N or S following the zone number to indicate Northern or Southern hemisphere. See \url{https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system\#Notation} for a general discussion on the grid zone notation})
-  \item The elevation (\verb|UTM_ref_z|) above is the orthometric height calculated relative to the mean sea surface (MSS) as defined by \verb|DTU132|. The see \verb|WGS84| geoid height can be deduced by adding the \verb|EGM96| Geoid height which is \SI{30.9(0.1)}{\meter} at the reference point, as provided by the \verb|NGA EGM96 Geoid Calculator|; the orthometric height of the seafloor at that point is \SI{-3454(1)}{\meter} and the mean for the ARCA building block is \SI{-3452}{\meter}.
-\end{itemize}
-
 \subsubsection*{Example}
 
 Example for ARCA28 (D0ARCA028, detector-ID 160):
@@ -230,7 +218,7 @@ for every PMT and comment lines at the beginning of the file to store meta data.
   \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 grid, composed of the string \verb|UTM|, the reference ellipsoid and the UTM grid of the detector, e.g. "UTM WGS84 33N" for the ARCA site in Italy.}
+  \datafield[string]{UTM_ref_grid}{The reference grid, composed of the string UTM, the reference ellipsoid and the UTM grid of the detector, e.g. "UTM WGS84 33N" for the ARCA site in Italy.}
   \datafield[int]{UTM_ref_easting, UTM_ref_northing, UTM_ref_z}{Easting, Northing and z-position of the reference point in the UTM grid. See Section~\ref{section:utm_grid} for more information.}
   \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.}
@@ -292,7 +280,7 @@ for defining non-optical modules (like base modules).
   \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 grid, composed of the string \verb|UTM|, the reference ellipsoid and the UTM grid of the detector, e.g. "UTM WGS84 33N" for the ARCA site in Italy.}
+  \datafield[string]{UTM_ref_grid}{The reference grid, composed of the string UTM, the reference ellipsoid and the UTM grid of the detector, e.g. "UTM WGS84 33N" for the ARCA site in Italy.}
   \datafield[int]{UTM_ref_easting, UTM_ref_northing, UTM_ref_z}{Easting, Northing and z-position of the reference point in the UTM grid. See Section~\ref{section:utm_grid} for more information.}
   \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.}
@@ -358,7 +346,7 @@ The main additions in the fifth version of the DETX format is the COMPONENTESTAT
   \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 grid, composed of the string \verb|UTM|, the reference ellipsoid and the UTM grid of the detector, e.g. "UTM WGS84 33N" for the ARCA site in Italy.}
+  \datafield[string]{UTM_ref_grid}{The reference grid, composed of the string UTM, the reference ellipsoid and the UTM grid of the detector, e.g. "UTM WGS84 33N" for the ARCA site in Italy.}
   \datafield[int]{UTM_ref_easting, UTM_ref_northing, UTM_ref_z}{Easting, Northing and z-position of the reference point in the UTM grid. See Section~\ref{section:utm_grid} for more information.}
   \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.}
@@ -403,9 +391,33 @@ UTM WGS84 33N 587600 4016800 -3450
 
 \section{DATX}
 
-The corresponding Google drive document: https://drive.google.com/open?id=0B6l8SNtndcwaUTZPOWZOXzd6R3M
+The corresponding Google drive document: \url{https://drive.google.com/open?id=0B6l8SNtndcwaUTZPOWZOXzd6R3M}
+
+\section{UTM Grid}
+\label{section:utm_grid}
+
+The KM3NeT coordinate system is proposed in \verb|KM3NeT_SOFT_WD_2016_002|, the reference
+point for the ARCA site is defined within the building block one with:
+
+\begin{itemize}
+  \item UTM reference ellipsoid: WGS84
+  \item UTM grid zone: 33N (where N is for North\footnote{A note of caution: The method used here simply adds N or S following the zone number to indicate Northern or Southern hemisphere. See \url{https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system\#Notation} for a general discussion on the grid zone notation})
+  \item The elevation (\verb|UTM_ref_z|) above is the orthometric height calculated relative to the mean sea surface (MSS) as defined by \verb|DTU132|. The see \verb|WGS84| geoid height can be deduced by adding the \verb|EGM96| Geoid height which is \SI{30.9(0.1)}{\meter} at the reference point, as provided by the \verb|NGA EGM96 Geoid Calculator|; the orthometric height of the seafloor at that point is \SI{-3454(1)}{\meter} and the mean for the ARCA building block is \SI{-3452}{\meter}.
+\end{itemize}
+
+\section{PMT Status}
+
+\begin{table}[h]
+    \centering
+    \begin{tabular}{l|l|l|l}
+        \textbf{Type} & \textbf{Name} & \textbf{Number} & \textbf{Comment} \\ \hline
+        \csvreader[head to column names]{km3net-dataformat/definitions/pmt_status.csv}{}%
+        {\\ \csvcoli & \csvcolii & \csvcoliii & \csvcoliv}
+    \end{tabular}
+\end{table}
+
+\section{Module Status}
 
-Test
 
 \part{DAQ}
 \section{DAQ Common Header}
-- 
GitLab