source: trunk/test/tid.py@ 759

Last change on this file since 759 was 752, checked in by phi196, 19 years ago

Added velocity_align

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 993 bytes
Line 
1#!/usr/bin/env python
2from asap import *
3
4rcParams['verbose'] = 0
5
6# Don't plot to the screen...
7del plotter
8plotter = asapplotter(False)
9
10print "Test of Tidbinbilla"
11
12# Create the quotient spectra
13data = scantable('data/tid-t002.rpf')
14s = data.get_scan('*[^we]')
15r = data.get_scan('*[we]')
16q = quotient(s,r)
17
18# Set the restfreq for each IF
19q.set_restfreqs(freqs= [23694.4700e6,23722.6336e6])
20q.set_unit('km/s')
21q.set_freqframe('LSRK')
22
23# Align frequencies - Tid doppler tracks, so this isn't really necessary
24
25q.freq_align(perif=True)
26q.set_unit('km/s')
27
28# Average in time
29av = average_time(q)
30
31# Do some random processing, just to test these functions
32av.smooth('gauss',5)
33av.scale(1.05)
34av.add(0.05)
35
36# Baseline
37msk=av.create_mask([-70,-50],[40,60])
38av.poly_baseline(msk,1)
39
40plotter.plot(av)
41plotter.set_mode('i')
42plotter.save('output/tid.png')
43
44# These are currently broken as Tid does not set the elevation correctly
45av.gain_el()
46av.opacity(0.075)
47
48print "Tid test finished successfully"
Note: See TracBrowser for help on using the repository browser.