Introduction

This is a short tutorial on how to use ASAP to reduce a single fits file. The file contains data taken in position-switching mode using the MOPS zoom mode with one zoom window. The commands are to be typed line-by-line into ASAP.
The tutorial uses the data file 2008-03-12_0932-M999.rpf
You can run these commands in batch mode using the batch file tutorial-1.py. This file must be executed in a terminal (and not in ASAP) with the following command:
localhost> python -i tutorial-1.py

Part I - Reduction

To start ASAP type the follwing at the command line prompt
localhost> asap
Define the file name
file='2008-03-12_0932-M999.rpf'
Load the file into memory
s = scantable(file, average=True)
print s
Set the plotting mode
plotter.set_mode(stacking='i', panelling='t')
Set the doppler convention
s.set_doppler('RADIO')
Set the rest frame
s.set_freqframe('LSRK')
Set the observed rest frequency in Hz
s.set_restfreqs([86243.37e6])
Define the channel unit
s.set_unit('km/s') 
Form the quotient spectra
q=s.auto_quotient()
Average all scans in time, aligning in velocity
av = q.average_time(align=True)
Remove the baseline (set to 2 order). Specify the signal-free channels
msk = av.create_mask([-200,-50],[50,180])
av.poly_baseline(msk,2)
Average the two polarisations together
iav = av.average_pol()
Smooth the data with boxcar, full width = 3
siav = iav.smooth(kernel = 'boxcar', width = 3, insitu = False)
plotter.plot(siav)
Scale the data according to scaling fudge factor
Eg. With beam efficiency of 0.49 at 86 GHz
iav.scale(2)  
Make final plot for saving
plotter.set_range(-20,30)  
plotter.plot(siav)
plotter.set_legend(mode=-1)
plotter.set_title(['Orion-SiO'], fontsize=18) 
plotter.text(10,95,"SiO (2-1 v=1) at 86243.440 MHz", fontsize=12)
plotter.text(-19,95,"2008/03/12", fontsize=12)
plotter.text(-19,90,"Zoom Mode", fontsize=12)
Save plot as postscript file
plotter.save('Orion-SiO.ps')

Updated 16 May 2008
Any queries should be directed to Kate Brooks (Kate.Brooks @csiro.au)