Changeset 1576 for trunk/python/scantable.py
- Timestamp:
- 06/29/09 13:40:55 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r1574 r1576 312 312 return selector(self._getselection()) 313 313 314 def set_selection(self, selection= selector()):314 def set_selection(self, selection=None, **kw): 315 315 """ 316 316 Select a subset of the data. All following operations on this scantable … … 325 325 scan.set_selection() # unset the selection 326 326 """ 327 if selection is None: 328 # reset 329 if len(kw) == 0: 330 selection = selector() 331 else: 332 # try keywords 333 for k in kw: 334 if k not in selector.fields: 335 raise KeyError("Invalid selection key '%s', valid keys are %s" % (k, selector.fields)) 336 selection = selector(**kw) 327 337 self._setselection(selection) 328 338
Note: See TracChangeset
for help on using the changeset viewer.