Changeset 1725 for trunk/test
- Timestamp:
- 04/27/10 15:48:24 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/test_scantable.py
r1600 r1725 1 1 import unittest 2 2 import datetime 3 from asap import scantable, selector, rcParams 3 from asap import scantable, selector, rcParams, mask_not 4 4 rcParams["verbose"] = False 5 5 … … 8 8 9 9 self.st = scantable("data/MOPS.rpf", average=True) 10 restfreqs = [86.243] # 13CO-1/0, SiO the two IF 11 self.st.set_restfreqs(restfreqs,"GHz") 10 12 11 13 def test_init(self): … … 135 137 self.assertEqual(s1.getscannos(), (1,)) 136 138 139 def test_flag(self): 140 q = self.st.auto_quotient() 141 q.set_unit('km/s') 142 q0 = q.copy() 143 q1 = q.copy() 144 msk = q0.create_mask([-10,20]) 145 q0.flag(mask=mask_not(msk)) 146 self.assertAlmostEqual(q0.stats(stat='max')[0], 95.62171936) 147 q1.flag(mask=msk) 148 self.assertAlmostEqual(q1.stats(stat='max')[0], 2.66563416) 137 149 138 150 if __name__ == '__main__':
Note:
See TracChangeset
for help on using the changeset viewer.