def get_channels_from_values(values, header):
    """Create a dict ('channels') with channel-sorted values.

       channels = dict(channel1_name: [channel1_val1, channel1_val2, ...],
                       channel2_name: [channel2_val1, channel2_val2, ...],
                       ...)
       (channels["Time"] is a special entry with timestamps)
    """

    channels = dict()

    for index, channel in enumerate(header):
        data = [item[index] for item in values]
        channels[channel] = data

    return channels