next up previous contents
Next: What can be included Up: Some introductory notes to Previous: The changes introduced in   Contents

The changes introduced in EDF+: the annotation signals

The second important feature in EDF+ is the presence of annotation signals. Basically, an annotation is a piece of text wrapped by some specific character (unprintable ASCII character 20) with a time stamp related to the beginning of the file. We can see an annotation as a diamond-shaped symbol located somewhere in the axis time of our file (not attached to any signal). When we click on the diamond some text (short or long) appears.

In many cases, annotations are strictly necessary. Imagine that we are going to code a conduction velocity study. The consideration of the distance at which the stimulus was applied is not only an important addition to the test, it is as important as the shape of the curve. Much more information has to be included to give sense to the curves. We are not only speaking about filtering, sampling and so on (the information included in the header), but about characteristics of the stimulus, temperature, distances, measurements and many others. The approach in EDF+ is to store all the information in the same file and as close to the curves (the ordinary signals) as possible. In such a way, the data record includes all the information that has to be known locally.

The structure of the annotations is very precisely detailed in the normative document. In this chapter we are going to center in the annotations as a signal and in the next one we are going to describe the possible contents of the annotations.

Let's add to the data record of the previous chapters an annotation signal in the figure 5.1

Figure 5.1: Our data record has been increased with four bytes used to include annotations. Each ball in annotation signals represents two ASCII characters (in UTF-8, each character needs one or several bytes)
\begin{figure}\begin{center}
\epsfig{file=figures/edf2.ps,width=15cm,height=6cm }
\end{center}\end{figure}

Notice that if we use ASCII characters (ASCII characters is a subset of UTF-8) a 2-byte integer is equivalent to two characters. If we define the annotation signal as having 200 samples in each data record, we have a space of 400 characters in each data record. Thanks to the differential sampling, we can accommodate (almost) any amount of text to the data records. The structure of EDF+ imposes a restriction. Annotation signals must have the same length for each data record. There are two possible strategies to define this limit:

The first approach is very easy. When you code some record, you usually know the reasonable limits needed to include the required information.

Having in the same data record the annotations that describe the signals is important because in many cases you can extract the relevant information only by extracting the record from the file. Sometimes it makes much easier the job.

A piece of information is especially important: the time at which the data record starts. The normative document includes a built-in mandatory mechanism to store this time: an empty annotation with a time stamp indicating the relative time in relation to the start time defined in the global header.

Since annotations constitute the second major difference between EDF and EDF+, let me explain the steps necessary to create a continuous EDF+ file from an EDF file:

In summary, to create a continuous EDF+ file is almost equivalent to add a new signal to an EDF file. Then, you get a file with a space in each data record that can be edited to include any kind of information.

Now, a somewhat difficult question. Is it possible to have several annotations signals? The answer is yes. The next items apply:

It is possible to use several annotation signals to group the results of different analysis (e.g., several quantifiers of sleep), to set together several kinds of annotations (e.g., arousal in one annotation signal and sleep stages in another), to handle annotations with different procedures or in many other cases. In the present tutorial, we are going to use only one annotation but it is important to remember that there are other alternatives.

Let us speak a little bit on annotations. I suggested that signals were formed by sixels. Signals are in nature and annotations are in general not in nature. Sometimes I say that annotations are formed by anxels. Being made by persons or machines, annotations imply some kind of language and intelligence. The interaction between signals and annotations is full of possibilities. Annotations define concepts.

The idea underlying EDF+ is maintaining the annotation as close to the data as possible. Annotations have been included in painting for centuries. Let's relax by looking at a very famous annotation in the figure 5.2

Figure 5.2: A famous annotation with its time stamp by Albertus Durerus
\begin{figure}\begin{center}
\epsfig{file=figures/rhino.ps }
\end{center}\end{figure}

One of the most suggestive annotation included in a picture is the Magritte's pipe, where beneath the image of a pipe appears written in perfect French: Ceci n'est pas une pipe. Sometimes you need the annotation very near of the data to produce the desired effect. When my daughter saw this example, she made me notice that a map is also full of annotations. Perhaps it would have been a better example.

In this chapter we defined the general mechanism of annotations. In the next one we are going to fill the annotations with contents.


next up previous contents
Next: What can be included Up: Some introductory notes to Previous: The changes introduced in   Contents
je 2006-10-12