Class ProfileDataStatistics
Computes statistical properties of profile data.
Define the weighted, central summation Sn(μ)
as
Sn(μ) =
Σk(k -
μ)nfk
where {fk} is the set of discrete samples for a
projection view (that is, the discrete function representing the projection).
Then the quantities provided by this class are typically some ratio of the
Sn(μ) for a combination of parameters
(n,μ). For example, the nth central moment
moment, denoted <(x - μ)n>, is defined
as
<(x - μ)n> =
Sn(μ)/S0(0)
Note that the units of the moments will be in terms of
samples (see below). For example, the value returned by the
method getCenter(ProfileData.Angle) is the index location of the
center of mass. Note further that although the indices are integer valued,
the statistic values in units of samples
need not be.
NOTE:
- The quantities provided by this class are for discrete system. When
considering these systems as approximations for continuous systems (sampled
data systems) then we must "unnormalized" the results by the sampling
interval h. For example, to convert <(x -
μ)n> to the continuous approximation the value
must be multiplied by hn.
- The above conversions are not provided by methods in
this class. There are, however, methods for computing the sampling length
h for the various axes and actuator positions. The rationale for not
providing this service at present is the profile data sets might not contain
the axis positions, as these are version-sensitive data. Thus, such methods
have the potential for returning erroneous results.
- Higher-order moments are highly sensitive to signal noise.
- Strongly peaked distributions create numerically unstable computations.
In general, for accurate numerical results the distribution should have a
standard deviation σ > 2. Standard deviations smaller than
this value imply that the sampling interval is too large.
- Author:
- Christopher K. Allen
-
Constructor Summary
ConstructorsConstructorDescriptionProfileDataStatistics(ProfileData pdoData) Create a newProfileDataStatisticsobject and attach it to the given profile data set. -
Method Summary
Modifier and TypeMethodDescriptiondoubleCompute and return the average step size between actuator positions for the entire sample projection sample set.doubleCompute and return the average step size between axis sample positions for the given projection view.doublecompStdDev(ProfileData.Angle view) Return the (normalized) standard deviation σ of the given projection.doublecomputeCentralMoment(int intOrder, ProfileData.Angle view) Compute and return the indicated central moment for the given projection data.doublecomputeMoment(int intOrder, ProfileData.Angle view) Compute and return the indicated moment for the given projection data.doublecomputeWeightedSum(int intOrder, double dblCntr, ProfileData.Angle view) Compute and return the weighted central summation Sn(μ) which is defined
Sn(μ) = Σk(k - μ)nfkdoubleReturn the initial actuator position, that is the actuator location x0 of the first sample.doubleReturn the initial axis position for the given projection angle, that is the axis location x0 of the first sample.doublegetCenter(ProfileData.Angle view) Return the (normalized) center of mass (i.e., the first moment) for the given projection.doublegetMass(ProfileData.Angle view) Return the total mass (i.e., the first integral, or zeroth moment) of the given projection.
-
Constructor Details
-
ProfileDataStatistics
Create a newProfileDataStatisticsobject and attach it to the given profile data set.
-
-
Method Details
-
getMass
Return the total mass (i.e., the first integral, or zeroth moment) of the given projection.
NOTE:
- The returned value is for a discrete function and must be treated as a "normalized" quantity when considering sampled data from a continuous system. To convert to the continuous approximation the returned value must be multiplied by h where h is the sampling interval.- Parameters:
view- projection data- Returns:
- the value S0(0)
-
getCenter
Return the (normalized) center of mass (i.e., the first moment) for the given projection.
NOTE:
- The returned value is for a discrete function and must be treated as a "normalized" quantity when considering sampled data from a continuous system. To convert to the continuous approximation for <x> the returned value must be multiplied by h where h is the sampling interval.
- To convert to the center of the projection axis indicated by view, the returned value must be multiply by h then offset by x0, the left-hand axis end-point.- Parameters:
view- projection data- Returns:
- the value S1(0)/S0(0) in
-
getActuatorOffset
public double getActuatorOffset()Return the initial actuator position, that is the actuator location x0 of the first sample.- Returns:
- initial position of the actuator
-
getAxisOffset
Return the initial axis position for the given projection angle, that is the axis location x0 of the first sample.- Returns:
- initial axis position for the given viewing angle
-
compAveActuatorStepSize
public double compAveActuatorStepSize()Compute and return the average step size between actuator positions for the entire sample projection sample set. This value is given by
(xN-1 - x0)/(N - 1)
where N is the number of sample points and {xk} are the actuator positions.NOTE:
- The above result is the same as computing the steps size hk = xk - xk-1 between each sample then averaging the set.- Returns:
- average step length between actuator positions
-
compAveAxisStepSize
Compute and return the average step size between axis sample positions for the given projection view. This value is given by
(xN-1 - x0)/(N - 1)
where N is the number of sample points and {xk} are the axis positions.NOTE:
- The above result is the same as computing the steps size hk = xk - xk-1 between each sample then averaging the set.- Returns:
- average step length between axis sample positions
-
compStdDev
Return the (normalized) standard deviation σ of the given projection. The standard deviation is defined as
σ = <(x - μ)2>½
NOTE:
- The returned value is for a discrete function and must be treated as a "normalized" quantity when considering sampled data from a continuous system. To convert to the continuous approximation for σ the returned value must be multiplied by h where h is the sampling interval.
- Because of signal noise and numerical rounding it is possible to compute a value for <(x - μ)2> which is less than zero. Such an occurrence indicates either that sampling interval h is too large, or that the signal-to-noise ratio is too small to permit meaningful results. A zero value is returned in this situation.- Parameters:
view- project data to analyze- Returns:
- standard deviation of given view, or zero if undefined
-
computeMoment
Compute and return the indicated moment for the given projection data. The value of the returned moment <xn> is defined as
<xn> = Sn(0)/S0(0)
NOTE:
- The returned value is for a discrete function and must be treated as a "normalized" quantity when considering sampled data from a continuous system. To convert to the continuous approximation for <xn> the returned value must be multiplied by hn where h is the sampling interval.- Parameters:
intOrder- moment orderview- project data to analyze- Returns:
- moment of given view
-
computeCentralMoment
Compute and return the indicated central moment for the given projection data. The value of the returned moment <(x - μ)n> is defined as
<(x - μ)n> = Sn(μ)/S0(0)
NOTE:
- The returned value is for a discrete function and must be treated as a "normalized" quantity when considering sampled data from a continuous system. To convert to the continuous approximation for <(x - μ)n> the returned value must be multiplied by hn where h is the sampling interval.- Parameters:
intOrder- moment orderview- project data to analyze- Returns:
- moment of given view
-
computeWeightedSum
Compute and return the weighted central summation Sn(μ) which is defined
Sn(μ) = Σk(k - μ)nfk
- Parameters:
intOrder- order of the summation weight (i.e., n)dblCntr- center of the summation weight (i.e., μ)view- projection view angle (i.e., the set {fk})- Returns:
- the value Sn(μ) as defined above
-