Last change
on this file since 2610 was 2522, checked in by Malte Marquarding, 12 years ago |
fixed cutnpaste naming
|
File size:
953 bytes
|
Line | |
---|
1 | #!/usr/bin/env python
|
---|
2 | import os
|
---|
3 | from asap import *
|
---|
4 | from nose.tools import assert_almost_equals
|
---|
5 | rcParams['verbose'] = 0
|
---|
6 | rcParams['plotter.gui'] = 0
|
---|
7 |
|
---|
8 | DATA=os.path.join(os.path.split(__file__)[0], "..", "data",
|
---|
9 | "2011-09-27_0551-P000_WKK5999_test.mbf")
|
---|
10 |
|
---|
11 | class TestParkes(object):
|
---|
12 | def setup(self):
|
---|
13 | self.st = scantable(DATA)
|
---|
14 |
|
---|
15 | def test_reduction(self):
|
---|
16 | q = self.st.mx_quotient()
|
---|
17 | # Average all beam data together
|
---|
18 | avb = q.average_beam()
|
---|
19 | avp = avb.average_pol()
|
---|
20 | # Fit a polynomial, avoiding the galactic emission
|
---|
21 | msk = avp.create_mask([430,580],invert=True)
|
---|
22 | avp.poly_baseline(msk, order=3)
|
---|
23 |
|
---|
24 | avp.set_freqframe('TOPO')
|
---|
25 | avp.set_unit('km/s')
|
---|
26 | avp.auto_sinusoid_baseline()
|
---|
27 | rms = avp.stats("rms")
|
---|
28 | mx = avp.stats("max_abc")
|
---|
29 | print rms
|
---|
30 | assert_almost_equals(rms[0], 0.04148, 5)
|
---|
31 | assert_almost_equals(mx[0], 86.67328, 5)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.