Previous Getting Started with IDL: Signal Processing with IDL Next

Signal Processing with SMOOTH

A simple way to smooth out the NOISY dataset is to use IDL's SMOOTH function. It returns an array smoothed with a boxcar average of a specified width.

  1. Create a new variable to hold the smoothed dataset by entering the following command:
  2. SMOOTHED=SMOOTH(NOISY, 5)  
    

     

  3. Now plot your new data set:
  4. IPLOT,SMOOTHED,TITLE='Smoothed Data'  
    

     

    The TITLE keyword draws the title text centered over the plot. Notice that while SMOOTH did a fairly good job of removing noise spikes, the resulting amplitudes taper off as the frequency increases.

     

    Figure 5-4: Using the SMOOTH Command

    Figure 5-4: Using the SMOOTH Command

  IDL Online Help (March 06, 2007)