1 | #!/usr/bin/env python
|
---|
2 | from asap import *
|
---|
3 |
|
---|
4 | rcParams['verbose'] = 0
|
---|
5 |
|
---|
6 | # Don't plot to the screen...
|
---|
7 | del plotter
|
---|
8 | plotter = asapplotter(False)
|
---|
9 |
|
---|
10 | print "Test of Parkes polarimetry (P484)"
|
---|
11 |
|
---|
12 | data_1665 = scantable('data/parkes-pol.rpf')
|
---|
13 | data_1665.rotate_linpolphase(-45)
|
---|
14 | data_1665.rotate_xyphase(-2)
|
---|
15 | data_1665.set_unit('km/s')
|
---|
16 | data_1665.set_freqframe('LSRK')
|
---|
17 |
|
---|
18 | # Make a copy for the 1667 transition
|
---|
19 | data_1667 = data_1665.copy()
|
---|
20 | data_1667.set_restfreqs(lines = ['OH1667'])
|
---|
21 | data_1667.set_unit('km/s')
|
---|
22 | data_1667.set_freqframe('LSRK')
|
---|
23 |
|
---|
24 |
|
---|
25 | # Look at the first scan
|
---|
26 | d1_5 = data_1665.get_scan(0)
|
---|
27 | d1_7 = data_1667.get_scan(0)
|
---|
28 |
|
---|
29 | # Baseline
|
---|
30 | msk = d1_5.create_mask([-30,-25],[-5,0])
|
---|
31 | d1_5.poly_baseline(msk,1)
|
---|
32 | msk = d1_7.create_mask([-30,-25],[-5,0])
|
---|
33 | d1_7.poly_baseline(msk,1)
|
---|
34 |
|
---|
35 | # Plot the results
|
---|
36 | plotter.plot(d1_5,d1_7)
|
---|
37 | plotter.set_mode('p','s')
|
---|
38 | plotter.set_layout(2,1)
|
---|
39 | plotter.set_range(-30,0)
|
---|
40 | plotter.set_cursor(pol=['I','Q','U','V'])
|
---|
41 | plotter.set_cursor(pol=['I','Plinear'])
|
---|
42 | plotter.set_cursor(pol=['RR','LL'])
|
---|
43 | plotter.save('output/parkes_rrll.png')
|
---|
44 |
|
---|
45 | print "Parkes-Pol Test successful"
|
---|