Changeset 1579 for trunk/python
- Timestamp:
- 06/29/09 13:52:18 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r1576 r1579 708 708 self._add_history("flag", varlist) 709 709 710 def lag_flag(self, frequency, width=0.0, unit="GHz", insitu=None):710 def lag_flag(self, start, end, unit="GHz", insitu=None): 711 711 """ 712 712 Flag the data in 'lag' space by providing a frequency to remove. … … 714 714 No taper is applied. 715 715 Parameters: 716 frequency: the frequency (really a period within the bandwidth)717 718 width: the width of the frequency to remove, to remove a719 range of frequencies around the centre.720 unit: the frequency unit (default "GHz")716 start: the start frequency (really a period within the 717 bandwidth) or period to remove 718 end: the end frequency or period to remove 719 unit: the frequency unit (default "GHz") or "" for 720 explicit lag channels 721 721 Notes: 722 It is recommended to flag edges of the band or strong 722 It is recommended to flag edges of the band or strong 723 723 signals beforehand. 724 724 """ … … 726 726 self._math._setinsitu(insitu) 727 727 varlist = vars() 728 base = { "GHz": 1000000000., "MHz": 1000000., "kHz": 1000., "Hz": 1. 729 if not base.has_key(unit):728 base = { "GHz": 1000000000., "MHz": 1000000., "kHz": 1000., "Hz": 1.} 729 if not (unit == "" or base.has_key(unit)): 730 730 raise ValueError("%s is not a valid unit." % unit) 731 731 try: 732 s = scantable(self._math._lag_flag(self, frequency*base[unit], 733 width*base[unit])) 732 if unit == "": 733 s = scantable(self._math._lag_flag(self, start, end, "lags")) 734 else: 735 s = scantable(self._math._lag_flag(self, start*base[unit], 736 end*base[unit], "frequency")) 734 737 except RuntimeError, msg: 735 738 if rcParams['verbose']:
Note:
See TracChangeset
for help on using the changeset viewer.