next up previous
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;

$\gt\!\gt$ 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 [*]).


 \begin{figure}
% latex2html id marker 1163

\centering

\includegraphics [height...
 ...ned over 5 channels (using {\tt bin 5})} }\end{minipage}\end{center}\end{figure}


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

Specx Cookbook Reduction of millimetre wave data
Starlink Cookbook 8
Henry Matthews, Tim Jenness
1st March 1997
E-mail:ussc@star.rl.ac.uk

Copyright © 2005 Council for the Central Laboratory of the Research Councils