source: branches/Release12/test/tid.py@ 1743

Last change on this file since 1743 was 781, checked in by phi196, 19 years ago

Added recalc_azael + minor mods

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 925 bytes
RevLine 
[746]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)
[752]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
[781]23# Align frequencies
[752]24
25q.freq_align(perif=True)
26
[781]27# Recalculate the az/el
28
29q.recalc_azel()
30
31# Correct for gain curve and opacity
32q.gain_el()
33q.opacity(0.075)
34
[752]35# Average in time
[746]36av = average_time(q)
37
38# Baseline
39msk=av.create_mask([-70,-50],[40,60])
40av.poly_baseline(msk,1)
41
[781]42plotter.set_mode('i')
[746]43plotter.plot(av)
44plotter.save('output/tid.png')
45
[781]46# Do some random processing, just to test these functions
47av.smooth('gauss',5)
48av.scale(1.05)
49av.add(0.05)
[746]50
51print "Tid test finished successfully"
Note: See TracBrowser for help on using the repository browser.