source: branches/newfiller/test/parkes-pol.py@ 2739

Last change on this file since 2739 was 1757, checked in by Kana Sugimoto, 14 years ago

New Development: Yes

JIRA Issue: Yes (CAS-2211)

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: ASAP 3.0.0 interface changes

Test Programs:

Put in Release Notes: Yes

Module(s): all the CASA sd tools and tasks are affected.

Description: Merged ATNF-ASAP 3.0.0 developments to CASA (alma) branch.

Note you also need to update casa/code/atnf.


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