Changeset 1725 for trunk/test


Ignore:
Timestamp:
04/27/10 15:48:24 (15 years ago)
Author:
Malte Marquarding
Message:

Finishing touches to opacity calculations, docs, plotting and model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/test_scantable.py

    r1600 r1725  
    11import unittest
    22import datetime
    3 from asap import scantable, selector, rcParams
     3from asap import scantable, selector, rcParams, mask_not
    44rcParams["verbose"] = False
    55
     
    88
    99        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")
    1012
    1113    def test_init(self):
     
    135137        self.assertEqual(s1.getscannos(), (1,))
    136138
     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)
    137149
    138150if __name__ == '__main__':
Note: See TracChangeset for help on using the changeset viewer.