|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvec_math.SmoothParabola
public class SmoothParabola
This class searches a smoothened maximum/minimum for a tabulated function, whose extremum can be fitted quite well with a parabola. The procedure is as follows:
slide(vec_math.VectorG[], int, int, double).
| Constructor Summary | |
|---|---|
SmoothParabola()
|
|
| Method Summary | |
|---|---|
private static int |
extremum(VectorG[] data,
int index,
double sign,
int from,
int to)
Searches an extremum. |
static List<Extremum> |
findExtrema(VectorG[] data,
int index)
Scans the entire array for all local minima and maxima, which are returned as a list of Extremums. |
static int |
maximum(VectorG[] data,
int index)
Searches a global maximum. |
static int |
maximum(VectorG[] data,
int index,
int from,
int to)
Searches a global maximum. |
static int |
minimum(VectorG[] data,
int index)
Searches a global minimum. |
static int |
minimum(VectorG[] data,
int index,
int from,
int to)
Searches a global minimum. |
private static int |
slide(VectorG[] data,
int index,
int at,
double sign)
Slides up/down from a given index, until an extremum is reached and returns the index in the array. |
static int |
slideDown(VectorG[] data,
int index,
int around)
Slides from the given index down and returns the minimum index there. |
static int |
slideUp(VectorG[] data,
int index,
int around)
Slides from the given index up and returns the maximum index there. |
static Vector3D |
smoothExtremum(VectorG[] data,
int steps,
int xindex,
int yindex,
int extremum)
We returned a smoothend parabel value by the following way: Around the extremal index (see maximum(vec_math.VectorG[], int) etc), we take
the values +1/-1, if permitted by the array size or two pixel to
the left/right of index.
We fit a parabel through these points and record x and y of
the extremum.
For step trials, we add points from the left/right
of the current active points, whoever is closer to the extremal
value (array size permitting).
For each set of trial points, we fit a regression parabola and
record x and y of the extremum, as well as fwhm^2.
We return the median x, y and fwhm^2 of all parabolas.
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SmoothParabola()
| Method Detail |
|---|
public static int maximum(VectorG[] data,
int index)
data - Each Vector contains the functional value at index i.index - The coordinate index of the vector to search.
public static int maximum(VectorG[] data,
int index,
int from,
int to)
data - Each Vector contains the functional value at index i.index - The coordinate index of the vector to search.
public static int minimum(VectorG[] data,
int index)
data - Each Vector contains the functional value at index i.index - The coordinate index of the vector to search.
public static int minimum(VectorG[] data,
int index,
int from,
int to)
data - Each Vector contains the functional value at index i.index - The coordinate index of the vector to search.
public static int slideUp(VectorG[] data,
int index,
int around)
public static int slideDown(VectorG[] data,
int index,
int around)
private static int slide(VectorG[] data,
int index,
int at,
double sign)
public static List<Extremum> findExtrema(VectorG[] data,
int index)
Extremums. This list can be sorted,
which then returns the highest maximum at list end, the lowest
minimum at index zero. Note that the end and the beginning of the
array (index 0 and len-1) are always in the returned list, though they
might fail the picture of an extremum framed by higher (lower) values.
index - the index in the vector to search.
private static int extremum(VectorG[] data,
int index,
double sign,
int from,
int to)
public static Vector3D smoothExtremum(VectorG[] data,
int steps,
int xindex,
int yindex,
int extremum)
maximum(vec_math.VectorG[], int) etc), we take
the values +1/-1, if permitted by the array size or two pixel to
the left/right of index.step trials, we add points from the left/right
of the current active points, whoever is closer to the extremal
value (array size permitting).
data - The x and y data.steps - The number of steps for smoothing, 0=direct solutionxindex - The index in a vector that holds the independent variable.yindex - The index in a vector that holds the dependent variable.extremum - The index in the array with the extremal vector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||