diff --git a/documentation/NDPluginStats.html b/documentation/NDPluginStats.html
index e849d31..29441d9 100755
--- a/documentation/NDPluginStats.html
+++ b/documentation/NDPluginStats.html
@@ -27,10 +27,26 @@
Overview
- NDPluginStats computes array statistics, including minimum, maximum, mean, sigma,
- total, net (background subtracted), and centroid values. It can also compute a histogram
- of the values (e.g. number of pixels versus intensity per pixel). The basic statistics,
- centroid, and histogram calculations can be enabled or disabled independently.
+ NDPluginStats computes the following.
+
+
+ - Basic statistics: minimum, maximum, mean, sigma, total, and net (background subtracted).
+ - Centroid and sigma values in the X and Y dimensions.
+ - Profiles of the array in the X and Y dimensions. A total of 8 profiles are calculated:
+
+ - The average profiles in the X and Y directions.
+ - The average profiles in the X and Y directions, for array elements greater than
+ the centroid threshold.
+ - The profiles in the X and Y directions at the X and Y centroid position.
+ - The profiles in the X and Y directions at a user-defined X and Y cursor position.
+
+
+ - A histogram of the values (e.g. number of pixels versus intensity per pixel).
+
+
+ Each calculcation can independently enabled and disabled. Calculations 1 and 4 can
+ be perfomed on arrays of any dimension. Calculations 2 and 3 are restricted to 2-D
+ arrays.
NDPluginStats inherits from NDPluginDriver. The
@@ -82,8 +98,7 @@
Flag to control whether to compute statistics for this array (0=No, 1=Yes). Not
computing statistics reduces CPU load. Basic statistics computations are quite fast,
since they involve mostly double precision addition, with 1 multiply to compute
- sigma, per array element. Setting this to No will disable both basic statistics
- and centroid statistics, but will not disable histogram calculation.
+ sigma, per array element.
COMPUTE_STATISTICS |
@@ -233,10 +248,10 @@
|
r/w |
- Flag to control whether to compute the centroid statistics (0=No, 1=Yes). Centroid
- calculations require several double precision multiplications per array element,
- so not computing these reduces CPU load. In order for centroid statistics to be
- computed both ComputeStatistics and ComputeCentroid must be set to Yes. |
+ Flag to control whether to compute the centroid statistics (0=No, 1=Yes). The centroids
+ are computed from the average row and column profiles above the centroid threshold.
+ These calculations are also quite fast, since they just involve addition operations
+ for each array element.
COMPUTE_CENTROID |
@@ -336,6 +351,241 @@
|
ai |
+
+ |
+ X and Y Profiles |
+
+
+
+ NDPluginStats
+ ComputeProfiles |
+
+ asynInt32 |
+
+ r/w |
+
+ Flag to control whether to compute the profiles for this array (0=No, 1=Yes). |
+
+ COMPUTE_PROFILES |
+
+ $(P)$(R)ComputeProfiles
+ $(P)$(R)ComputeProfiles_RBV |
+
+ bo
+ bi |
+
+
+
+ NDPluginStats
+ ProfileSizeX |
+
+ asynInt32 |
+
+ r/w |
+
+ Number of array elements in the X profiles. |
+
+ PROFILE_SIZE_X |
+
+ $(P)$(R)ProfileSizeX_RBV |
+
+ longin |
+
+
+
+ NDPluginStats
+ ProfileSizeY |
+
+ asynInt32 |
+
+ r/w |
+
+ Number of array elements in the Y profiles. |
+
+ PROFILE_SIZE_Y |
+
+ $(P)$(R)ProfileSizeY_RBV |
+
+ longin |
+
+
+
+ NDPluginStats
+ CursorX |
+
+ asynInt32 |
+
+ r/w |
+
+ X position of a user-defined cursor for profiles. |
+
+ CURSOR_X |
+
+ $(P)$(R)CursorX
+ $(P)$(R)CursorX_RBV |
+
+ longout
+ longin |
+
+
+
+ NDPluginStats
+ CursorY |
+
+ asynInt32 |
+
+ r/w |
+
+ Y position of a user-defined cursor for profiles. |
+
+ CURSOR_Y |
+
+ $(P)$(R)CursorY
+ $(P)$(R)CursorY_RBV |
+
+ longout
+ longin |
+
+
+
+ NDPluginStats
+ ProfileAverageX |
+
+ asynFloat64Array |
+
+ r/o |
+
+ Profile of the average row in the array, i.e. the sum of all rows in the array divided
+ by the number of rows. |
+
+ PROFILE_AVERAGE_X |
+
+ $(P)$(R)ProfileAverageX_RBV |
+
+ waveform |
+
+
+
+ NDPluginStats
+ ProfileAverageY |
+
+ asynFloat64Array |
+
+ r/o |
+
+ Profile of the average column in the array, i.e. the sum of all columns in the array
+ divided by the number of columns. |
+
+ PROFILE_AVERAGE_Y |
+
+ $(P)$(R)ProfileAverageY_RBV |
+
+ waveform |
+
+
+
+ NDPluginStats
+ ProfileThresholdX |
+
+ asynFloat64Array |
+
+ r/o |
+
+ Same as ProfileAverageX except that all array elements less than CentroidThreshold
+ are set to zero when computing the average. |
+
+ PROFILE_THRESHOLD_X |
+
+ $(P)$(R)ProfileThresholdX_RBV |
+
+ waveform |
+
+
+
+ NDPluginStats
+ ProfileThresholdY |
+
+ asynFloat64Array |
+
+ r/o |
+
+ Same as ProfileAverageY except that all array elements less than CentroidThreshold
+ are set to zero when computing the average. |
+
+ PROFILE_THRESHOLD_Y |
+
+ $(P)$(R)ProfileThresholdY_RBV |
+
+ waveform |
+
+
+
+ NDPluginStats
+ ProfileCentroidX |
+
+ asynFloat64Array |
+
+ r/o |
+
+ X profile through the array in the row defined by CentroidY. |
+
+ PROFILE_CENTROID_X |
+
+ $(P)$(R)ProfileCentroidX_RBV |
+
+ waveform |
+
+
+
+ NDPluginStats
+ ProfileCentroidY |
+
+ asynFloat64Array |
+
+ r/o |
+
+ Y profile through the array in the column defined by CentroidX. |
+
+ PROFILE_CENTROID_Y |
+
+ $(P)$(R)ProfileCentroidY_RBV |
+
+ waveform |
+
+
+
+ NDPluginStats
+ ProfileCursorX |
+
+ asynFloat64Array |
+
+ r/o |
+
+ X profile through the array in the row defined by CursorY. |
+
+ PROFILE_CURSOR_X |
+
+ $(P)$(R)ProfileCursorX_RBV |
+
+ waveform |
+
+
+
+ NDPluginStats
+ ProfileCursorY |
+
+ asynFloat64Array |
+
+ r/o |
+
+ Y profile through the array in the row defined by CursorX. |
+
+ PROFILE_CURSOR_Y |
+
+ $(P)$(R)ProfileCursorY_RBV |
+
+ waveform |
+
|
Array histogram |
@@ -458,13 +708,18 @@
+
+ If the values of CentroidThreshold, CursorX, or CursorY are changed then the centroid
+ and profile calculations are performed again immediately on the last array collected.
+ Thus updated centroid statistics and profiles can be displayed even when new arrays
+ are not being acquired. These calculations are only performed when enabled by ComputeCentroid
+ and ComputeProfiles.
Configuration
The NDPluginStats plugin is created with the NDStatsConfigure command, either from
C/C++ or from the EPICS IOC shell.
-
-NDStatsConfigure(const char *portName, int queueSize, int blockingCallbacks,
+ NDStatsConfigure(const char *portName, int queueSize, int blockingCallbacks,
const char *NDArrayPort, int NDArrayAddr,
int maxBuffers, size_t maxMemory,
int priority, int stackSize)
@@ -479,7 +734,7 @@ NDStatsConfigure(const char *portName, int queueSize, int blockingCallbacks,
Screen shots
- The following is the MEDM screen that provides access to the parameters in NDPluginDriver.h
+ The following MEDM screen provides access to the parameters in NDPluginDriver.h
and NDPluginStats.h through records in NDPluginBase.template and NDStats.template.
@@ -487,5 +742,39 @@ NDStatsConfigure(const char *portName, int queueSize, int blockingCallbacks,
NDStats.adl
+
+ The following MEDM screen shows the average profile of an image in the X direction.
+
+
+
+ NDPlot.adl
+

+
+
+ The following MEDM screen shows the profile of an image in the Y direction at the
+ location of the user-defined cursor.
+
+
+
+ NDPlot.adl
+

+
+
+ The following MEDM screen shows the histogram of intensities of an array.
+
+
+
+ NDPlot.adl
+

+
+
+ The following MEDM screen combines many parameters for 5 NDPluginStats plugins on
+ a single screen.
+
+
+
+ NDStats5.adl
+

+