  Stellar oscillations can provide a wealth of information about a star, which
can be extracted from observed time series of the star's brightness or radial
velocity. In this paper we address the question of how to extract as much
information as possible from such a dataset. We have developed a Markov Chain
Monte Carlo (MCMC) code that is able to infer the number of oscillation
frequencies present in the signal and their values (with corresponding
uncertainties), without having to fit the amplitudes and phases. Gaps in the
data do not have any serious consequences for this method; in cases where
severe aliasing exists, any ambiguity in the frequency determinations will be
reflected in the results. It also allows us to infer parameters of the
frequency pattern, such as the large separation Delta nu. We have previously
applied this method to the star nu Indi (Bedding et al 2006), and here we
describe the method fully and apply it to simulated datasets, showing that the
code is able to give correct results even when some of the model assumptions
are violated. In particular, the non-sinusoidal nature of the individual
oscillation modes due to stochastic excitation and damping has no major impact
on the usefulness of our approach.
