Integrating Out Astrophysical Uncertainties