edu.jhu.bme.smile.commons.math
Class FieldRegularize
java.lang.Object
edu.jhu.bme.smile.commons.math.FieldRegularize
public class FieldRegularize
- extends java.lang.Object
public class FieldRegularize
This class contains static methods to regularize (smooth) a 2d
field using polynomial basis sets. Float.NaN values indicate points
at which the data in the field should be ignored.
- Author:
- bennett
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FieldRegularize
public FieldRegularize()
isFinite
public static final boolean isFinite(float f)
- Parameters:
f
- - a floating point number
- Returns:
- boolean - true if f is not NaN and is finite
regularize2DChebyshev
public static final float[][] regularize2DChebyshev(int degX,
int degY,
float[][] field)
- Parameters:
degX
- - the number of degrees of freedom in the polynomial for the the x (1st) dimensiondegY
- - the number of degrees of freedom in the polynomial for the the y (2nd) dimensionfield
- - the data to be regularized
- Returns:
- - polynomial fit to the value with Chebyshev polynomials
regularize2DChebyshevWLS
public static final float[][] regularize2DChebyshevWLS(int degX,
int degY,
float[][] field,
float[][] weight)
- Parameters:
degX
- - the number of degrees of freedom in the polynomial for the the x (1st) dimensiondegY
- - the number of degrees of freedom in the polynomial for the the y (2nd) dimensionfield
- - the data to be regularizedweight
- - pixel-by-pixel weightings for polynomial weighting
- Returns:
- - polynomial fit to the value with Chebyshev polynomials using weighted least squares
regularize2DChebyshevWLS
public static final float[][] regularize2DChebyshevWLS(int degX,
int degY,
float[][] field,
float[][] weight,
Matrix result)
- Parameters:
degX
- - the number of degrees of freedom in the polynomial for the the x (1st) dimensiondegY
- - the number of degrees of freedom in the polynomial for the the y (2nd) dimensionfield
- - the data to be regularizedweight
- - pixel-by-pixel weightings for polynomial weightingresult
- - Matrix to be used for storage of the resulting polynomial fit
- Returns:
- - polynomial fit to the value with Chebyshev polynomials using weighted least squares
pseudoInverse
public static Matrix pseudoInverse(Matrix data)
- Parameters:
data
- - input matrix
- Returns:
- the pseudo-inverse of the input matrix