Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalization? #2

Open
dlfivefifty opened this issue Mar 16, 2020 · 18 comments
Open

Normalization? #2

dlfivefifty opened this issue Mar 16, 2020 · 18 comments

Comments

@dlfivefifty
Copy link
Member

@jagot suggested Condon–Shortley:

If you choose Condon–Shortley (which is commonly used by physicists), you could employ https://github.com/Jutho/WignerSymbols.jl for exact angular integrals. This is what I use in https://juliaatoms.github.io/AngularMomentumAlgebra.jl/dev/.

@MikaelSlevinsky Any preference?

@MikaelSlevinsky
Copy link
Member

MikaelSlevinsky commented Mar 16, 2020

I wouldn't touch spherical harmonics without (near) L2 orthonormalization. Near being something like what they do in geodesy or magnetics https://en.wikipedia.org/wiki/Spherical_harmonics#Conventions.

Near orthonormalizations and phase conventions could be implemented as an afterthought. See also https://nschaeff.bitbucket.io/shtns/spec.html

@dlfivefifty
Copy link
Member Author

The actual normalisation can be a user choice:

SphericalHarmonic() * Diagonal(...)

We can make the default orthonormal

@MikaelSlevinsky
Copy link
Member

Quickly looking at https://juliaatoms.github.io/AngularMomentumAlgebra.jl/dev/definitions/#Spherical-harmonics-1, I think we largely agree: theta is co-latitude, L^2 orthonormalization.

@jagot
Copy link
Member

jagot commented Mar 16, 2020

I think a general library like SphericalHarmonics.jl should probably cater to different normalizations and phase relations. For me, it was very important that AngularMomentumAlgebra.jl is consistent in every possible choice of convention, since you otherwise can't trust relations. I therefore selected Varshalovich (1988) as the single source of truth. In quantum mechanics, Condon–Shortley is often used, because it gives real Clebsch–Gordan coefficients, as does the Fano–Racah convention (less often used, I think). Landau & Lifshitz instead uses complex CG coefficients, I forgot what they gain from that – maybe some formulas are simplified.

@dlfivefifty
Copy link
Member Author

I can rename it SphericalHarmonicsQuasi.jl, I have no interest or time in making something encyclopedic

@jagot
Copy link
Member

jagot commented Mar 17, 2020

For sure, I would not suggest everything should fit in here, but it seemed both you and Mike agreed that various orthonormalizations were easy to bolt on, later.

I thought we both agreed we'd like to do away with the *Quasi.jl suffix 😛

@dlfivefifty
Copy link
Member Author

Yes I just mean I'm not trying to be too ambitious right now. I'm just going to implement some basic functionality, e.g., solving Poisson .

I'm inclined to use the DLMF convention:

https://dlmf.nist.gov/14.30

Not sure what that corresponds to...

@jagot
Copy link
Member

jagot commented Mar 17, 2020

As long as the associate Legendre polynomial P includes (-1)^m, the so-called Condon--Shortley phase, it's the same as I am using.

@dlfivefifty
Copy link
Member Author

Will follow Wikipedia as the default, added tests compared to https://en.wikipedia.org/wiki/Table_of_spherical_harmonics

Any feelings whether they should be defined only on the sphere or all of R^3? Off the sphere they would be the harmonic polynomials

r^m * Y_l^m(θ,φ)

@jagot
Copy link
Member

jagot commented Mar 18, 2020

The spherical harmonics are, as far I'm concerned, only defined on the sphere. The radial dimension is taken care of by other means, e.g. Laguerre polynomials for bound states of hydrogen or finite-difference/-elements in numerical codes.

@dlfivefifty
Copy link
Member Author

It is often natural to incorporate the r^m in the spherical harmonic part: that is, if you have something like r^m * exp(-r) * L^(m)(r^2)* Y_l^m(θ,φ) this is replaced by exp(-r) * L^(m)(r^2) * Y_l^m(x,y,z).

Both can (and will) be supported so it really is just an implementation detail. That is, if we make them by default defined on R^3 one can still use spherical coordinates but also euclidean:

S = SphericalHarmonic()
S[SphericalCoordinate(θ,φ), Block(l)[m]]
S[SVector(0.1,0.2,0.3),Block(l)[m]]

If you wish the latter to give a bounds error you can do

S = SphericalHarmonic()[UnitSphere(),:]

But I'll mull it over a bit more...

@MikaelSlevinsky
Copy link
Member

I think the (regular) solid spherical harmonics are r^l * Y_l^m(θ,φ). I think they'd be great to have around. Also, there are irregular harmonics r^{-l+1} * Y_l^m(θ,φ) that are square integrable in the exterior of the unit solid sphere (ball). These would be the analogues of Hardy{true/false} in ApproxFun.

@MikaelSlevinsky
Copy link
Member

Transforms/plotting are fast on concentric spherical shells

@dlfivefifty
Copy link
Member Author

Would BallHarmonic be an appropriate name?

@MikaelSlevinsky
Copy link
Member

Yeah that or SolidSphericalHarmonics{true/false}(). I'll live with the de facto name

@dlfivefifty
Copy link
Member Author

we would need to change the name of the package for the type to be called SphericalHarmonics. I'm not opposed to that.

@MikaelSlevinsky
Copy link
Member

Sorry, I guess the quasi-space doesn't have to be pluralized? Since we don't have, e.g. LegendrePolynomials.

@dlfivefifty
Copy link
Member Author

dlfivefifty commented Mar 18, 2020

Some more thought needs to be done here. Actually, it's the same issues with Taylor series (2D Spherical harmonics). Is the canonical axes(Taylor(),1) (i.e., the domain of definition) equal to

  1. UnitCircle{ComplexF64}()
  2. UnitDisk{ComplexF64}()
  3. C (that is, EuclideanSpace(Complex64))

Each has valid a valid usage...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants