def get_channel_metadata(tag_Images, channel_ids):
    """ Get information from microscope xml file that is specific for each channel:
    about channel names, fluorophore names, binning, working wavelengths, acquisition mode, illumination type.

    Args:
        tag_Images:
            Part of xml file that contains tag Images.
        channel_ids:
            Dictionary of channel names and their number out of total number of channels.
            E.g. {'DAPI':0,'Alexa 488':2, 'Atto 425':4}

    Returns:
        Dictionary that have channel names as key and gathered metadata as string value.
    """

    channel_meta = dict()
    for k, v in channel_ids.items():
        ch = tag_Images[v]
        ch_name = ch.find('ChannelName').text
        binning = '"{0}x{1}"'.format(ch.find('BinningX').text, ch.find('BinningY').text)
        acquisition_mode = ch.find('AcquisitionType').text

        if acquisition_mode == 'NipkowConfocal':
            acquisition_mode = 'SpinningDiskConfocal'

        value = ('<Channel Name="' + ch_name + '" ' +
                 'Fluor="' + ch_name + '" ' +
                 'AcquisitionMode="' + acquisition_mode + '" ' +
                 'IlluminationType="' + ch.find('IlluminationType').text + '" ' +
                 'ContrastMethod="' + ch.find('ChannelType').text + '" ' +
                 'ExcitationWavelength="' + ch.find('MainExcitationWavelength').text + '" ' +
                 'EmissionWavelength="' + ch.find('MainEmissionWavelength').text + '" ' +
                 'SamplesPerPixel="1">' +
                 '<DetectorSettings Binning=' + binning + ' ID="Detector:0:0" />')

        new_ch = {ch_name: value}
        channel_meta.update(new_ch)

    return channel_meta