Package de.gsi.math.spectra
Enum Apodization
- java.lang.Object
-
- java.lang.Enum<Apodization>
-
- de.gsi.math.spectra.Apodization
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Apodization>
public enum Apodization extends java.lang.Enum<Apodization>
implementation of frequenty used apodization (aka. windowing) functions reference: http://en.wikipedia.org/wiki/Apodization_function - feel free to populate this with the other (however also less frequently used) windows- Author:
- rstein
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BlackmanBlackmanHarrisBlackmanNuttallExponentialFlatTopHammingHannHannExpNuttallRectangular
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidapodize(double[] data, Apodization function)doublegetIndex(int i, int n)computes and returns the value of the apodization function for a given window indexdoublegetIndex(int i, int n, double m)computes and returns the value of the apodization function for a given window indexjava.lang.StringgetName()static voidmain(java.lang.String[] argv)static ApodizationvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Apodization[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Rectangular
public static final Apodization Rectangular
-
Hamming
public static final Apodization Hamming
-
Hann
public static final Apodization Hann
-
HannExp
public static final Apodization HannExp
-
Blackman
public static final Apodization Blackman
-
Nuttall
public static final Apodization Nuttall
-
BlackmanHarris
public static final Apodization BlackmanHarris
-
BlackmanNuttall
public static final Apodization BlackmanNuttall
-
FlatTop
public static final Apodization FlatTop
-
Exponential
public static final Apodization Exponential
-
-
Method Detail
-
values
public static Apodization[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Apodization c : Apodization.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Apodization valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getIndex
public double getIndex(int i, int n)computes and returns the value of the apodization function for a given window index- Parameters:
i- index within windown- length of window @return, the apodization value- Returns:
- value of the apodization function
-
getIndex
public double getIndex(int i, int n, double m)computes and returns the value of the apodization function for a given window index- Parameters:
i- index within windown- length of windowm- additional window (typ. bandwidth, power, etc) @return, the apodization value- Returns:
- value of the apodization function
-
getName
public java.lang.String getName()
-
apodize
public static void apodize(double[] data, Apodization function)
-
main
public static void main(java.lang.String[] argv)
-
-