INNER CODE UNIT · Python

compute_P_and_extent

ssebastianmag/hydrogen-wavefunctions · interactive_plot/interactive_plot_util.py:27

def compute_P_and_extent(wf: WaveFunction):
    """
        Compute the probability density |ψ|² for a given hydrogenic WaveFunction
        and return both the computed density grid and the spatial extent in units
        of the reduced-mass Bohr radius a_μ.

        Parameters
        ----------
        wf : WaveFunction
            WaveFunction instance containing the quantum numbers (n, l, m),
            nuclear charge Z, reduced-mass options, grid resolution and extent.

        Returns
        -------
        P : np.ndarray
            2D array of the probability density |ψ|² evaluated on the x–z slice.
        extent : tuple of float
            (x_min, x_max, z_min, z_max) in units of a_μ.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…