source: branches/hpc34/test/test_observatories/test_hobart.py@ 2623

Last change on this file since 2623 was 2522, checked in by Malte Marquarding, 13 years ago

fixed cutnpaste naming

File size: 1.1 KB
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# HOBART specific
8rcParams["scantable.reference"] = ".*(e|w|_R|\+R|\-R)$"
9
10if not os.path.exists("output"):
11 os.makedirs("output")
12
13DATA=os.path.join(os.path.split(__file__)[0], "..", "data",
14 "hobart.rpf")
15
16class TestHobart(object):
17 def setup(self):
18 self.st = scantable(DATA)
19
20 def _plotfit(self, scan, polno):
21 scan.set_selection(pols=[polno])
22 f = fitter()
23 f.set_scan(scan)
24 f.set_function(gauss=1) # fit gaussian(s)
25 f.fit()
26 f.plot(filename='output/hobartfit_pol%d.png' % polno)
27 fp = f.get_parameters()
28 assert True
29
30 def test_reduction(self):
31 q = self.st.auto_quotient()
32 q.set_unit("km/s") # set the unit to be used from now on
33 q.set_freqframe("LSRK") # set frequency frame
34 q.auto_poly_baseline(insitu=True, order=1)
35 q.set_selection(scans=[0])
36 for polno in q.getpolnos():
37 self._plotfit(q, polno)
Note: See TracBrowser for help on using the repository browser.