From 70a03c62a8e151f869c7f3d9aaa6c747e17f66c9 Mon Sep 17 00:00:00 2001 From: Nathanael Schaeffer Date: Tue, 17 Jun 2025 10:46:02 +0200 Subject: [PATCH] allow to use SHT_REAL_NORM normalization --- src/SHTns.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SHTns.jl b/src/SHTns.jl index e562ecd..ec138af 100644 --- a/src/SHTns.jl +++ b/src/SHTns.jl @@ -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