  We propose a procedure for computing the direct scattering transform of the
periodic sine-Gordon equation. This procedure, previously used within the
periodic Korteweg-de Vries equation framework, is implemented for the case of
the sine-Gordon equation and is validated numerically. In particular, we show
that this algorithm works well with signals involving topological solitons,
such as kink or anti-kink solitons, but also for non-topological solitons, such
as breathers. It has also the ability to distinguish between these different
solutions of the sine-Gordon equation within the complex plane of the
eigenvalue spectrum of the scattering problem. The complex trace of the
scattering matrix is made numerically accessible, and the influence of
breathers on the latter is highlighted. Finally, periodic solutions of the
sine-Gordon equation and their spectral signatures are explored in both the
large-amplitude (cnoidal-like waves) and low-amplitude (radiative modes)
limits.
