Add a bunch of infrastructure functions for computing oscillation
probabilities.