Changeset 1594 for trunk/python
- Timestamp:
- 07/06/09 11:12:38 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r1593 r1594 171 171 else: raise 172 172 try: 173 bsel = self.get_selection()174 173 sel = selector(scans=allscans) 175 self.set_selection(bsel+sel) 176 scopy = self._copy() 177 self.set_selection(bsel) 178 return scantable(scopy) 174 return self._select_copy(sel) 179 175 except RuntimeError: 180 176 if rcParams['verbose']: … … 182 178 else: 183 179 raise 180 181 def _select_copy(self, selection): 182 orig = self.get_selection() 183 self.set_selection(orig+selection) 184 cp = self.copy() 185 self.set_selection(orig) 186 return cp 184 187 185 188 def get_scan(self, scanid=None): … … 214 217 if type(scanid) is str: 215 218 sel.set_name(scanid) 216 self.set_selection(bsel+sel) 217 scopy = self._copy() 218 self.set_selection(bsel) 219 return scantable(scopy) 219 return self._select_copy(sel) 220 220 elif type(scanid) is int: 221 221 sel.set_scans([scanid]) 222 self.set_selection(bsel+sel) 223 scopy = self._copy() 224 self.set_selection(bsel) 225 return scantable(scopy) 222 return self._select_copy(sel) 226 223 elif type(scanid) is list: 227 224 sel.set_scans(scanid) 228 self.set_selection(sel) 229 scopy = self._copy() 230 self.set_selection(bsel) 231 return scantable(scopy) 225 return self._select_copy(sel) 232 226 else: 233 227 msg = "Illegal scanid type, use 'int' or 'list' if ints." … … 510 504 """ 511 505 Get a list of Positions on the sky (direction) for the observations. 512 Return a floatfor each integration in the scantable.506 Return a string for each integration in the scantable. 513 507 Parameters: 514 508 row: row no of integration. Default -1 return all rows
Note:
See TracChangeset
for help on using the changeset viewer.