BlackHolePerturbationToolkit / SpinWeightedSpheroidalHarmonics

Tools for computing spin-weighted spheroidal harmonics and their associated eigenvalues
https://bhptoolkit.org/SpinWeightedSpheroidalHarmonics/
MIT License
12 stars 6 forks source link

Complex gamma #33

Open syp2001 opened 11 months ago

syp2001 commented 11 months ago

The spherical expansion method and Leaver's method give different results when gamma is complex.

In = SpinWeightedSpheroidalHarmonicS[-2, 2, 2, 1+1.5 I, Method->{"SphericalExpansion", NumTerms->50}][\[Pi]/2, 0]
Out = 0.0635056-0.0790533 I

In = SpinWeightedSpheroidalHarmonicS[-2, 2, 2, 1+1.5 I, Method->{"Leaver", NumTerms->50}][\[Pi]/2, 0]
Out = 0.0633973-0.0897504 I

This is partially caused by the fact that the computation of the norm in Leaver's method assumes gamma is real

https://github.com/BlackHolePerturbationToolkit/SpinWeightedSpheroidalHarmonics/blob/ced936f5fe4085b57f595ff23e028b63a790983d/Kernel/SpinWeightedSpheroidalHarmonics.m#L410C1-L431

This method can be adapted to work for complex gamma by replacing \[Gamma] with Re[\[Gamma]] and Sum[an[j]an[i-nmin-j] with Sum[Conjugate[an[j]]an[i-nmin-j]. This fixes the normalization, but there still seems to be a difference in phase.

spherical = SpinWeightedSpheroidalHarmonicS[-2, 2, 2, 1 + 1.5 I, Method -> {"SphericalExpansion", NumTerms -> 50}][\[Pi]/2, 0]
leaver = SpinWeightedSpheroidalHarmonicS[-2, 2, 2, 1 + 1.5 I, Method -> {"Leaver", NumTerms -> 50}][\[Pi]/2, 0]

In = Abs[spherical]
Out = 0.101402
In = Abs[leaver]
Out = 0.101402

In = Arg[spherical]
Out = -0.894031
In = Arg[leaver]
Out = -0.443627
barrywardell commented 11 months ago

I wonder if this is related to the branch cuts, as discussed in #5?