Changeset 2818 for trunk/python
- Timestamp:
- 07/02/13 10:38:18 (11 years ago)
- Location:
- trunk/python
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/__init__.py
r2649 r2818 59 59 60 60 __date__ = '$Date$'.split()[1] 61 __version__ = ' trunk'61 __version__ = '4.1.3a' 62 62 __revision__ = get_revision() 63 63 -
trunk/python/asapmath.py
r2754 r2818 90 90 else: 91 91 #s = scantable(stm._average(alignedlst, mask, weight.upper(), scanav)) 92 s = scantable(stm._new_average(alignedlst, compel, mask, weight.upper(), scanav)) 92 s = scantable(stm._new_average(alignedlst, compel, mask, 93 weight.upper(), scanav)) 93 94 s._add_history("average_time",varlist) 94 95 -
trunk/python/scantable.py
r2810 r2818 2112 2112 # 2113 2113 @asaplog_post_dec 2114 def average_time(self, mask=None, scanav=False, weight='tint', align=False): 2114 def average_time(self, mask=None, scanav=False, weight='tint', align=False, 2115 avmode="NONE"): 2115 2116 """\ 2116 2117 Return the (time) weighted average of a scan. Scans will be averaged … … 2140 2141 align: align the spectra in velocity before averaging. It takes 2141 2142 the time of the first spectrum as reference time. 2143 avmode: 'SOURCE' - also select by source name - or 2144 'NONE' (default). Not applicable for scanav=True or 2145 weight=median 2142 2146 2143 2147 Example:: … … 2150 2154 weight = weight or 'TINT' 2151 2155 mask = mask or () 2152 scanav = (scanav and 'SCAN') or 'NONE'2156 scanav = (scanav and 'SCAN') or avmode.upper() 2153 2157 scan = (self, ) 2154 2158 2155 2159 if align: 2156 2160 scan = (self.freq_align(insitu=False), ) 2161 asaplog.push("Note: Alignment is don on a source-by-source basis") 2162 asaplog.push("Note: Averaging (by default) is not") 2163 # we need to set it to SOURCE averaging here 2157 2164 s = None 2158 2165 if weight.upper() == 'MEDIAN': … … 4246 4253 self._add_history("set_sourcetype", varlist) 4247 4254 4255 4256 def set_sourcename(self, name): 4257 varlist = vars() 4258 self._setsourcename(name) 4259 self._add_history("set_sourcename", varlist) 4260 4248 4261 @asaplog_post_dec 4249 4262 @preserve_selection
Note:
See TracChangeset
for help on using the changeset viewer.