Code for calculating the sensitivity of 21cm experiments to the EoR power spectrum