Changeset 1842 for trunk/test
- Timestamp:
- 08/03/10 18:56:51 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/test_scantable.py
r1840 r1842 78 78 assert_equal(self.st.getpolnos(), (0,)) 79 79 80 81 def stats(self, key, value, mask=False): 82 msk = None 83 if mask: 84 msk = self.st.create_mask([0,100], [3900,4096]) 85 sval = self.st.stats(stat=key, mask=msk) 86 assert_almost_equal(sval[0], value) 87 88 def test_masked_stats(self): 89 stats = { 'min': 113.767166138, 90 'max':128.21571350, 'sumsq':4180516.75, 91 'sum':35216.87890625, 'mean':118.5753479, 92 'var':15.75608253, 'stddev':3.9693932533, 93 'avdev':3.395271778, 'rms':118.6415405, 94 'median':117.5024261} 95 for k,v in stats.items(): 96 yield self.stats, k, v, True 97 80 98 def test_stats(self): 81 99 stats = { 'min': 113.767166138, … … 85 103 'avdev':16.3966751099, 'rms':177.300170898, 86 104 'median':182.891845703} 87 for k,v in stats.iteritems(): 88 sval = self.st.stats(stat=k) 89 assert_almost_equal(sval[0], v) 90 msk = self.st.create_mask([0,100], [3900,4096]) 91 assert_almost_equal(self.st.stats("sum", msk)[0], 35216.87890625) 105 for k,v in stats.items(): 106 yield self.stats, k, v 92 107 93 108 def test_get_column_names(self):
Note:
See TracChangeset
for help on using the changeset viewer.