annotate elements to axes
            
            :param ax: matplotlib axes object
            :param anotelist: element annotation object list
            :param showAccName: tag name for accelerator tubes? default is False, 
                show acceleration band type, e.g. 'S', 'C', 'X', or for '[S,C,X]D' for cavity
            :param efilter: element type filter, default is None, annotate all elements
                could be defined to be one type name or type name list/tuple, e.g.
                filter='QUAD' or filter=('QUAD', 'CSRCSBEN')
            :param textypos: y coordinator of annotated text string
            :param kwargs:
                alpha=0.8, arrowprops=dict(arrowstyle='->'), rotation=-60, fontsize='small'

            return list of annotation objects

def anoteElements(ax, anotelist, showAccName=False, efilter=None, textypos=None, **kwargs):
        """ annotate elements to axes
            
            :param ax: matplotlib axes object
            :param anotelist: element annotation object list
            :param showAccName: tag name for accelerator tubes? default is False, 
                show acceleration band type, e.g. 'S', 'C', 'X', or for '[S,C,X]D' for cavity
            :param efilter: element type filter, default is None, annotate all elements
                could be defined to be one type name or type name list/tuple, e.g.
                filter='QUAD' or filter=('QUAD', 'CSRCSBEN')
            :param textypos: y coordinator of annotated text string
            :param kwargs:
                alpha=0.8, arrowprops=dict(arrowstyle='->'), rotation=-60, fontsize='small'

            return list of annotation objects
        """
        defaultstyle = {'alpha': 0.8, 'arrowprops': dict(arrowstyle='->'),
                        'rotation': -60, 'fontsize': 'small'}
        defaultstyle.update(kwargs)
        anote_list = []
        if efilter is None:
            for anote in anotelist:
                if textypos is None:
                    textxypos = tuple(anote['textpos'])
                else:
                    textxypos = tuple((anote['textpos'][0], textypos))
                if not showAccName and anote['type'] in ('RFCW', 'RFDF'):
                    kwstyle = {k: v for k, v in defaultstyle.items()}
                    kwstyle.pop('arrowprops')
                    note_text = ax.text(anote['atext']['xypos'][0], anote['atext']['xypos'][1],
                                        anote['atext']['text'], **kwstyle)
                else:
                    note_text = ax.annotate(s=anote['name'], xy=anote['xypos'], xytext=textxypos, **defaultstyle)
                anote_list.append(note_text)
        else:
            if not isinstance(efilter, tuple):
                filter = tuple(efilter)
            for anote in anotelist:
                if anote['type'] in efilter:
                    if textypos is None:
                        textxypos = tuple(anote['textpos'])
                    else:
                        textxypos = tuple((anote['textpos'][0], textypos))
                    if not showAccName and anote['type'] in ('RFCW', 'RFDF'):
                        kwstyle = {k: v for k, v in defaultstyle.items()}
                        kwstyle.pop('arrowprops')
                        note_text = ax.text(anote['atext']['xypos'][0], anote['atext']['xypos'][1],
                                            anote['atext']['text'], **kwstyle)
                    else:
                        note_text = ax.annotate(s=anote['name'], xy=anote['xypos'], xytext=textxypos, **defaultstyle)
                    anote_list.append(note_text)
        return anote_list