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

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

asap2 version of test script

  • 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
20from asap._asap import selector
21selection = selector()
22selection._setscans([0])
23data_1665._setselection(selection)
24
25d1_5 = data_1665.copy()
26d1_7 = data_1665.copy()
27
28d1_7.set_restfreqs([1667.0],'MHz')
29# merge the two scans back together into a new scantable
30plotscans = merge(d1_5,d1_7)
31print plotscans.summary()
32del d1_5,d1_7
33
34# Baseline
35msk = plotscans.create_mask([-30,-25],[-5,0])
36plotscans.poly_baseline(msk,1)
37# Plot the results
38plotter.set_mode('p','s')
39plotter.set_layout(2,1)
40plotter.set_range(-30,0)
41selection._reset()
42selection._setpolstrings(['I','Q', 'U', 'V'])
43#plotter.set_selection(selection)
44#selection._setpolstrings(['I','Plinear'])
45#plotter.set_selection(selection)
46#selection._setpolstrings(['RR','LL'])
47plotter.plot(plotscans)
48plotter.set_selection(selection)
49plotter.save('/nfs/wwwpeople/mmarquar/parkes.png', dpi=80)
50#plotter.save('output/parkes_rrll.png')
51
52print "Parkes-Pol Test successful"
Note: See TracBrowser for help on using the repository browser.