An analog to digital converter transforms the data from the circular
potentiometer measuring the angular position of an arbitrary point of reference
on the cylindrical panorama (arena position) into an sequential array of
consecutive data points with possible values ranging from -2048 to 2047
(sampling frequency 20Hz). The zero value corresponds to an arena position
at which all quadrant borders are at a 45° angle with respect to the
fly's longitudinal axis. These raw data are stored in the computer memory
(*position trace*).

Avoidance is assessed as the preference of a fly to keep one pattern
orientation in the frontal position rather than the other. From the position
trace the **preference index** is calculated as (p_{2}-p_{l})/(p_{2}+p_{l}),
with p_{2} being the number of data points corresponding to a position
of the arena at which the pattern orientation not associated with heat
was kept in the frontal quadrant of the visual field and p_{1}
denoting the remaining data points. A group of flies are said to have learned
if their preference index at t_{2} (the last two periods) differs
significantly from that of the respective control group.

The mean duration of periods of staying in one quadrant (dwelling times)
can also be calculated from the position trace by dividing p_{1}
and p_{2} by the number of stays in the respective sector.

The ability to keep optomotor balance with one pattern directly in front
of the fly (i.e. to fly straight towards the pattern) is assessed as the
time the fly kept the patterns in the frontal octant of its visual field
compared to the time the quadrant borders were in this position. In order
to calculate a measure for fixation, the absolute values of the position
trace data array are transformed with modulo 1024 to yield values ranging
from 0 to 1024. From the resulting array (where now the two extreme values
represent the centers of two adjacent patterns) the **fixation index**
is calculated as (f_{1}-f_{2})/(f_{1}+f_{2}),
with f_{2} being the number of data points n fulfilling 256<n<768
and f_{1} being the remaining data points.

As a measure for the activity of the fly during the experiment, the
number of quadrant changes and the total amount of arena rotation are calculated
from the position trace. Adding up the events where data points corresponding
to one pattern orientation in the frontal position are followed by points
corresponding to the adjacent pattern yields the number of **quadrant
changes**. The amount of **arena rotation** is given by the sum of
the distances between consecutive data points in degrees.