source: branches/asap-3.x/test/mopra.py@ 2412

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

Merge from Release2.1.1b tag

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 999 bytes
Line 
1#!/usr/bin/env python
2from asap import *
3rcParams['verbose'] = 0
4print "Test using Mopra dual IF data..."
5print "Reduction test..."
6s = scantable("data/mopra_dualif.rpf")
7q = s.auto_quotient()
8del s
9restfreqs = [110.201,86.243] # 13CO-1/0, SiO the two IF
10q.set_restfreqs(restfreqs,"GHz") # set the restfrequencies, as not in data
11q.set_unit("km/s") # set the unit to be used from now on
12q.set_freqframe("LSRK") # set frequency frame
13q.auto_poly_baseline() # determine and subtract a poly baseline automatically
14q.convert_flux() # K -> Jy
15msk = q.create_mask([-70,20], [20,70]) # line free region - two windows
16rms = q.stats("rms",msk)
17med = q.stats("median",msk)
18
19print "Fitter test..."
20# select IF1
21selection = selector()
22selection.set_ifs(1)
23q.set_selection(selection)
24
25rcParams['plotter.gui'] = 0
26f = fitter()
27f.set_scan(q)
28f.set_function(gauss=2) # fit two gaussians
29f.fit()
30f.plot(filename='output/moprafit.png')
31fp = f.get_parameters()
32print "Mopra Test successful"
Note: See TracBrowser for help on using the repository browser.