source: branches/plotter2/test/test_observatories/test_parkes_mx.py@ 2924

Last change on this file since 2924 was 2769, checked in by WataruKawasaki, 12 years ago

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s): sd

Description: fixed an argument setting in poly_baseline().


File size: 940 bytes
Line 
1#!/usr/bin/env python
2import os
3from asap import *
4from nose.tools import assert_almost_equals
5rcParams['verbose'] = 0
6rcParams['plotter.gui'] = 0
7
8DATA=os.path.join(os.path.split(__file__)[0], "..", "data",
9 "2011-09-27_0551-P000_WKK5999_test.mbf")
10
11class 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(mask=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.