source: trunk/test/tid.py @ 937

Last change on this file since 937 was 937, checked in by mar637, 18 years ago

asap2 version of test script

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 923 bytes
RevLine 
[746]1#!/usr/bin/env python
2from asap import *
3
4rcParams['verbose'] = 0
5
[937]6rcParams['plotter.ganged'] = 0
[746]7# Don't plot to the screen...
8del plotter
9plotter = asapplotter(False)
10
11print "Test of Tidbinbilla"
12
13# Create the quotient spectra
14data = scantable('data/tid-t002.rpf')
[937]15q = data.auto_quotient()
[752]16# Set the restfreq for each IF
17q.set_restfreqs(freqs= [23694.4700e6,23722.6336e6])
18q.set_unit('km/s')
19q.set_freqframe('LSRK')
[794]20# Align frequencies
[937]21qa = q.freq_align(insitu=False)
[794]22# Recalculate the az/el
[937]23qa.recalc_azel()
[794]24# Correct for gain curve and opacity
[937]25qa.gain_el()
26qa.opacity(0.075)
[752]27# Average in time
[937]28av = qa.average_time()
[746]29# Baseline
30msk=av.create_mask([-70,-50],[40,60])
31av.poly_baseline(msk,1)
[937]32plotter.set_mode('i','s')
[746]33plotter.plot(av)
[937]34plotter.save('output/tid.png', dpi=80)
[746]35
[794]36# Do some random processing, just to test these functions
37av.smooth('gauss',5)
38av.scale(1.05)
39av.add(0.05)
[746]40
41print "Tid test finished successfully"
Note: See TracBrowser for help on using the repository browser.