- Timestamp:
- 02/12/09 19:58:01 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r1483 r1502 1515 1515 return s 1516 1516 1517 def set_sourcetype(self, match, sourcetype="reference"): 1518 """ 1519 Set the type of the source to be an source or reference scan 1520 using the provided pattern: 1521 Parameters: 1522 match: a Unix style pattern or asap selector 1523 sourcetype: the type of the source to use (source/reference) 1524 """ 1525 varlist = vars() 1526 basesel = self.get_selection() 1527 stype = -1 1528 if sourcetype.lower().startswith("r"): 1529 stype = 1 1530 elif sourcetype.lower().startswith("s"): 1531 stype = 0 1532 if stype == -1: 1533 raise ValueError("Illegal sourcetype use s(ource) or r(eference)") 1534 sel = selector() 1535 if isinstance(match, selector): 1536 sel = match 1537 else: 1538 sel.set_query("SRCNAME == pattern('%s')" % match) 1539 self.set_selection(basesel+sel) 1540 self._setsourcetype(stype) 1541 self.set_selection(basesel) 1542 s._add_history("set_sourcetype", varlist) 1543 1517 1544 def auto_quotient(self, preserve=True, mode='paired'): 1518 1545 """ … … 1531 1558 '_e'/'_w' (Tid) and matches 1532 1559 on/off pairs from the observing pattern 1533 'time'1534 finds the closest off in time1560 'time' 1561 finds the closest off in time 1535 1562 1536 1563 """ … … 1809 1836 r._open(name, -1, -1) 1810 1837 r._read() 1811 #tbl = r._getdata()1812 1838 if average: 1813 1839 tbl = self._math._average((tbl, ), (), 'NONE', 'SCAN') 1814 #tbl = tbl21815 1840 if not first: 1816 1841 tbl = self._math._merge([self, tbl]) 1817 #tbl = tbl21818 1842 Scantable.__init__(self, tbl) 1819 1843 r._close()
Note:
See TracChangeset
for help on using the changeset viewer.