Last change
on this file since 2774 was 2770, checked in by WataruKawasaki, 12 years ago |
New Development: No
JIRA Issue: No
Ready for Test: Yes
Interface Changes: No
What Interface Changed:
Test Programs:
Put in Release Notes: No
Module(s): sd.scantable
Description: modified baselining function arguments to be 'name=value' style.
|
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.0 KB
|
Line | |
---|
1 | #!/usr/bin/env python
|
---|
2 | from asap import *
|
---|
3 |
|
---|
4 | import os
|
---|
5 | outdir = "./output"
|
---|
6 | if not os.path.exists(outdir):
|
---|
7 | os.mkdir(outdir)
|
---|
8 |
|
---|
9 | rcParams['verbose'] = 0
|
---|
10 |
|
---|
11 | rcParams['plotter.ganged'] = 0
|
---|
12 | # Don't plot to the screen...
|
---|
13 | del plotter
|
---|
14 | plotter = asapplotter(False)
|
---|
15 |
|
---|
16 | print "Test of Tidbinbilla"
|
---|
17 |
|
---|
18 | # Create the quotient spectra
|
---|
19 | data = scantable('data/tid-t002.rpf')
|
---|
20 | # IMPORTANT tid needs mode='time'
|
---|
21 | q = data.auto_quotient(mode='time')
|
---|
22 | # Set the restfreq for each IF
|
---|
23 | q.set_restfreqs(freqs= [23694.4700e6,23722.6336e6])
|
---|
24 | q.set_unit('km/s')
|
---|
25 | q.set_freqframe('LSRK')
|
---|
26 | # Align frequencies
|
---|
27 | q.freq_align()
|
---|
28 | # Recalculate the az/el
|
---|
29 | q.recalc_azel()
|
---|
30 | # Correct for gain curve and opacity
|
---|
31 | q.gain_el()
|
---|
32 | q.opacity(0.075)
|
---|
33 | # Average in time
|
---|
34 | av = q.average_time()
|
---|
35 | # Baseline
|
---|
36 | msk=av.create_mask([-70,-50],[40,60])
|
---|
37 | av.poly_baseline(mask=msk,order=1)
|
---|
38 | plotter.set_mode('i','s')
|
---|
39 | plotter.plot(av)
|
---|
40 | plotter.save('output/tid.png', dpi=80)
|
---|
41 |
|
---|
42 | # Do some random processing, just to test these functions
|
---|
43 | av.smooth('gauss',5)
|
---|
44 | av.scale(1.05)
|
---|
45 | av.add(0.05)
|
---|
46 |
|
---|
47 | print "Tid test finished successfully"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.