Changeset 166
- Timestamp:
- 12/27/04 20:32:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapmath.py
r160 r166 95 95 return scantable(_bin(scan, binwidth)) 96 96 97 def average_pol(scan, mask=None ):97 def average_pol(scan, mask=None, insitu=False): 98 98 """ 99 99 Average the Polarisations together. 100 100 Parameters: 101 101 scan - a scantable 102 mask - an optional mask defining the region, where 103 the averaging will be applied. The output 104 will have all specified points masked. 105 The dimension won't be reduced and 106 all polarisations will contain the 107 averaged spectrum. 102 mask - an optional mask defining the region, where the 103 averaging will be applied. The output will have all 104 specified points masked. 105 insitu: if False (default) a new scantable is returned. 106 Otherwise, the averaging is done in-situ 108 107 Example: 109 108 polav = average_pols(myscan) 110 109 """ 111 from asap._asap import averagepol as _avpol112 from numarray import ones113 110 if mask is None: 114 mask = tuple(ones(scan.nchan())) 115 return scantable(_avpol(scan, mask)) 111 mask = () 112 if not insitu: 113 from asap._asap import averagepol as _avpol 114 return scantable(_avpol(scan, mask)) 115 else: 116 from asap._asap import averagepol_insitu as _avpol 117 _avpol(scan, mask) 118 return 116 119 117 120 def hanning(scan):
Note:
See TracChangeset
for help on using the changeset viewer.