source: trunk/test/test_observatories/test_parkes_mx.py@ 2763

Last change on this file since 2763 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
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(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.