source: trunk/test/tid.py@ 3105

Last change on this file since 3105 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
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')
[1355]20# IMPORTANT tid needs mode='time'
21q = data.auto_quotient(mode='time')
[752]22# Set the restfreq for each IF
23q.set_restfreqs(freqs= [23694.4700e6,23722.6336e6])
24q.set_unit('km/s')
25q.set_freqframe('LSRK')
[794]26# Align frequencies
[950]27q.freq_align()
[794]28# Recalculate the az/el
[950]29q.recalc_azel()
[794]30# Correct for gain curve and opacity
[950]31q.gain_el()
32q.opacity(0.075)
[752]33# Average in time
[950]34av = q.average_time()
[746]35# Baseline
36msk=av.create_mask([-70,-50],[40,60])
[2770]37av.poly_baseline(mask=msk,order=1)
[937]38plotter.set_mode('i','s')
[746]39plotter.plot(av)
[937]40plotter.save('output/tid.png', dpi=80)
[746]41
[794]42# Do some random processing, just to test these functions
43av.smooth('gauss',5)
44av.scale(1.05)
45av.add(0.05)
[746]46
47print "Tid test finished successfully"
Note: See TracBrowser for help on using the repository browser.