Changeset 1574 for trunk/python
- Timestamp:
- 06/29/09 12:19:49 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r1573 r1574 1232 1232 return s 1233 1233 1234 def smooth(self, kernel="hanning", width=5.0, insitu=None):1234 def smooth(self, kernel="hanning", width=5.0, order=2, insitu=None): 1235 1235 """ 1236 1236 Smooth the spectrum by the specified kernel (conserving flux). 1237 1237 Parameters: 1238 1238 kernel: The type of smoothing kernel. Select from 1239 'hanning' (default), 'gaussian', 'boxcar' and1240 'rmedian'1239 'hanning' (default), 'gaussian', 'boxcar', 'rmedian' 1240 or 'poly' 1241 1241 width: The width of the kernel in pixels. For hanning this is 1242 1242 ignored otherwise it defauls to 5 pixels. 1243 1243 For 'gaussian' it is the Full Width Half 1244 1244 Maximum. For 'boxcar' it is the full width. 1245 For 'rmedian' it is the half width. 1245 For 'rmedian' and 'poly' it is the half width. 1246 order: Optional parameter for 'poly' kernel (default is 2), to 1247 specify the order of the polnomial. Ignored by all other 1248 kernels. 1246 1249 insitu: if False a new scantable is returned. 1247 1250 Otherwise, the scaling is done in-situ … … 1253 1256 self._math._setinsitu(insitu) 1254 1257 varlist = vars() 1255 s = scantable(self._math._smooth(self, kernel.lower(), width ))1258 s = scantable(self._math._smooth(self, kernel.lower(), width, order)) 1256 1259 s._add_history("smooth", varlist) 1257 1260 print_log()
Note:
See TracChangeset
for help on using the changeset viewer.