- Timestamp:
- 06/29/09 15:45:19 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapplotter.py
r1572 r1582 697 697 if isinstance(nstack0, int): nstack = nstack0 698 698 else: nstack = len(nstack0) 699 maxpanel, maxstack = 16, 8699 maxpanel, maxstack = 16,16 700 700 if n > maxpanel or nstack > maxstack: 701 701 from asap import asaplog … … 816 816 817 817 818 def set_selection(self, selection=None, refresh=True): 819 self._selection = isinstance(selection,selector) and selection or selector() 818 def set_selection(self, selection=None, refresh=True, **kw): 819 if selection is None: 820 # reset 821 if len(kw) == 0: 822 self._selection = selector() 823 else: 824 # try keywords 825 for k in kw: 826 if k not in selector.fields: 827 raise KeyError("Invalid selection key '%s', valid keys are %s" % (k, selector.fields)) 828 self._selection = selector(**kw) 829 elif isinstance(selection, selector): 830 self._selection = selection 831 else: 832 raise TypeError("'selection' is not of type selector") 833 820 834 d0 = {'s': 'SCANNO', 'b': 'BEAMNO', 'i':'IFNO', 821 835 'p': 'POLNO', 'c': 'CYCLENO', 't' : 'TIME' }
Note:
See TracChangeset
for help on using the changeset viewer.