spherical.multiplication

multiply

multiply(f, ellmin_f, ellmax_f, s_f, g, ellmin_g, ellmax_g, s_g)

Source: spherical/multiplication.py

Return modes of the decomposition of fg We can multiply SWSHs as s1Yl1m1 * s2Yl2m2 = sum([ s3Yl3m3.conjugate() * (-1)(l1+l2+l3) * sqrt((2l1+1)(2l2+1)(2l3+1)/(4pi)) * Wigner3j(l1, l2, l3, s1, s2, s3) * Wigner3j(l1, l2, l3, m1, m2, m3) for l3 in range(abs(l1-l2), l1+l2+1) ]) Here, s3 = -s1 - s2 and m3 = -m1 - m2. For general f and g, we have f * g = ( sum([f(l1, m1) * s1Yl1m1 for l1,m1 in lmrange(ellmin_f, ellmax_f)]) * sum([g(l2, m2) * s2Yl2m2 for l2,m2 in lmrange(ellmin_g, ellmax_g)]) ) = sum([f(l1, m1) * g(l2, m2) * s1Yl1m1 * s2Yl2m2 for l2,m2 in lmrange(ellmin_g, ellmax_g) for l1,m1 in lmrange(ellmin_f, ellmax_f)]) = sum([ f(l1, m1) * g(l2, m2) * s3Yl3m3.conjugate() * (-1)(l1+l2+l3) * sqrt((2l1+1)(2l2+1)(2l3+1)/(4pi)) * Wigner3j(l1, l2, l3, s1, s2, s3) * Wigner3j(l1, l2, l3, m1, m2, m3) for l2,m2 in lmrange(ellmin_g, ellmax_g) for l1,m1 in lmrange(ellmin_f, ellmax_f) for l3 in range(abs(l1-l2), l1+l2+1) ]) = sum([f(lf, mf) * g(lg, mg) * sfgYlfgmfg * (-1)(lf+lg+lfg+sfg+mfg) * sqrt((2lf+1)(2lg+1)(2lfg+1)/(4pi)) * Wigner3j(lf, lg, lfg, sf, sg, -sfg) * Wigner3j(lf, lg, lfg, mf, mg, -mfg) for lg,mg in lmrange(ellmin_g, ellmax_g) for lf,mf in lmrange(ellmin_f, ellmax_f) for lfg in range(abs(lf-lg), lf+lg+1) for mfg in [mf + mg] ]) Thus, the mode decomposition of the product fg = f * g is fg(l, m) = sum([f(lf, mf) * g(lg, mg) * (-1)(lf+lg+l+sf+sg+mf+mg) * sqrt((2lf+1)(2lg+1)(2lfg+1)/(4*pi)) * Wigner3j(lf, lg, l, sf, sg, -sf-sg) * Wigner3j(lf, lg, l, mf, mg, -mf-mg) for lg,mg in lmrange(ellmin_g, ellmax_g) for lf,mf in lmrange(ellmin_f, ellmax_f) ])

Parameters

  • f: complex array

    This gives the mode weights of the function f expanded in spin-weighted spherical harmonics. They must be stored in the standard order: [f(ell, m) for ell in range(ellmin_f, ellmax_f+1) for m in range(-ell, ell+1)] In particular, it is permissible to have ellmin < |s|, even though any coefficients for such values should be zero; they will just be ignored.

  • ellmin_f: int

    See f

  • ellmax_f: int

    See f

  • s_f: int

    Spin weight of f function

  • g: complex array

    As above, but for the second function

  • ellmin_g: int

    As above, but for the second function

  • ellmax_g: int

    As above, but for the second function

  • s_g: int

    As above, but for the second function

Returns

  • fg: complex array

  • ellmin_fg: int

  • ellmax_fg: int

  • s_fg: int

    These outputs are analogous to the inputs, except for f*g. The spin weight is necessarily s_fg = s_f + s_g and the max ell value is necessarily ellmax_fg = ellmax_f + ellmax_g For simplicity, we always return ellmin_fg=0, even though this may not be necessary.