The cosmic 21 cm signal is set to revolutionise our understanding of the
early Universe, allowing us to probe the 3D temperature and ionisation
structure of the intergalactic medium (IGM). It will open a window onto the
unseen first galaxies, showing us how their UV and X-ray photons drove the
cosmic milestones of the epoch of reionisation (EoR) and epoch of heating
(EoH). To facilitate parameter inference from the 21 cm signal, we previously
developed 21CMMC: a Monte Carlo Markov Chain sampler of 3D EoR simulations.
Here we extend 21CMMC to include simultaneous modelling of the EoH, resulting
in a complete Bayesian inference framework for the astrophysics dominating the
observable epochs of the cosmic 21 cm signal. We demonstrate that second
generation interferometers, the Hydrogen Epoch of Reionisation Array (HERA) and
Square Kilometre Array (SKA) will be able to constrain ionising and X-ray
source properties of the first galaxies with a fractional precision of order
∼1-10 per cent (1σ). The ionisation history of the Universe can be
constrained to within a few percent. Using our extended framework, we quantify
the bias in EoR parameter recovery incurred by the common simplification of a
saturated spin temperature in the IGM. Depending on the extent of overlap
between the EoR and EoH, the recovered astrophysical parameters can be biased
by ∼3−10σ.Comment: 20 pages, 10 figures, 4 tables. Accepted to MNRAS (matches online
version). Movies showing the imprint of the astrophysical parameters on the
21cm signal can be found at http://homepage.sns.it/mesinger/21CMMC.htm