def sort_wfs_components_current_station(wfs_component_labels_current_station,
    real_wfs_current_station, synth_wfs_current_station):
    """Function to sort current waveform components."""
    wfs_component_labels_current_station_sorted = list(
        wfs_component_labels_current_station)
    wfs_component_labels_current_station_sorted.sort()
    if wfs_component_labels_current_station_sorted == ['R', 'T', 'Z']:
        real_wfs_current_station_unsorted = list(real_wfs_current_station)
        synth_wfs_current_station_unsorted = list(synth_wfs_current_station)
        idx_tmp = wfs_component_labels_current_station.index('R')
        real_wfs_current_station[0] = real_wfs_current_station_unsorted[idx_tmp
            ]
        synth_wfs_current_station[0] = synth_wfs_current_station_unsorted[
            idx_tmp]
        idx_tmp = wfs_component_labels_current_station.index('T')
        real_wfs_current_station[1] = real_wfs_current_station_unsorted[idx_tmp
            ]
        synth_wfs_current_station[1] = synth_wfs_current_station_unsorted[
            idx_tmp]
        idx_tmp = wfs_component_labels_current_station.index('Z')
        real_wfs_current_station[2] = real_wfs_current_station_unsorted[idx_tmp
            ]
        synth_wfs_current_station[2] = synth_wfs_current_station_unsorted[
            idx_tmp]
        wfs_component_labels_current_station = (
            wfs_component_labels_current_station_sorted)
    elif wfs_component_labels_current_station_sorted == ['L', 'Q', 'T']:
        real_wfs_current_station_unsorted = list(real_wfs_current_station)
        synth_wfs_current_station_unsorted = list(synth_wfs_current_station)
        idx_tmp = wfs_component_labels_current_station.index('L')
        real_wfs_current_station[0] = real_wfs_current_station_unsorted[idx_tmp
            ]
        synth_wfs_current_station[0] = synth_wfs_current_station_unsorted[
            idx_tmp]
        idx_tmp = wfs_component_labels_current_station.index('Q')
        real_wfs_current_station[1] = real_wfs_current_station_unsorted[idx_tmp
            ]
        synth_wfs_current_station[1] = synth_wfs_current_station_unsorted[
            idx_tmp]
        idx_tmp = wfs_component_labels_current_station.index('T')
        real_wfs_current_station[2] = real_wfs_current_station_unsorted[idx_tmp
            ]
        synth_wfs_current_station[2] = synth_wfs_current_station_unsorted[
            idx_tmp]
        wfs_component_labels_current_station = (
            wfs_component_labels_current_station_sorted)
    elif wfs_component_labels_current_station_sorted == ['R-P', 'R-S',
        'T-P', 'T-S', 'Z-P', 'Z-S']:
        real_wfs_current_station_unsorted = list(real_wfs_current_station)
        synth_wfs_current_station_unsorted = list(synth_wfs_current_station)
        idx_tmp = wfs_component_labels_current_station.index('R-P')
        real_wfs_current_station[0] = real_wfs_current_station_unsorted[idx_tmp
            ]
        synth_wfs_current_station[0] = synth_wfs_current_station_unsorted[
            idx_tmp]
        idx_tmp = wfs_component_labels_current_station.index('R-S')
        real_wfs_current_station[1] = real_wfs_current_station_unsorted[idx_tmp
            ]
        synth_wfs_current_station[1] = synth_wfs_current_station_unsorted[
            idx_tmp]
        idx_tmp = wfs_component_labels_current_station.index('T-P')
        real_wfs_current_station[2] = real_wfs_current_station_unsorted[idx_tmp
            ]
        synth_wfs_current_station[2] = synth_wfs_current_station_unsorted[
            idx_tmp]
        idx_tmp = wfs_component_labels_current_station.index('T-S')
        real_wfs_current_station[3] = real_wfs_current_station_unsorted[idx_tmp
            ]
        synth_wfs_current_station[3] = synth_wfs_current_station_unsorted[
            idx_tmp]
        idx_tmp = wfs_component_labels_current_station.index('Z-P')
        real_wfs_current_station[4] = real_wfs_current_station_unsorted[idx_tmp
            ]
        synth_wfs_current_station[4] = synth_wfs_current_station_unsorted[
            idx_tmp]
        idx_tmp = wfs_component_labels_current_station.index('Z-S')
        real_wfs_current_station[5] = real_wfs_current_station_unsorted[idx_tmp
            ]
        synth_wfs_current_station[5] = synth_wfs_current_station_unsorted[
            idx_tmp]
        wfs_component_labels_current_station = (
            wfs_component_labels_current_station_sorted)
    elif wfs_component_labels_current_station_sorted == ['Z-P', 'R-P']:
        real_wfs_current_station_unsorted = list(real_wfs_current_station)
        synth_wfs_current_station_unsorted = list(synth_wfs_current_station)
        idx_tmp = wfs_component_labels_current_station.index('Z-P')
        real_wfs_current_station[0] = real_wfs_current_station_unsorted[idx_tmp
            ]
        synth_wfs_current_station[0] = synth_wfs_current_station_unsorted[
            idx_tmp]
        idx_tmp = wfs_component_labels_current_station.index('Z-S')
        real_wfs_current_station[1] = real_wfs_current_station_unsorted[idx_tmp
            ]
        synth_wfs_current_station[1] = synth_wfs_current_station_unsorted[
            idx_tmp]
        wfs_component_labels_current_station = (
            wfs_component_labels_current_station_sorted)
    return (wfs_component_labels_current_station_sorted,
        real_wfs_current_station, synth_wfs_current_station)
