\documentstyle[12pt]{article} \begin{document} \begin{titlepage} \hsize=16.5 truecm \vsize=12.25truein \hrule height 0pt \parindent=0pt \hskip 3.9truein \large EDOC114\par %\newcommand{\ns}{\hskip 1.7 true cm} \vskip .5truein \Large EUROGAM PROJECT\par \vskip 1.5truein \hrule height 2pt \vskip 20pt \large Comments about\par EDOC061 Unified Spectrum Format\par and\par EDOC102 Spectrum Database Structure\par (csnsm-ipn header format)\par \vskip .5truein \vskip 20pt \hrule height 2pt \vskip 1truein \normalsize Edition 1.0\par \vskip 5pt january 1991\par \vfill \normalsize \vskip 5pt H.HARROCH, B.MERLANT, M.DZIRI\par IPN-CSNSM (Orsay)\par \vskip .5truein \end{titlepage} Unified Spectrum Format describes a proposed format header for spectra. A spectrum is made up of a set of histograms or matrices, calibrations and annotations, as defined in EDOC060(D.BRIGHTLY). \subsection*{ Comment 1} There is a set of histograms or matrices, up to height. One main histogram (or matrix) and the others derived from the primary one. All must have the same "shape". I aggre with the idea that there are derived histograms or matrices. Noise histogram is given as an example. But, I think that derived histograms (or matrices) may have not the same "shape". For example, with a two dimensionnal matrix, a slice or a projection have only one dimension. Accordingly, the Data Array Descriptor must have a dimension field. \subsection*{ Comment 2} There is no field to indicate the number of data arrays. \subsection*{ Comment 3} The proposed format is very close to a run-time implementation in memory. So, it is not very suitable for stored spectra. I agree with the idea of an unified spectrum format. But unified spectrum format, means, that both on-line and off-line software handle the same spectrum header on disk. a large variety of programs may handle the header spectrum, so no assumption has to be made on the header specification about implementation . \subsection*{ Comment 4 } The spectrum format must make easy data exchange. So all infor- mation in the header must be in ASCII. \newpage \subsection*{ Comment 5 } The header format must be extended easily. So extension mecanism has to be provided. The header has to be made up of two part: \begin{itemize} \item a fixed length part, containing all necessary informations. \item a variable length part containing optional informations. \end{itemize} fixed and variable parts of the header are in ASCII. An item of the variable part begins with a field containing the extension-id field, telling the purpose of the item which is added to the header spectrum. Following field depends on the extention-id. ( see a proposed format below ) This sheme in derived from technics used in packet switching software (X25 network) where optional services are implemented in X25 header following this scheme. \subsection*{ Comment 6} IN2P3 header has a very simple format. it can only have one data array. All informations contained in the IN2P3 format are in the proposed Unified Spectrum Format except byte ordering and total header length. The IN2P3 header could be extended by increment of 256 bytes. So new fields like dimension or annotation could be implemented. But, it would be better to defined a true extensible header. So future fonctionnalities would be easier to implement. \newpage \subsection*{ a fully extending header spectrum format} The header is made up of three parts: \begin{enumerate} \item a fixed length part \item a variable length part \item a optional part \end{enumerate} \begin{itemize} \item {\bf part 1:\\} part 1 contains general informations and all necessary informations about part 2 and data arrays.\vspace{0.4cm} \begin{tabular}{llr} . application-id & "SPECTRUM-HEADER " & (16 char)\\ . header version & "VERSION-xxx " & (12 char)\\ . spectrum name & "Ge1 " & (80 char)\\ . creation time & "nn-mmm-yy hh:mm:ss "& (20 char)\\ . modification time & "nn-mmm-yy hh:mm:ss "& (20 char)\\ . experiment name & "GAMMA-GAMMA " & (80 char)\\ . run name & " " & (80 char)\\ . run number & "xxx " & ( 8 char)\\ . number of data array& "xxx " & ( 8 char)\\ . byte ordering & "MSB " & ( 4 char)\\ . total header length & "xxx " & ( 8 char)\vspace{0.2 cm}\\ \end{tabular} free space up to 512 characters, for future extension or a general comment.\vspace{0.4cm}\\ \item{\bf part 2:\\} part 2 is made up of data arrays descriptors. \newpage \subsubsection*{ data array descriptor format:\\} "ArrayID ArrayNumber ArrayName ArrayType DataType MinValue MaxValue DimmensionNumber base1 range1 base2 range2 ...."\vspace{0.2cm}\\ \begin{tabular}{p{2cm}l} & field 1: item identifier ArrayID \\ & field 2: data array number \\ & field 3: data array name. Each data array may have a different name.\\ & field 4: array type.\\ & \hspace{1in} "matrix "\\ & \hspace{1in} "half-matrix " \\ & \hspace{1in} "graph16 "\\ & \hspace{1in} "graph32 "\\ & \hspace{1in} "graph " \\ & an histogram is a matrix with the dimension field set to 1.\\ & field 5: data type.\\ & \hspace{1in} "INT*2 " \\ & \hspace{1in} "INT*4 " \\ & \hspace{1in} "REAL*4 " \\ & field 6: minimun value\\ & field 7: maximun value\\ & field 8: dimension of the data array \\ &\hspace{1in} "1D " "2D " ....\\ & field 9: base 1\\ & field 10: range 1 \\ & field 11: base 2 \\ & field 12: range 2\\ & field ...\\ \end{tabular} \newpage \item{\bf part 3: \\} part 3 is made up of optional items. An Item is a character string terminated by a null character. Each field in an item is ended by one or more blank chararacters. The first field of each item is the identifier of the item (ItemID). \subsubsection*{ example:\\} "CalibrationID 3 1 value1 value2 ...."\vspace{0.2cm}\\ \begin{tabular}{p{1cm}l} & field 1: item identifier CalibrationID \\ &field 2: data array number 3 \\ &field 3: dimension array number 1 \\ &next fields: information fields \\ \end{tabular} following this scheme, any new item can be added. \begin{itemize} \item {\bf annotation:\\} "AnnotationId HistogramNumber DimensionNumber InfoToDimmension1 " \item {\bf calibration:\\} "CalibrationId HistogramNumber DimensionNumber ....."\\ \item {\bf efficiency:\\} "EfficiencyId HistogramNumber DimensionNumber ....."\\ \item {\bf information:\\} "InformationId HistogramNumber DimensionNumber ....."\\ \item Other item .... \\ \end{itemize} \end{itemize} \end{document}