Last change
on this file since 2682 was
2672,
checked in by Malte Marquarding, 12 years ago
|
introduce 'reshape' method; this includes a fix to c++ for the upper boundary assertion
|
File size:
935 bytes
|
Rev | Line | |
---|
[2481] | 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 | |
---|
[2522] | 11 | class TestParkes(object): |
---|
[2481] | 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 | assert_almost_equals(rms[0], 0.04148, 5) |
---|
| 30 | assert_almost_equals(mx[0], 86.67328, 5) |
---|
Note: See
TracBrowser
for help on using the repository browser.