  We present a detailed real-space spin-polarized scanning tunneling microscopy
(SP-STM) study of the magnetic domain structure of Gd(0001) films epitaxially
grown on W(110). To find optimal preparation conditions, the influence of the
substrate temperature during deposition and of the post-growth annealing
temperature was investigated. Our results show that the lowest density of
surface defects, such as step edges as well as screw and edge dislocations, is
obtained for room temperature deposition and subsequent annealing at 900\,K.
SP-STM data reveal small-sized magnetic domains at lower annealing
temperatures, evidently caused by pinning at grain boundaries and other
crystalline defects. The coverage-dependent magnetic domain structure of
optimally prepared Gd films was systematically investigated. For low coverage
up to about 80 atomic layers (AL) we observe $\mu$m-sized domains separated by
domain walls which are oriented approximately along the $[1{\bar 1}0]$
direction of the underlying W substrate. Above a critical film thicknesses
$\Theta_{\text{crit}} \approx (100 \pm 20)$\,AL, we identify stripe domains,
indicative for a spin reorientation transition from in-plane to out-of-plane.
In agreement with existing models, the periodicity of the stripe domains
increases the further the coverage exceeds $\Theta_{\text{crit}}$. While the
orientation of the stripe domains is homogeneous over large distances just
above $\Theta_{\text{crit}}$, we find a characteristic zig-zag pattern at
$\Theta \gtrsim 200$\,AL and irregular stripe domains beyond 500\,AL.
Intermediate minima and maxima of the magnetic signal indicate the nucleation
of branching domains. The results are discussed in terms of various
contributions to the total magnetic energy, such as the magneto-crystalline,
the magneto-static, and the magneto-elastic energy density.
