Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/SHTns.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ for (type, enumtype) in [(:Orthonormal, :sht_orthonormal), (:FourPi, :sht_fourpi
"""
Base.@kwdef struct $(type)<:SHTnsNorm
cs_phase::Bool=true
real_norm::Bool=false
end

function Base.convert(::Type{shtns_norm}, x::$(type))
norm = $(enumtype)
!x.cs_phase && (norm += SHT_NO_CS_PHASE)
x.real_norm && (norm += SHT_REAL_NORM)
return norm
end
end
Expand Down
Loading