SAS/SPECTRAVIEW Software User's Guide |
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.
The following steps create a filter by modifying
the preset values
of a filter provided with SAS/SPECTRAVIEW:
- Load the appropriate data
set.
- Select [Data], then [Filter
data].
- 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. |
- Select the filter element(s) that you
want to
have the same value, and adjust the slider under Filter Value to set the value.
- Select [Deselect buttons] to release
the selected elements.
- If needed, adjust more element values.
- Select [Apply filter] to apply
the customized filter to all response values in the data.
- 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 data set must contain exactly four numeric
variables, named as follows and in this order: FILTER_X, FILTER_Y, FILTER_Z,
FILTER.
- FILTER_X, FILTER_Y, and FILTER_Z are the indices
of the filter for X, Y, and Z. The valid range for these values is 1, 2,
and 3.
- FILTER is the value for a given set of indices.
Its range of values is -16 to 16, inclusive.
- All values must be integers or are converted to
integers when read in. The data set must have at least 27 values, one for
each location in the filter. More than 27 values produces a warning message.
Incomplete filters are aborted. The data set cannot contain missing values.
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:
- Load the appropriate data set.
- Select [Data], then [Filter
data].
- Select [Load filter] and enter
the data set name in the text window.
- Select [Data set filter] to display
the filter matrix.
- Select [Apply filter] to apply
the filter to all response values in the data.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.