def get_jwst_siaf_instrument(tree):
    """Return the instrument specified in the first aperture of a SIAF xml tree.

    Returns
    -------
    instrument : str
        All Caps instrument name, e.g. NIRSPEC

    """
    for entry in tree.getroot().iter('SiafEntry'):
        for node in entry.iterchildren():
            if node.tag == 'InstrName':
                return node.text