SphericalHarmonicExpansions.jl
SphericalHarmonicExpansions.jl copied to clipboard
Refactoring package
Hi Martin,
I have worked with a previous version of your package and extended it a bit (different norms possible, arbitrary datatypes) during my PhD thesis. It's now in a separate repository: CartesianSphericalHarmonics.jl, as I had no need for the expansion and evaluation of the polynomials. It's not documented nor tested properly. I'd be happy to make this eventually merge with your package or to make the two packages built on each other, any thoughts on this?
Cheers, Felix
Hi Felix,
it does make sense to include your extensions into our package. Maybe with two small modifications 😉
- I think it makes sense to check for integer overflow. Maybe using https://github.com/JeffreySarnoff/SaferIntegers.jl
- Maybe change the signature, such that you can call
ylmcoeff(Schmidt{Int64},1,1)
instead ofylmcoeff(Schmidt{Int64}(),1,1)
.
Thank you for your contribution, Martin
I agree with the integer overflow check! For point 2): Can you point me to an implementation in a commonly used Julia code that does this? I'm not aware of this and if it is good/common practice.
A good example is the convert
function in julia base.
julia> x = 1/3
0.3333333333333333
julia> convert(Float32, x)
0.33333334f0