Changes in trunk/test/test_scantable.py [1925:1844]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/test_scantable.py
r1925 r1844 3 3 import shutil 4 4 import datetime 5 from nose.tools import *6 5 from asap import scantable, selector, mask_not 7 6 from asap.logging import asaplog 8 # no need for log messages9 7 asaplog.disable() 8 9 from nose.tools import * 10 10 11 11 def tempdir_setup(): … … 72 72 sel.set_polarisations("YY") 73 73 self.st.set_selection(sel) 74 assert_equal(self.st.getpolnos(), [1])74 assert_equal(self.st.getpolnos(), (1,)) 75 75 sel1 = self.st.get_selection() 76 76 assert_equal(sel1.get_pols(), [1]) 77 77 self.st.set_selection(pols="XX") 78 assert_equal(self.st.getpolnos(), [0])78 assert_equal(self.st.getpolnos(), (0,)) 79 79 80 80 … … 165 165 def test_drop_scan(self): 166 166 s0 = self.st.drop_scan(1) 167 assert_equal(s0.getscannos(), [0])167 assert_equal(s0.getscannos(), (0,)) 168 168 s1 = self.st.drop_scan([0]) 169 assert_equal(s1.getscannos(), [1])169 assert_equal(s1.getscannos(), (1,)) 170 170 171 171 def test_flag(self): … … 206 206 for spec in ds: 207 207 assert_almost_equals(sum(spec)/len(spec), 0.0, 5) 208 209 def test_auto_poly_baseline(self):210 q = self.st.auto_quotient()211 b = q.auto_poly_baseline(insitu=False)212 res_rms = (q-b).stats('rms')213 assert_almost_equals(res_rms[0], 0.38370, 5)214 assert_almost_equals(res_rms[1], 0.38780, 5)215 216 217 def test_poly_baseline(self):218 q = self.st.auto_quotient()219 msk = q.create_mask([0.0, 1471.0], [1745.0, 4095.0])220 b = q.poly_baseline(order=0, mask=msk,insitu=False)221 res_rms = (q-b).stats('rms')222 assert_almost_equals(res_rms[0], 0.38346, 5)223 assert_almost_equals(res_rms[1], 0.38780, 5)
Note:
See TracChangeset
for help on using the changeset viewer.