# -*- coding: utf-8 -*- """ date of creation: Fri Mar 10 03:20:46 2022 ------------------------------------------------- @author : Manuel Cattaneo @contact: cattaneo.manuel@hotmail.com ------------------------------------------------- Description: Programma per capire come cazzo funziona sta SHExpandDHC(.) di merda. Modules: """ from scipy.special import sph_harm from pyshtools.expand import SHExpandDHC, SHExpandDH import numpy as np """ ------------------------------------------------------------------------------ """ _theta = np.linspace(0, np.pi , 1001)[1:] # theta in ]0, pi] _phi = np.linspace(0, 2*np.pi, 1001)[:-1] # phi in [0, 2pi[ theta, phi = np.meshgrid(_theta, _phi) # n >! m m = 2 n = 4 y = sph_harm(m, n, theta=phi, phi=theta) # angles inverted due to convention cilm = np.abs(SHExpandDHC(y))