Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.
﻿

>  Docs Center  >  IDL Reference  >  Math - Signal Processing  >  TS_LANCZOS

### TS_LANCZOS

TS_LANCZOS

The TS_LANCZOS function can be used to smoothly interpolate the input data over a Lanczos kernel or be used as a low-pass filter.

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

## Examples

`range = [0:!pi:.01]`
`data = sin(range)`
`data[0:range.length/2-1] *= (indgen(range.length/2) mod 3 - 1)`
`tsdata = ts_lanczos( data, weight=50, low_freq=0, high_freq=.05, /EDGE_TRUNCATE )`
`p1 = plot(range,data, title='Original Data vs LANCZOS', name='Data')`
`p2 = plot(range,tsdata,'2r',/over, name='TS_LANCZOS')`
`l=legend(target=[p1,p2])`

IDL plots:

## Syntax

Result = TS_LANCZOS( X [, WEIGHT=value] [, LOW_FREQ=value] [, HIGH_FREQ=value] [, /DOUBLE] [, SCALE_FACTOR=value] [, /EDGE_MIRROR] [, /EDGE_TRUNCATE] [, /EDGE_WRAP] [, /EDGE_WRAP] [, /EDGE_ZERO] [, /NAN] )

## Return Value

The result is an n-element vector of the same data type as the input vector.

## Arguments

### X

An n-element single- or double-precision floating-point vector.

## Keywords

### DOUBLE

Set this keyword to force the computations to be done in double-precision arithmetic.

### HIGH_FREQ

A scalar indicating the upper bound on the frequency. Default value is .5.

### LOW_FREQ

A scalar indicating the lower bound on the frequency. Default value is 0.

### WEIGHT

A scalar value for the number of weights to use in generating the LANCZOS kernel.

### SCALE_FACTOR

See Scale_Factor.

See EDGE_MIRROR.

### EDGE_TRUNCATE

See EDGE_TRUNCATE.

See EDGE_WRAP.

See EDGE_ZERO.

See NAN.

## Version History

 8.4 Introduced