@staticmethod
def _get_chan_labels(ibw_wave, codec='utf-8'):
    """
        Retrieves the names of the data channels and default units

        Parameters
        ----------
        ibw_wave : dictionary
            Wave entry in the dictionary obtained from loading the ibw file
        codec : str, optional
            Codec to be used to decode the bytestrings into Python strings if needed.
            Default 'utf-8'

        Returns
        -------
        labels : list of strings
            List of the names of the data channels
        default_units : list of strings
            List of units for the measurement in each channel
        """
    temp = ibw_wave.get('labels')
    labels = []
    for item in temp:
        if len(item) > 0:
            labels += item
    for item in labels:
        if item == '':
            labels.remove(item)
    default_units = list()
    for chan_ind, chan in enumerate(labels):
        if type(chan) == bytes:
            chan = chan.decode(codec)
        if chan.lower().rfind('trace') > 0:
            labels[chan_ind] = chan[:chan.lower().rfind('trace') + 5]
        else:
            labels[chan_ind] = chan
        if chan.startswith('Phase'):
            default_units.append('deg')
        elif chan.startswith('Current'):
            default_units.append('A')
        else:
            default_units.append('m')
    return labels, default_units
