|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvec_math.LinearSmoothing
vec_math.SavitzkyGolaySmoothing
public class SavitzkyGolaySmoothing
This class provides a Saviztky-Golay Digital Smoothing filter. It is a sort of low-bandpass digital filter that preserves higher moments. For each point fi, a least-square fit of a polynomial of given degree within all points in the smoothing window is generated. The smoothed value, gi is the value of the smoothing polynomial at position i. Typical degrees of the smoothing polynomial are two or four. The smoothing window must not be symmetric around i, in fact it can even extend to only one side of i.
Literature:
Numerical Recipes in C, p. 650ff
| Nested Class Summary | |
|---|---|
static class |
SavitzkyGolaySmoothing.Coeff
We test the calculation of the coefficients. |
static class |
SavitzkyGolaySmoothing.Corot
Reads the specified column of a data file and does a Savitzky-Golay filtering. |
static class |
SavitzkyGolaySmoothing.FM
Test purpose. |
| Nested classes/interfaces inherited from class vec_math.LinearSmoothing |
|---|
LinearSmoothing.File |
| Field Summary | |
|---|---|
protected int |
degree
|
protected int |
derivative
|
private static double[] |
M2L2R2
|
private static double[] |
M2L3R1
|
private static double[] |
M2L4R0
|
private static double[] |
M2L5R5
|
private static double[] |
M4L4R4
|
private static double[] |
M4L5R5
|
private static double[] |
M4L6R0D1
|
| Fields inherited from class vec_math.LinearSmoothing |
|---|
cn, dn, FIR, IIR, nj, nk, type |
| Constructor Summary | |
|---|---|
SavitzkyGolaySmoothing()
Defaults to M2L4R0. |
|
SavitzkyGolaySmoothing(InputStream coef)
This is the version of Savitzky-Golay smoothing that expects pre-calculated coefficients. |
|
SavitzkyGolaySmoothing(int nl,
int nr)
Defaults to a polynomial degree of 2. |
|
SavitzkyGolaySmoothing(int deg,
int nl,
int nr,
int der)
|
|
| Method Summary | |
|---|---|
protected void |
calcInputCoeff(InputStream instream)
This method is called only at construct. |
private static double[] |
calculateCoeff(int nl,
int nr,
int der,
int deg)
|
int |
getDegree()
A method to return the degree of the smoothing polynom. |
int |
getDerivative()
A method to return the derivative of the smoothing polynom. |
protected void |
setType()
Sets the type of this filter. |
| Methods inherited from class vec_math.LinearSmoothing |
|---|
getM, getN, getNj, getNk, getType, isValid, movingAverage, smoothAll, smoothAll, smoothAt |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final double[] M2L2R2
private static final double[] M2L3R1
private static final double[] M2L4R0
private static final double[] M2L5R5
private static final double[] M4L6R0D1
private static final double[] M4L4R4
private static final double[] M4L5R5
protected int degree
protected int derivative
| Constructor Detail |
|---|
public SavitzkyGolaySmoothing()
public SavitzkyGolaySmoothing(int nl,
int nr)
public SavitzkyGolaySmoothing(int deg,
int nl,
int nr,
int der)
public SavitzkyGolaySmoothing(InputStream coef)
coef - The ascii-file holding the smoothing parameters.| Method Detail |
|---|
private static double[] calculateCoeff(int nl,
int nr,
int der,
int deg)
protected void setType()
LinearSmoothing
setType in class LinearSmoothingprotected void calcInputCoeff(InputStream instream)
#SavitzkyGolaySmoothing(File) for valid file formats.
public int getDegree()
public int getDerivative()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||