Changeset 1592
- Timestamp:
- 07/02/09 14:50:59 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/test_scantable.py
r1544 r1592 24 24 st = self.st.copy() 25 25 self.assertNotEqual(id(st), id(self.st)) 26 26 27 27 def test_drop_scan(self): 28 28 st = self.st.drop_scan([1]) … … 43 43 spec = self.st.get_mask(0) 44 44 self.assertEqual(len(spec), 4096) 45 45 46 46 def test_set_spectrum(self): 47 47 spec = [ 1.0 for i in range(self.st.nchan()) ] … … 63 63 'sum':720262.375, 'mean':175.845306396, 64 64 'var':513.95324707, 'stddev':22.6705360413, 65 'avdev':16.3966751099, 'rms':177.300170898, 66 'median':182.891845703} 65 'avdev':16.3966751099, 'rms':177.300170898, 66 'median':182.891845703} 67 67 for k,v in stats.iteritems(): 68 68 sval = self.st.stats(stat=k) … … 72 72 73 73 def test_get_column_names(self): 74 cnames = ['SCANNO', 'CYCLENO', 'BEAMNO', 'IFNO', 74 cnames = ['SCANNO', 'CYCLENO', 'BEAMNO', 'IFNO', 75 75 'POLNO', 'FREQ_ID', 'MOLECULE_ID', 'REFBEAMNO', 76 'TIME', 'INTERVAL', 'SRCNAME', 'SRCTYPE', 76 'TIME', 'INTERVAL', 'SRCNAME', 'SRCTYPE', 77 77 'FIELDNAME', 'SPECTRA', 'FLAGTRA', 'TSYS', 78 'DIRECTION', 'AZIMUTH', 'ELEVATION', 79 ' PARANGLE', 'OPACITY', 'TCAL_ID', 'FIT_ID',78 'DIRECTION', 'AZIMUTH', 'ELEVATION', 79 'OPACITY', 'TCAL_ID', 'FIT_ID', 80 80 'FOCUS_ID', 'WEATHER_ID', 'SRCVELOCITY', 81 81 'SRCPROPERMOTION', 'SRCDIRECTION', … … 83 83 self.assertEqual(self.st.get_column_names(), cnames) 84 84 85 def test_average_pol(self): 86 ap = self.st.average_pol() 87 self.assertEqual(ap.npol(), 1) 88 85 89 86 90 if __name__ == '__main__': 87 91 unittest.main() 88
Note:
See TracChangeset
for help on using the changeset viewer.