Welcome to the Exelis VIS product documentation center! Here you will find reference guides, help documents, and product libraries. Discover the products ENVI, IDL, ENVI LiDAR, and ESE, developed by Exelis VIS.
﻿

### LNP_TEST

LNP_TEST

The LNP_TEST function computes the Lomb Normalized Periodogram of two sample populations X and Y and tests the hypothesis that the populations represent a significant periodic signal against the hypothesis that they represent random noise.

LNP_TEST is based on the routine fasper described in section 13.8 of Numerical Recipes in C: The Art of Scientific Computing (Second Edition), published by Cambridge University Press, and is used by permission.

## Examples

This example tests the hypothesis that two sample, n-element populations X and Y represent a significant periodic signal against the hypothesis that they represent random noise:

`; Define two n-element sample populations:X = [ 1.0,  2.0,  5.0,  7.0,  8.0,  9.0, \$   10.0, 11.0, 12.0, 13.0, 14.0, 15.0, \$   16.0, 17.0, 18.0, 19.0, 20.0, 22.0, \$   23.0, 24.0, 25.0, 26.0, 27.0, 28.0]Y = [ 0.69502, -0.70425,  0.20632,  0.77206, -2.08339,  0.97806, \$   1.77324,  2.34086,  0.91354,  2.04189,  0.53560, -2.05348, \$   -0.76308, -0.84501, -0.06507, -0.12260,  1.83075,  1.41403, \$   -0.26438, -0.48142, -0.50929,  0.01942, -1.29268,  0.29697]; Test the hypothesis that X and Y represent a significant periodic; signal against the hypothesis that they represent random noise:result = LNP_TEST(X, Y, WK1 = wk1, WK2 = wk2, JMAX = jmax)PRINT, result`

IDL prints:

`4.69296    0.198157`

The small value of the significance represents the possibility of a significant periodic signal. A larger number of samples for X and Y would produce a more conclusive result. WK1 and WK2 are both 48-element vectors containing linear frequencies and corresponding Lomb values, respectively. JMAX is the indexed location of the maximum Lomb value in WK2.

## Syntax

Result = LNP_TEST( X, Y [, /DOUBLE] [, HIFAC=scale_factor] [, JMAX=variable] [, OFAC=value] [, WK1=variable] [, WK2=variable] )

## Return Value

The result is a two-element vector containing the maximum peak in the Lomb Normalized Periodogram and its significance. The significance is a value in the interval [0.0, 1.0]; a small value indicates that a significant periodic signal is present.

## Arguments

### X

An n-element integer, single-, or double-precision floating-point vector containing equally or unequally spaced time samples.

### Y

An n-element integer, single-, or double-precision floating-point vector containing amplitudes corresponding to Xi.

## Keywords

### DOUBLE

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

### HIFAC

Use this keyword to specify the scale factor of the average Nyquist frequency. The default value is 1.

### JMAX

Use this keyword to specify a named variable that will contain the index of the maximum peak in the Lomb Normalized Periodogram.

### OFAC

Use this keyword to specify the oversampling factor. The default value is 4.

### WK1

Use this keyword to specify a named variable that will contain a vector of increasing linear frequencies.

### WK2

Use this keyword to specify a named variable that will contain a vector of values from the Lomb Normalized Periodogram corresponding to the frequencies in WK1.

## Version History

 4 Introduced

﻿

## Notes

This page has no user notes yet. Be the first one!

###### This information is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). However, it may be restricted from transfer to various embargoed countries under U.S. laws and regulations.
 PRODUCTS & SERVICES ENVI IDL Professional Services

 INDUSTRIES Defense & Intelligence Environmental Monitoring Academic
 LEARN Code Videos Events & Training Case Studies Whitepapers Resources
 SUPPORT Forums Help Articles Reference Guides Updates & Maintenance
 COMPANY Mission Careers Press Room Legal Exelis, Inc
© 2014 Exelis Visual Information Solutions