overreact/thermo/_gas.py
def _vibrational_temperature(vibfreqs=None):
    r"""Calculate vibrational temperatures.

    This function returns vibrational temperatures associated with all positive
    frequency magnitudes. This function ignores negative frequencies.

    Parameters
    ----------
    vibfreqs : array-like
        Frequency magnitudes in cm-1.

    Returns
    -------
    array-like

    Examples
    --------
    >>> vibfreq = 3374 * constants.k * constants.centi \
    ...     / (constants.h * constants.c)  # nitrogen molecule
    >>> _vibrational_temperature()
    array([], dtype=float64)
    >>> _vibrational_temperature(vibfreq)
    array([3374.])
    >>> _vibrational_temperature([vibfreq])
    array([3374.])
    >>> _vibrational_temperature([vibfreq, vibfreq])
    array([3374., 3374.])

    This function uses `_check_vibfreqs` and as such employs its default
    cutoff for imaginary frequencies. This means that positive values are used
    as expected, but small non-positive values are inverted (sign flipped):

    >>> _vibrational_temperature([-60.0, vibfreq])
    array([3374.])
    >>> _vibrational_temperature([-60.0, -60.0, vibfreq])
    array([3374.])
    >>> _vibrational_temperature([-60.0, vibfreq, vibfreq])
    array([3374., 3374.])
    >>> _vibrational_temperature([vibfreq, vibfreq, vibfreq])
    array([3374., 3374., 3374.])
    """
    nu = _check_vibfreqs(vibfreqs) * constants.c / constants.centi

    vibrational_temperatures = constants.h * nu / constants.k
    logger.debug(f"vibrational temperatures = {vibrational_temperatures} K")
    return vibrational_temperatures
r"""Calculate vibrational temperatures.

    This function returns vibrational temperatures associated with all positive
    frequency magnitudes. This function ignores negative frequencies.

    Parameters
    ----------
    vibfreqs : array-like
        Frequency magnitudes in cm-1.

    Returns
    -------
    array-like

    Examples
    --------
    >>> vibfreq = 3374 * constants.k * constants.centi \
    ...     / (constants.h * constants.c)  # nitrogen molecule
    >>> _vibrational_temperature()
    array([], dtype=float64)
    >>> _vibrational_temperature(vibfreq)
    array([3374.])
    >>> _vibrational_temperature([vibfreq])
    array([3374.])
    >>> _vibrational_temperature([vibfreq, vibfreq])
    array([3374., 3374.])

    This function uses `_check_vibfreqs` and as such employs its default
    cutoff for imaginary frequencies. This means that positive values are used
    as expected, but small non-positive values are inverted (sign flipped):

    >>> _vibrational_temperature([-60.0, vibfreq])
    array([3374.])
    >>> _vibrational_temperature([-60.0, -60.0, vibfreq])
    array([3374.])
    >>> _vibrational_temperature([-60.0, vibfreq, vibfreq])
    array([3374., 3374.])
    >>> _vibrational_temperature([vibfreq, vibfreq, vibfreq])
    array([3374., 3374., 3374.])
    
r"""Calculate vibrational temperatures.
This function returns vibrational temperatures associated with all positive
frequency magnitudes. This function ignores negative frequencies.

Parameters

vibfreqs : array-like
Frequency magnitudes in cm-1.

Returns

array-like

Examples



This function uses `_check_vibfreqs` and as such employs its default
cutoff for imaginary frequencies. This means that positive values are used
as expected, but small non-positive values are inverted (sign flipped).


r " " " Calculate vibrational temperatures . This function returns vibrational temperatures associated with all positive frequency magnitudes . This function ignores negative frequencies . Parameters vibfreqs : array - like Frequency magnitudes in cm - 1 . Returns array - like Examples This function uses ` _check_vibfreqs ` and as such employs its default cutoff for imaginary frequencies . This means that positive values are used as expected but small non - positive values are inverted ( sign flipped ) .
def _vibrational_temperature(vibfreqs=None):
    nu = _check_vibfreqs(vibfreqs) * constants.c / constants.centi
    vibrational_temperatures = constants.h * nu / constants.k
    logger.debug(f"vibrational temperatures = {vibrational_temperatures} K")
    return vibrational_temperatures
def _vibrational_temperature ( vibfreqs = None ) : nu = _check_vibfreqs ( vibfreqs ) * constants . c / constants . centi vibrational_temperatures = constants . h * nu / constants . k logger . debug ( f"vibrational temperatures = {vibrational_temperatures} K" ) return vibrational_temperatures
r"""Calculate vibrational temperatures.
r " " " Calculate vibrational temperatures .
r"""Calculate vibrational temperatures.

    This function returns vibrational temperatures associated with all positive
    frequency magnitudes. This function ignores negative frequencies.

    Parameters
    ----------
    vibfreqs : array-like
        Frequency magnitudes in cm-1.

    Returns
    -------
    array-like

    Examples
    --------
    >>> vibfreq = 3374 * constants.k * constants.centi \
    ...     / (constants.h * constants.c)  # nitrogen molecule
    >>> _vibrational_temperature()
    array([], dtype=float64)
    >>> _vibrational_temperature(vibfreq)
    array([3374.])
    >>> _vibrational_temperature([vibfreq])
    array([3374.])
    >>> _vibrational_temperature([vibfreq, vibfreq])
    array([3374., 3374.])

    This function uses `_check_vibfreqs` and as such employs its default
    cutoff for imaginary frequencies. This means that positive values are used
    as expected, but small non-positive values are inverted (sign flipped):

    >>> _vibrational_temperature([-60.0, vibfreq])
    array([3374.])
    >>> _vibrational_temperature([-60.0, -60.0, vibfreq])
    array([3374.])
    >>> _vibrational_temperature([-60.0, vibfreq, vibfreq])
    array([3374., 3374.])
    >>> _vibrational_temperature([vibfreq, vibfreq, vibfreq])
    array([3374., 3374., 3374.])
    """
vibfreqs