Previous IDL Reference Guide: Procedures and Functions Next

BUTTERWORTH

Syntax | Return Value | Arguments | Keywords | Example | Version History

The BUTTERWORTH function returns an array that contains the absolute value of the low-pass Butterworth kernel.

This routine is written in the IDL language. Its source code can be found in the file butterworth.pro in the lib subdirectory of the IDL distribution.

The form of the filter is given by the following equation:

where W is the frequency, Wc is the cutoff frequency, and N is the order.

Syntax

Result = BUTTERWORTH( X [, Y [, Z]] [, CUTOFF=value] [, ORDER=value] [, /ORIGIN] [, XDIM=value] [, YDIM=value] [, ZDIM=value] )

Return Value

The result is either a 1D, 2D, or 3D array with the dimensions of the result defined by the inputs X, Y, and Z.

Arguments

X

Either a scalar value containing the number of elements in the x direction or a vector of up to three elements giving the number of elements in the x, y, and z directions, respectively.

Y

The number of elements in the y direction. This argument is ignored if X contains more than one element.

Z

The number of elements in the z direction. This argument is ignored if X contains more than one element.

Keywords

CUTOFF

The cutoff frequency. The default value is 9.

ORDER

The order of the filter. The default value is 1.

ORIGIN

If set, the return array is centered at the corners of the array.

XDIM

The x spacing of the columns.

YDIM

The y spacing of the rows.

ZDIM

The z spacing of the planes.

Example

; if 'im' is the variable containing an image to be filtered  
filter = BUTTERWORTH( SIZE(im, /DIMENSIONS) )  
filtered_image = FFT( FFT(im, -1) * filter, 1 )  

Version History

6.3
Introduced

  IDL Online Help (March 06, 2007)