Measuring the cosmological density perturbation