Changeset 1338 for trunk/python
- Timestamp:
- 04/20/07 10:49:11 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r1322 r1338 1438 1438 return s 1439 1439 1440 def auto_quotient(self, mode=' time', preserve=True):1440 def auto_quotient(self, mode='paired', preserve=True): 1441 1441 """ 1442 1442 This function allows to build quotients automatically. … … 1445 1445 It will support "closest off in time" in the future 1446 1446 Parameters: 1447 mode: the on/off detection mode; 'suffix' (default) 1448 'suffix' identifies 'off' scans by the 1449 trailing '_R' (Mopra/Parkes) or 1450 '_e'/'_w' (Tid) 1447 mode: the on/off detection mode 1448 'paired' (default) 1449 identifies 'off' scans by the 1450 trailing '_R' (Mopra/Parkes) or 1451 '_e'/'_w' (Tid) and matches 1452 on/off pairs from the observing pattern 1453 'time' 1454 finds the closest off in time 1451 1455 preserve: you can preserve (default) the continuum or 1452 1456 remove it. The equations used are … … 1454 1458 remove: Output = Toff * (on/off) - Ton 1455 1459 """ 1456 modes = ["time" ]1460 modes = ["time", "suffix"] 1457 1461 if not mode in modes: 1458 1462 msg = "please provide valid mode. Valid modes are %s" % (modes) 1459 1463 raise ValueError(msg) 1460 1464 varlist = vars() 1461 s = scantable(self._math._auto_quotient(self, mode, preserve)) 1465 s = None 1466 if mode.lower() == "suffix": 1467 basesel = self.get_selection() 1468 sel = selector() 1469 self.set_selection(basesel+sel) 1470 offs = self.copy() 1471 sel.set_query("SRCTYPE==0") 1472 self.set_selection(basesel+sel) 1473 ons = self.copy() 1474 s = scantable(self._math._quotient(ons, offs, preserve)) 1475 self.set_selection(basesel) 1476 elif mode.lower() == "time": 1477 s = scantable(self._math._auto_quotient(self, mode, preserve)) 1462 1478 s._add_history("auto_quotient", varlist) 1463 1479 print_log()
Note:
See TracChangeset
for help on using the changeset viewer.