source: trunk/test/parkes-pol.py@ 992

Last change on this file since 992 was 968, checked in by mar637, 19 years ago

a working version for asap2

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1#!/usr/bin/env python
2from asap import *
3
4rcParams['verbose'] = 0
5rcParams['plotter.ganged'] = 0
6
7# Don't plot to the screen...
8del plotter
9plotter = asapplotter(False)
10
11print "Test of Parkes polarimetry (P484)"
12
13data_1665 = scantable('data/parkes-pol.rpf')
14data_1665.rotate_linpolphase(-45)
15data_1665.rotate_xyphase(-2)
16data_1665.set_unit('km/s')
17data_1665.set_freqframe('LSRK')
18
19# Look at the first scan
20selection = selector()
21selection.set_scans(0)
22data_1665.set_selection(selection)
23
24d1_5 = data_1665.copy()
25d1_7 = data_1665.copy()
26
27d1_7.set_restfreqs([1667.3590],'MHz')
28
29# Baseline both
30msk = d1_5.create_mask([-30,-25],[-5,0])
31d1_5.poly_baseline(msk,1)
32msk = d1_7.create_mask([-30,-25],[-5,0])
33d1_7.poly_baseline(msk,1)
34
35# merge the two scans back together into a new scantable
36plotscans = merge(d1_5,d1_7)
37print plotscans.summary()
38del d1_5,d1_7,data_1665
39# Plot the results
40plotter.set_mode('p','s')
41plotter.set_layout(2,1)
42plotter.set_range(-30,0)
43selection.reset()
44selection.set_polarisations(['I','Q', 'U', 'V'])
45plotter.set_selection(selection)
46selection.set_polarisations(['I','Plinear'])
47plotter.set_selection(selection)
48selection.set_polarisations(['RR','LL'])
49plotter.set_selection(selection)
50plotter.plot(plotscans)
51plotter.save('output/parkes_rrll.png',dpi=80)
52
53print "Parkes-Pol Test successful"
Note: See TracBrowser for help on using the repository browser.