Inspired by the sound localization system of the barn owl, we define a new
class of neural codes, called periodic codes, and study their basic properties.
Periodic codes are binary codes with a special patterned form that reflects the
periodicity of the stimulus. Because these codes can be used by the owl to
localize sounds within a convex set of angles, we investigate whether they are
examples of convex codes, which have previously been studied for hippocampal
place cells. We find that periodic codes are typically
not convex, but can be
completed to convex codes in the presence of noise. We introduce the convex
closure and Hamming distance completion as ways of adding codewords to
make a code convex, and describe the convex closure of a periodic code. We
also find that the probability of the convex closure arising stochastically is
greater for sparser codes. Finally, we provide an algebraic method using the
neural ideal to detect if a code is periodic. We find that properties of periodic
codes help to explain several aspects of the behavior observed in the sound
localization system of the barn owl, including common errors in localizing pure
tones.