INNER CODE UNIT · Python

spherical_harmonic_Ylm

ssebastianmag/hydrogen-wavefunctions · hydrogen_wavefunction.py:79

def spherical_harmonic_Ylm(
        l: int,
        m: int,
        theta: np.ndarray,
        phi: np.ndarray
):
    """ Complex spherical harmonic Y_{l,m}(theta,phi); orthonormal on S².

        Parameters:
            l (int): Orbital angular-momentum quantum number (l ≥ 0).
            m (int): Magnetic quantum number (-l ≤ m ≤ l).
            theta (np.ndarray): Polar angle(s) in radians in the interval theta ∈ [0, π].
            phi (np.ndarray): Azimuthal angle(s) in radians in the interval phi ∈ [0, 2π).

        Returns:
            Y (np.ndarray): Complex-valued spherical harmonic with broadcasted shape of (theta, phi).
    """
    if not (l >= 0 and -l <= m <= l):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…