  Context. Radial velocity (RV) measurements induced by the presence of planets
around late-type stars are contaminated by stellar signals that are of the
order of a few meters per second in amplitude, even for the quietest stars.
Those signals are induced by acoustic oscillations, convective granulation
patterns, active regions co-rotating with the stellar surface, and magnetic
activity cycles. Aims. This study investigates the properties of all coherent
stellar signals seen on the Sun on timescales up to its sidereal rotational
period. By combining HARPS and HARPS-N solar data spanning several years, we
are able to clearly resolve signals on timescales from minutes to several
months. Methods. We use a Markov Chain Monte Carlo (MCMC) mixture model to
determine the quality of the solar data based on the expected airmass-magnitude
extinction law. We then fit the velocity power spectrum of the cleaned and
heliocentric RVs with all known variability sources, to recreate the RV
contribution of each component. Results. After rejecting variations caused by
poor weather conditions, we are able to improve the average intra-day root mean
square (RMS) value by a factor of ~1.8. On sub-rotational timescales, we are
able to fully recreate the observed RMS of the RV variations. In order to also
include rotational components and their strong alias peaks introduced by
nightly sampling gaps, the alias powers are accounted for by being
redistributed to the central frequencies of the rotational harmonics.
Conclusions. In order to enable a better understanding and mitigation of
stellar activity sources, their respective impact on the total RV must be
well-measured and characterized. We are able to recreate RV components up to
rotational timescales, which can be further used to analyse the impact of each
individual source of stellar signals on the detectability of exoplanets.
