source: trunk/test/tid.py@ 1145

Last change on this file since 1145 was 1038, checked in by mar637, 19 years ago

have to check if output dir is there

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