Chapter Contents

Previous

Next
SAS/SPECTRAVIEW Software User's Guide

Creating and Applying Your Own Filter

To create a filter to suit your own needs, you can customize a supplied filter by modifying its preset values, or you can define a filter using SAS DATA step code.


Customizing a Filter

The following steps create a filter by modifying the preset values of a filter provided with SAS/SPECTRAVIEW:

  1. Load the appropriate data set.

  2. Select [Data], then [Filter data].

  3. Specify the filter template you want to customize by selecting one of the following. You cannot customize the Median filter.
    [Blend filter] smooths by averaging without weighting the response value.
    [Gaussian filter] smooths by averaging and weights the response value.
    [Laplacian filter] sharpens the data.

  4. Select the filter element(s) that you want to have the same value, and adjust the slider under Filter Value to set the value.

  5. Select [Deselect buttons] to release the selected elements.

  6. If needed, adjust more element values.

  7. Select [Apply filter] to apply the customized filter to all response values in the data.

  8. To reuse the customized filter, store it in a SAS data set by selecting [Save filter] and specifying a one- or two-level SAS data set name in the text window.


Creating a Filter with SAS DATA Step Code

Using SAS DATA step code, you can create a SAS data set containing a filter, which can then be loaded into SAS/SPECTRAVIEW. The following restrictions apply:

The following DATA step code creates a SAS data set named BLEND, which contains a valid filter:

       data blend;
         do filter_x = 1 to 3;
         do filter_y = 1 to 3;
         do filter_z = 1 to 3;
           filter = 1;  output;
         end; end; end;
       run;


Applying a Filter Stored in a Data Set

The following instructions apply a filter stored in a SAS data set:

  1. Load the appropriate data set.

  2. Select [Data], then [Filter data].

  3. Select [Load filter] and enter the data set name in the text window.

  4. Select [Data set filter] to display the filter matrix.

  5. Select [Apply filter] to apply the filter to all response values in the data.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.