lineshape_tools.lineshape ========================= .. py:module:: lineshape_tools.lineshape .. autoapi-nested-parse:: Implements functionality to evaluate optical lineshapes. Functions --------- .. autoapisummary:: lineshape_tools.lineshape.get_Stot lineshape_tools.lineshape.gaussian lineshape_tools.lineshape.lorentzian lineshape_tools.lineshape.get_phonon_spec_func lineshape_tools.lineshape.convert_A_to_L Module Contents --------------- .. py:function:: get_Stot(dq: numpy.ndarray, omega: numpy.ndarray) -> float Calculate the Huang-Rhys factor Stot. :param dq: mass-weighted displacement vector in normal mode basis in (amu^{1/2} Ang). :type dq: np.ndarray :param omega: normal mode phonon frequencies (in eV/amu/Ang^2). :type omega: np.ndarray .. py:function:: gaussian(x: numpy.ndarray, s: float) -> numpy.ndarray Evaluate the Gaussian function with smearing s. .. py:function:: lorentzian(x: numpy.ndarray, g: float) -> numpy.ndarray Evaluate the Lorentzian function with broadening g. .. py:function:: get_phonon_spec_func(dq: numpy.ndarray, omega: numpy.ndarray, broadening: Broadening | None = None, resolution: float = 0.001, w_max: float | None = None, pad: float = 0.1, T: float = 0.0, **kwargs) -> tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray] Compute the phonon spectral function and related quantities. If broadening is not provided, kwargs will be passed to Broadening.create (see :func:`Broadening.create`). When T == 0. (the default), an optimized evaluation of the spectral function is utilized. :param dq: mass-weighted displacement vector in normal mode basis in (amu^{1/2} Ang). :type dq: np.ndarray :param omega: normal mode phonon frequencies (in eV/amu/Ang^2). :type omega: np.ndarray :param broadening: instance of :class:`Broadening`. :type broadening: Broadening :param resolution: desired energy resolution (in eV) of the calculated spectral functions. :type resolution: float :param w_max: maximum frequency in grid. :type w_max: np.ndarray :param pad: energy (in eV) below ZPL to pad the spectral function. :type pad: float :param T: Temperature in kelvin. :type T: float :param \*\*kwargs: keyword arguments passed to :func:`Broadening.create` when broadening is not provided as input. :returns: frequencies at which the functions were evaluated at (ħω) dos (np.ndarray): phonon density of states ρ(ħω) S_w (np.ndarray): Huang-Rhys spectral density S(ħω) A_w (np.ndarray): spectral function A(ħω) :rtype: w (np.ndarray) .. py:function:: convert_A_to_L(w: numpy.ndarray, A: numpy.ndarray, dE: float, emission: bool = True, norm: str = 'area') -> tuple[numpy.ndarray, numpy.ndarray] Convert phonon spectral function into a (normalized) optical intensity. :param w: frequencies (in eV) where A is evaluated. :type w: np.ndarray :param A: spectral function. :type A: np.ndarray :param dE: energy of the zero-phonon line. :type dE: float :param emission: determines if the intensity corresponds to emission or absorption. :type emission: bool :param norm: normalization of luminescence (area or max). :type norm: str :returns: expanded range of frequencies where intensity is evaluated. L (np.ndarray): optical intensity L(ħω) on expanded frequencies new_w. :rtype: new_w (np.ndarray)