public class SigAnalWindows
extends java.lang.Object
So far there are 6 defined window functions: Bartlett, Blackman, Gaussian, Hamming, Hanning, Welch. Further functions can be added by writing three methods for each window.
Constructor and Description |
---|
SigAnalWindows() |
Modifier and Type | Method and Description |
---|---|
static GraphType |
applyWindowFunction(GraphType input,
java.lang.String function,
boolean allocMem)
Method to apply a window function to an input data set on the assumption that the data are stored as a simple
sequential set.
|
static void |
applyWindowToSpectral(double[] input,
java.lang.String function,
double low,
boolean twoSided,
boolean narrow)
Method to apply a window function to an input double[] array that is stored using the Triana model for Spectral
data sets.
|
static double[] |
Bartlett(int points)
Create a Bartlett window spanning the given number of points.
|
static double |
Bessel0(double x) |
static double[] |
Blackman(int points)
Create a Blackman window spanning the given number of points.
|
static double[] |
BlackmanHarris92(int points)
Create a Blackman-Harris 92dB window spanning the given number of points.
|
static void |
doFullWindow(java.lang.String function,
double[] input,
int from,
int to)
Selects the correct window and applies its full width to the input array between the two given indices.
|
static void |
doHalfWindow(java.lang.String function,
double[] input,
int from,
int to,
boolean right)
Selects the given window and applies half of its width to the input array between the two given indices.
|
static double[] |
FTHP(int points)
Create a FTHP window spanning the given number of points.
|
static double[] |
FTNI(int points)
Create a FTNI window spanning the given number of points.
|
static double[] |
FTSRS(int points)
Create a FTSRS window spanning the given number of points.
|
static double[] |
Gaussian(int points)
Create a Gaussian window spanning the given number of points.
|
static double[] |
Hamming(int points)
Create a Hamming window spanning the given number of points.
|
static double[] |
Hann(int points)
Create a Hann window spanning the given number of points.
|
static double[] |
HFT70(int points)
Create a HFT70 window spanning the given number of points.
|
static double[] |
HFT95(int points)
Create a HFT95 window spanning the given number of points.
|
static double[] |
Kaiser(int points,
double alpha)
Create a Kaiser window spanning the given number of points and depending on the given parameter alpha.
|
static double[] |
Kaiser3(int points)
Create a Kaiser3 window spanning the given number of points (with parameter alpha = 3).
|
static double[] |
Kaiser4(int points)
Create a Kaiser4 window spanning the given number of points (with parameter alpha = 4).
|
static double[] |
Kaiser5(int points)
Create a Kaiser5 window spanning the given number of points (with parameter alpha = 5).
|
static double[] |
Kaiser6(int points)
Create a Kaiser6 window spanning the given number of points (with parameter alpha = 6).
|
static double[] |
Kaiser7(int points)
Create a Kaiser7 window spanning the given number of points (with parameter alpha = 7).
|
static java.lang.String |
listOfWindows()
Returns the list of windows available.
|
static java.lang.String[] |
listOfWindowsAsArray() |
static double[] |
Nuttall3(int points)
Create a Nuttall3 window spanning the given number of points.
|
static double[] |
Nuttall3a(int points)
Create a Nuttall3a window spanning the given number of points.
|
static double[] |
Nuttall3b(int points)
Create a Nuttall3b window spanning the given number of points.
|
static double[] |
Nuttall4(int points)
Create a Nuttall4 window spanning the given number of points.
|
static double[] |
Rectangle(int points)
Create a Rectangle window spanning the given number of points.
|
static double[] |
SFT3F(int points)
Create a SFT3F window spanning the given number of points.
|
static double[] |
SFT3M(int points)
Create a SFT3M window spanning the given number of points.
|
static double[] |
SFT4F(int points)
Create a SFT4F window spanning the given number of points.
|
static double[] |
SFT4M(int points)
Create a SFT4M window spanning the given number of points.
|
static double[] |
SFT5F(int points)
Create a SFT5F window spanning the given number of points.
|
static double[] |
SFT5M(int points)
Create a SFT5M window spanning the given number of points.
|
static double[] |
Welch(int points)
Create a Welch window spanning the given number of points.
|
public static GraphType applyWindowFunction(GraphType input, java.lang.String function, boolean allocMem)
input
- Must be either of type VectorType or TimeFrequencyfunction
- The keyword naming the window function to be appliedallocMem
- True<\i> if output is to be a copy of input, false if input is overwrittenpublic static void applyWindowToSpectral(double[] input, java.lang.String function, double low, boolean twoSided, boolean narrow)
input
- Should be stored in the way that Spectra are stored in Trianafunction
- The keyword naming the window function to be appliedlow
- The lower frequency bound (only tested to see if it is non-zero if narrow band)twoSided
- True<\i> if the data are stored in a two-sided waynarrow
- True<\i> if the data are narrow-bandpublic static java.lang.String listOfWindows()
public static java.lang.String[] listOfWindowsAsArray()
public static void doFullWindow(java.lang.String function, double[] input, int from, int to)
function
- The name of the window to be appliedinput
- The data set to be multiplied by the windowfrom
- The index in the input data set where the window startsto
- The index in the input data set where the window terminatespublic static void doHalfWindow(java.lang.String function, double[] input, int from, int to, boolean right)
function
- The name of the window to be appliedinput
- The data set to be multiplied by the windowfrom
- The index in the input data set where the window startsto
- The index in the input data set where the window terminatespublic static double[] Hann(int points)
points
- The number of points that span the full size of the windowpublic static double[] Bartlett(int points)
points
- The number of points that span the full size of the windowpublic static double[] Welch(int points)
points
- The number of points that span the full size of the windowpublic static double[] Hamming(int points)
points
- The number of points that span the full size of the windowpublic static double[] Gaussian(int points)
points
- The number of points that span the full size of the windowpublic static double[] Blackman(int points)
points
- The number of points that span the full size of the windowpublic static double[] Rectangle(int points)
points
- The number of points that span the full size of the windowpublic static double[] BlackmanHarris92(int points)
points
- The number of points that span the full size of the windowpublic static double[] Nuttall3(int points)
points
- The number of points that span the full size of the windowpublic static double[] Nuttall3a(int points)
points
- The number of points that span the full size of the windowpublic static double[] Nuttall3b(int points)
points
- The number of points that span the full size of the windowpublic static double[] Nuttall4(int points)
points
- The number of points that span the full size of the windowpublic static double[] Kaiser(int points, double alpha)
points
- The number of points that span the full size of the windowalpha
- The standard parameter of the Kaiser familypublic static double Bessel0(double x)
public static double[] Kaiser3(int points)
points
- The number of points that span the full size of the windowpublic static double[] Kaiser4(int points)
points
- The number of points that span the full size of the windowpublic static double[] Kaiser5(int points)
points
- The number of points that span the full size of the windowpublic static double[] Kaiser6(int points)
points
- The number of points that span the full size of the windowpublic static double[] Kaiser7(int points)
points
- The number of points that span the full size of the windowpublic static double[] SFT3F(int points)
points
- The number of points that span the full size of the windowpublic static double[] SFT4F(int points)
points
- The number of points that span the full size of the windowpublic static double[] SFT5F(int points)
points
- The number of points that span the full size of the windowpublic static double[] SFT3M(int points)
points
- The number of points that span the full size of the windowpublic static double[] SFT4M(int points)
points
- The number of points that span the full size of the windowpublic static double[] SFT5M(int points)
points
- The number of points that span the full size of the windowpublic static double[] FTNI(int points)
points
- The number of points that span the full size of the windowpublic static double[] FTHP(int points)
points
- The number of points that span the full size of the windowpublic static double[] FTSRS(int points)
points
- The number of points that span the full size of the windowpublic static double[] HFT70(int points)
points
- The number of points that span the full size of the windowpublic static double[] HFT95(int points)
points
- The number of points that span the full size of the window