h0NS = 2*v**2*sympy.simplify(hComplex(lambdaHat, lambdaHat)-hComplex(nHat, nHat))

h2Ss = 2*v**4*hComplex(Sigma.cross(NHat), nHat)

h3SO = -2*v**5*sympy.simplify((5*S_ell + 3*delta*Sigma_ell)*hComplex(lambdaHat, lambdaHat)
                              - 6*(2*S_ell + delta*Sigma_ell)*hComplex(nHat, nHat))

h3Sp = -2*v**5*sympy.simplify(2*hComplex(lambdaHat, nHat.cross(S + delta*Sigma))
                              + hComplex(nHat, lambdaHat.cross(9*S + 5*delta*Sigma)) )

h3Spv = -2*v**5*sympy.simplify(2*NHat.dot(lambdaHat)*hComplex((S + delta*Sigma).cross(NHat), nHat)
                               + NHat.dot(nHat)*hComplex((S + delta*Sigma).cross(NHat), lambdaHat) )

def IntegrateFunctionOnTheSphere(func):
    return integrate( integrate( sympy.expand(func*sin(vartheta)), (varphi, 0, 2*pi)), (vartheta, 0, pi))
def IntegrateFunctionAgainstsYlm(func, ell, m, s=-2):
    func = sympy.expand(func*sYlmConjugate(s,ell,m,vartheta,varphi)*sin(vartheta))
    return integrate( integrate( func, (varphi, 0, 2*pi)), (vartheta, 0, pi))

"""
Explanation: The following are the spin contributions to the waveform from Kidder '95 (and the first-order nonspinning contribution, for comparison).
End of explanation
"""


integrate(sin(vartheta)*cos(vartheta/2)**8, vartheta)

"""
Explanation: This isn't going to work; sympy just can't handle the simple trig integrals necessary.
End of explanation
"""


