vec_math
Class LombPeriodogram

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by vec_math.AbstractAnalyser
                  extended by vec_math.Fourier
                      extended by vec_math.LombPeriodogram
All Implemented Interfaces:
Cloneable, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying, Analyser

public class LombPeriodogram
extends Fourier

Does the calculation of a lomb periodogram using the description in Num. Rec. 13.8, p575ff..


Nested Class Summary
static class LombPeriodogram.File
          File data parser.
 
Nested classes/interfaces inherited from class vec_math.Fourier
Fourier.AbstractFile, Fourier.Series
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
static double DEFNYQUIST
          Default Nyqusit range scan.
static double DEFOVERSAMPLING
          Default oversampling.
static double DEFSPAN
          Default factor for minimum frequency.
static String KEY_FREQMAX
          The key for the maximum frequency to scan, no default.
static String KEY_NYQUIST
          The key for the nyquist multiplier.
static String KEY_OVERSAMPLING
          The key for the oversampling.
static String KEY_SPAN
          The key for the span multiplier.
static String KEY_STRETCH
          The key for the data time span, no default.
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
LombPeriodogram(Map<String,String> prop)
          Contructs a new lomb periodogram, defaulting the span, the oversampling, and the Nyquist multiplier.
 
Method Summary
protected  Vector3D[] fourierTransform(VectorG[] data)
          The fourier is done with lomb periodogrtam.
 long[] functionCalls(VectorG[] in)
          We call sin/cos and sqrt.
static Vector3D[] getFourier(VectorG[] data)
          Calculates the Lomb normalized periodogram on a data set given as x/y pairs in the input vector with default oversampling and Nyquist multiples.
static Vector3D[] getFourier(VectorG[] data, double span, double fmax, double over)
          Calculates the Lomb non-normalized periodogram on a data set given as x/y pairs in the input vector.
static Vector2D[] getPeriodogram(VectorG[] data)
          Calculates the Lomb normalized periodogram on a data set given as x/y pairs in the input vector with default oversampling and Nyquist multiples.
static Vector2D[] getPeriodogram(VectorG[] data, double span, double fmax, double over)
          Calculates the Lomb normalized periodogram on a data set given as x/y pairs in the input vector with default oversampling and Nyquist multiples.
 void reset()
          Cleans frequency ans stretch keys.
 double significance(double pdf, VectorG[] data, VectorG[] p, VectorG[] v)
          Significance out of false-alarm.
 
Methods inherited from class vec_math.Fourier
falseAlarm, getMaximumSpan, getMinimumStep, getWhitened, maximum, maximum, maximum, metadata, periodogram, process, visualize
 
Methods inherited from class vec_math.AbstractAnalyser
getBootstrapData, getBootstrapData, getDiminishedData, getDiminishedData, getSyntheticData, getSyntheticData, runningAverage
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 

Field Detail

KEY_OVERSAMPLING

public static final String KEY_OVERSAMPLING
The key for the oversampling.

See Also:
Constant Field Values

KEY_NYQUIST

public static final String KEY_NYQUIST
The key for the nyquist multiplier.

See Also:
Constant Field Values

KEY_SPAN

public static final String KEY_SPAN
The key for the span multiplier.

See Also:
Constant Field Values

KEY_FREQMAX

public static final String KEY_FREQMAX
The key for the maximum frequency to scan, no default.

See Also:
Constant Field Values

KEY_STRETCH

public static final String KEY_STRETCH
The key for the data time span, no default.

See Also:
Constant Field Values

DEFOVERSAMPLING

public static final double DEFOVERSAMPLING
Default oversampling.

See Also:
Constant Field Values

DEFNYQUIST

public static final double DEFNYQUIST
Default Nyqusit range scan.

See Also:
Constant Field Values

DEFSPAN

public static final double DEFSPAN
Default factor for minimum frequency.

See Also:
Constant Field Values
Constructor Detail

LombPeriodogram

public LombPeriodogram(Map<String,String> prop)
Contructs a new lomb periodogram, defaulting the span, the oversampling, and the Nyquist multiplier.

Method Detail

reset

public void reset()
Cleans frequency ans stretch keys.

Specified by:
reset in interface Analyser
Overrides:
reset in class AbstractAnalyser

fourierTransform

protected Vector3D[] fourierTransform(VectorG[] data)
The fourier is done with lomb periodogrtam.

Specified by:
fourierTransform in class Fourier
Parameters:
data - The measures, t in x.
Returns:
The fourier transform, x is frequency, y/z is the complex D.

functionCalls

public long[] functionCalls(VectorG[] in)
We call sin/cos and sqrt.

Returns:
null If unknown.

getPeriodogram

public static Vector2D[] getPeriodogram(VectorG[] data)
Calculates the Lomb normalized periodogram on a data set given as x/y pairs in the input vector with default oversampling and Nyquist multiples. N/2T.

Parameters:
data - An array of measurements y at times x.
over - The oversampling factor.
ny - The multiple of the Nyquist frequency to scan.
Returns:
An array of frequencies and corresponding power.

getPeriodogram

public static Vector2D[] getPeriodogram(VectorG[] data,
                                        double span,
                                        double fmax,
                                        double over)
Calculates the Lomb normalized periodogram on a data set given as x/y pairs in the input vector with default oversampling and Nyquist multiples. N/2T.

Parameters:
data - An array of measurements y at times x.
over - The oversampling factor.
ny - The multiple of the Nyquist frequency to scan.
Returns:
An array of frequencies and corresponding power.

getFourier

public static Vector3D[] getFourier(VectorG[] data)
Calculates the Lomb normalized periodogram on a data set given as x/y pairs in the input vector with default oversampling and Nyquist multiples. N/2T.

Parameters:
data - An array of measurements y at times x.
over - The oversampling factor.
ny - The multiple of the Nyquist frequency to scan.
Returns:
An array of frequencies and corresponding power.

getFourier

public static Vector3D[] getFourier(VectorG[] data,
                                    double span,
                                    double fmax,
                                    double over)
Calculates the Lomb non-normalized periodogram on a data set given as x/y pairs in the input vector. Supplied is also an oversampling factor and a multiply of the projected Nyquist frequency, N/2T.
To get to the Lomb normalized periodogram, each y-value returned has to be multiplied with (N-1)/sigma(y)^2.

Parameters:
data - An array of measurements y at times x.
over - The oversampling factor.
ny - The multiple of the Nyquist frequency to scan.
Returns:
An array of frequencies and corresponding power.

significance

public double significance(double pdf,
                           VectorG[] data,
                           VectorG[] p,
                           VectorG[] v)
Significance out of false-alarm. The lomb-periodogram is already normalized to the variance of the data, thus we only calculate the false alarm with
       N*exp(-pdf_max)
       

Specified by:
significance in interface Analyser
Overrides:
significance in class Fourier
Parameters:
pdf - Extrapolated maximum of power.
data - Input data, used for scaling.
x0 - Must be zero.
y0 - Must be one.
Returns:
A significance, 1-false-Alarm probability