|
1 | 1 | export sbesselj, shankelh1, diffsbessel, diffbessel |
2 | 2 | export diffbesselj, diffhankelh1, diffsbesselj, diffshankelh1, diff3sbesselj, diff2sbesselj, diff2shankelh1, diff3shankelh1 |
3 | | -export gaunt_coefficient |
| 3 | +export gaunt_coefficient, gaunt_cross_coefficient |
4 | 4 | export associated_legendre_indices, spherical_harmonics_indices, lm_to_spherical_harmonic_index |
5 | 5 |
|
6 | 6 | export complex_legendre_array |
@@ -197,6 +197,18 @@ function gaunt_coefficient(T::Type{<:AbstractFloat},l1::Int,m1::Int,l2::Int,m2:: |
197 | 197 | end |
198 | 198 | gaunt_coefficient(l1::Int,m1::Int,l2::Int,m2::Int,l3::Int,m3::Int) = gaunt_coefficient(Float64,l1,m1,l2,m2,l3,m3) |
199 | 199 |
|
| 200 | +""" |
| 201 | + gaunt_cross_coefficient(l1,m1,l2,m2,l3,m3) |
| 202 | +
|
| 203 | + Similar to the Gaunt coefficient, but use for vector spherical harmonics, and specifically how one shear wave coverts to the other. |
| 204 | +""" |
| 205 | +function gaunt_cross_coefficient(T::Type{<:AbstractFloat},l1::Int,m1::Int,l2::Int,m2::Int,l3::Int,m3::Int) |
| 206 | + # note the wigner3j has only one convention, and is highly symmetric. |
| 207 | + return (one(T)*im)^(l2+l3-l1) * (-T(1))^m1 * sqrt(4pi*(2*l1+1)*(2*l2+1)*(2*l3+1)) * |
| 208 | + wigner3j(T,l1,l2,l3,1,-1,0) * wigner3j(T,l1,l2,l3,m1,-m2,-m3) |
| 209 | +end |
| 210 | +gaunt_cross_coefficient(l1::Int,m1::Int,l2::Int,m2::Int,l3::Int,m3::Int) = gaunt_cross_coefficient(Float64,l1,m1,l2,m2,l3,m3) |
| 211 | + |
200 | 212 | function lm_to_spherical_harmonic_index(l::Int,m::Int)::Int |
201 | 213 | if l < abs(m) |
202 | 214 | error("The order m of a spherical harmonic must be great or equal than the degree l.") |
|
0 commit comments