Changeset 1757 for branches/alma/python/selector.py
- Timestamp:
- 06/09/10 19:03:06 (14 years ago)
- Location:
- branches/alma
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma
-
Property
svn:ignore
set to
.sconf_temp
.sconsign.dblite
-
Property
svn:mergeinfo
set to
/branches/asap-3.x merged eligible
-
Property
svn:ignore
set to
-
branches/alma/python/selector.py
r1693 r1757 7 7 scantables to specific rows. 8 8 """ 9 def __init(self): 10 _selector.__init__(self) 9 fields = ["pols", "ifs", "beams", "scans", "cycles", "name", "query"] 10 11 def __init__(self, *args, **kw): 12 if len(args) == 1: 13 if isinstance(args[0], self.__class__) \ 14 or isinstance(args[0], _selector): 15 _selector.__init__(self, args[0]) 16 else: 17 raise TypeError("Argument can only be a selector object") 18 else: 19 _selector.__init__(self) 20 for k,v in kw.items(): 21 if k in self.fields: 22 func = getattr(self, "set_%s" % k) 23 func(v) 11 24 12 25 def reset(self): … … 45 58 else: 46 59 raise TypeError('Unknown pol type. Please use [0,1...] or ["XX","YY"...]') 47 60 48 61 # for the americans 49 62 set_polarizations = set_polarisations … … 220 233 Merge two selections. 221 234 """ 235 if self.is_empty(): 236 return other 237 elif other.is_empty(): 238 return self 222 239 union = selector() 223 240 gets = [[self._getscans(), other._getscans(), union._setscans],
Note: See TracChangeset
for help on using the changeset viewer.