Galaxy surveys such as The Dark Energy Survey (DES) have transformed our understanding of the universe, allowing us to constrain theories of dark matter and dark energy using the growth of cosmological structures since the big bang. To map out these structures, I have helped DES make a “census” of the universe over 1/8th of the sky by taking tens of thousands of images from the 4-meter Victor Blanco Telescope and combining them into a large mosaic containing over 700 million galaxies. However, the large number of observations means that any systematic errors in our analysis will dominate over the usual statistical uncertainties and potentially bias our results. To account for this, I built a tool called Balrog which characterizes the selection effects and measurement biases of our analysis by injecting millions of known galaxies into the real survey images and measuring their response by the DES measurement pipeline. This facilitates far more realistic calibration of image noise, modelling uncertainties, photometric redshifts, and galaxy clustering biases by automatically inheriting systematics too difficult to model explicitly.