edu.jhu.bme.smile.commons.math
Class FieldRegularize

java.lang.Object
  extended by 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

Constructor Summary
FieldRegularize()
           
 
Method Summary
static boolean isFinite(float f)
           
static Matrix pseudoInverse(Matrix data)
           
static float[][] regularize2DChebyshev(int degX, int degY, float[][] field)
           
static float[][] regularize2DChebyshevWLS(int degX, int degY, float[][] field, float[][] weight)
           
static float[][] regularize2DChebyshevWLS(int degX, int degY, float[][] field, float[][] weight, Matrix result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldRegularize

public FieldRegularize()
Method Detail

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) dimension
degY - - the number of degrees of freedom in the polynomial for the the y (2nd) dimension
field - - 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) dimension
degY - - the number of degrees of freedom in the polynomial for the the y (2nd) dimension
field - - the data to be regularized
weight - - 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) dimension
degY - - the number of degrees of freedom in the polynomial for the the y (2nd) dimension
field - - the data to be regularized
weight - - pixel-by-pixel weightings for polynomial weighting
result - - 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