Added a method to expand power spectra into Legendre polynomials