def wlabel_from_units(units):
    """
    Return latex string for phonon frequencies in ``units``.
    """
    d = {'ev': 'Energy (eV)', 'mev': 'Energy (meV)', 'ha': 'Energy (Ha)',
        'cm-1': 'Frequency (cm$^{-1}$)', 'cm^-1': 'Frequency (cm$^{-1}$)',
        'thz': 'Frequency (Thz)'}
    try:
        return d[units.lower().strip()]
    except KeyError:
        raise KeyError(
            'Value for units `{}` unknown\nPossible values are:\n {}'.
            format(units, list(d.keys())))
