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

Last change on this file since 971 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
RevLine 
[744]1#!/usr/bin/env python
2from asap import *
3
4rcParams['verbose'] = 0
[937]5rcParams['plotter.ganged'] = 0
[744]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
[937]19# Look at the first scan
20selection = selector()
[968]21selection.set_scans(0)
22data_1665.set_selection(selection)
[744]23
[937]24d1_5 = data_1665.copy()
25d1_7 = data_1665.copy()
[744]26
[968]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
[937]35# merge the two scans back together into a new scantable
36plotscans = merge(d1_5,d1_7)
37print plotscans.summary()
[968]38del d1_5,d1_7,data_1665
[744]39# Plot the results
40plotter.set_mode('p','s')
41plotter.set_layout(2,1)
42plotter.set_range(-30,0)
[968]43selection.reset()
44selection.set_polarisations(['I','Q', 'U', 'V'])
[938]45plotter.set_selection(selection)
[968]46selection.set_polarisations(['I','Plinear'])
[938]47plotter.set_selection(selection)
[968]48selection.set_polarisations(['RR','LL'])
49plotter.set_selection(selection)
[937]50plotter.plot(plotscans)
[938]51plotter.save('output/parkes_rrll.png',dpi=80)
[744]52
53print "Parkes-Pol Test successful"
Note: See TracBrowser for help on using the repository browser.