next up previous 174
Next: Putting vertical and horizontal lines on the spectrum
Up: Dressing Up Your Spectrum
Previous: Dressing Up Your Spectrum


Smoothing the data

The most common operation is binning over a number of channels. SPECX asks you how wide the bin should be. It averages the points in the bin and plots the average. So if I want to have a bin of width 5 for the current spectrum I would send the following command:

>> bin-spectrum
Bin width? (channels) [  3] 5
Data obs'd in LSR  frame; RAD velocity law; Velocity =   -7.000000     km/s
..

A similar operation is smoothing. SPECX produces a running mean over the spectrum. If I want to smooth the current spectrum using a 5-point average the following command will do it.

>> smooth-spectrum
Running mean over? (points) [ 2] 5

or in a shorter version;

$>\!>$ sm-sp 5

There are also operations like hann-spectrum, convolve-spectrum, fold-spectrum etc. A comparison of binned and smoothed spectra is shown in Figure [*]. Note that the number of channels in the end spectrum is different in each case. For a DAS spectrum having 1657 channels after merging (see later), Hanning-smoothing (hann) reduces that to 1655, running-mean smoothing over 5 channels (sm-sp 5 gives 1653, and binning over 5 channels (bin 5) results in only 331 channels. These differences become very important when making maps. Hanning-smoothing is very effective at removing `ringing' caused by spikes in the data (cf. Section [*]).

\includegraphics[height=3.3in]{sc8_smooth.ps}
Figure: Using various channel-averaging methods. In order, from bottom to top, the spectra are (a) the original, (b) Hanning-smoothed (using hann), (c) smoothed by 5 channels (with sm-sp 5), and (d) binned over 5 channels (using bin 5)



next up previous 174
Next: Putting vertical and horizontal lines on the spectrum
Up: Dressing Up Your Spectrum
Previous: Dressing Up Your Spectrum

Specx Cookbook
Starlink Cookbook 8
Henry Matthews, Tim Jenness
1st March 1997
E-mail:P.W.Draper@durham.ac.uk

Copyright © 2008 Science and Technology Facilities Council