From d19b76d1bc976ab762f74b20c0f2513338cbbfd5 Mon Sep 17 00:00:00 2001 From: rivers Date: Mon, 22 Mar 2010 17:31:17 +0000 Subject: [PATCH] Major changes, rewrite from old ROI plugin docs git-svn-id: https://subversion.xor.aps.anl.gov/synApps/areaDetector/trunk@10301 dc6c5ff5-0b8b-c028-a01f-ffb33f00fc8b --- documentation/NDPluginStats.html | 236 ++++++++++++++++++++++--------- 1 file changed, 172 insertions(+), 64 deletions(-) diff --git a/documentation/NDPluginStats.html b/documentation/NDPluginStats.html index 0d9948a..2219dfb 100755 --- a/documentation/NDPluginStats.html +++ b/documentation/NDPluginStats.html @@ -2,7 +2,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - areaDetector Plugin NDPluginROI + areaDetector Plugin NDPluginStats @@ -10,7 +10,7 @@

areaDetector Plugin NDPluginStats

- March 7, 2010

+ March 20, 2010

Mark Rivers

@@ -27,19 +27,22 @@ 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 calculationscan be enabled or disabled independently. + 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.

- NDPluginROI inherits from NDPluginDriver. The + NDPluginStats inherits from NDPluginDriver. The NDPluginStats class documentation describes this class in detail.

- NDPluginStats.h defines the following parameters. It also implements all of the standard plugin parameters from - NDPluginDriver. The EPICS database NDStats.template provide access to these - parameters, listed in the following table. + NDPluginStats.h defines the following parameters. It also implements all of the + standard plugin parameters from NDPluginDriver. + The EPICS database NDStats.template provide access to these parameters, listed in + the following table. Note that to reduce the width of this table the enum names + have been split into 2 lines, but these are just a single name, for example + NDPluginStatsComputeStatistics.

@@ -49,7 +52,7 @@ + Parameter index variable + + + + + + + + + + + + @@ -85,34 +115,14 @@ - - - - - - - - - + Minimum value in any element in the array + Maximum value in any element in the array + Mean value in the array + Sum (total) of all elements in the array @@ -196,14 +205,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + X centroid of the array above the centroid threshold. + Y centroid of the array above the centroid threshold. - + + + + + + + + + + + + + + + + + + + @@ -254,7 +362,7 @@ @@ -273,7 +381,7 @@ @@ -293,7 +401,7 @@ @@ -313,7 +421,7 @@ @@ -333,7 +441,7 @@ @@ -353,8 +461,8 @@

Configuration

- The NDPluginROI plugin is created with the NDStatsConfigure command, either from C/C++ - or from the EPICS IOC shell.

+ 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,
                const char *NDArrayPort, int NDArrayAddr,
@@ -363,9 +471,9 @@ NDStatsConfigure(const char *portName, int queueSize, int blockingCallbacks,
   

For details on the meaning of the parameters to this function refer to the detailed - documentation on the NDROIConfigure function in the + documentation on the NDStatsConfigure function in the NDPluginStats.cpp documentation and in the documentation for the constructor - for the NDPluginStats + for the NDPluginStats class.

@@ -376,7 +484,7 @@ NDStatsConfigure(const char *portName, int queueSize, int blockingCallbacks,

- NDROI.adl

+ NDStats.adl

NDStats.png
- Enum name asyn interface @@ -63,9 +66,36 @@ EPICS record type
+ Basic statistics
- NDPluginROI
+ NDPluginStats
+ ComputeStatistics
+ asynInt32 + r/w + 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. + COMPUTE_STATISTICS + $(P)$(R)ComputeStatistics
+ $(P)$(R)ComputeStatistics_RBV
+ bo
+ bi
+ NDPluginStats
BgdWidth
asynInt32
- NDPluginROI
- ComputeStatistics
- asynInt32 - r/w - Flag to control whether to compute statistics for this ROI (0=No, 1=Yes). Not computing - statistics reduces CPU load. - COMPUTE_STATISTICS - $(P)$(R)ComputeStatistics
- $(P)$(R)ComputeStatistics_RBV
- bo
- bi
- NDPluginROI
+ NDPluginStats
MinValue
asynFloat64 r/o - Minimum value in any element in the ROI MIN_VALUE @@ -122,14 +132,14 @@
- NDPluginROI
+ NDPluginStats
MaxValue
asynFloat64 r/o - Maximum value in any element in the ROI MAX_VALUE @@ -139,14 +149,14 @@
- NDPluginROI
+ NDPluginStats
MeanValue
asynFloat64 r/o - Mean value in the ROI MEAN_VALUE @@ -156,14 +166,14 @@
- NDPluginROI
+ NDPluginStats
Total
asynFloat64 r/o - Sum (total) of all elements in the ROI TOTAL @@ -173,19 +183,18 @@
- NDPluginROI
+ NDPluginStats
Net
asynFloat64 r/o - Net (background subtracted) total of all elements in the ROI. The background is + Net (background subtracted) total of all elements in the array. The background is calculated by determining the average counts per array element in a border around - the ROI of width NDPluginROIBgdWidth. This average background counts per element - is then subtracted from all elements inside the ROI. If NDPluginROIBgdWidth is ≤ - 0 then no background is computed. Note that this background subtraction is done - after the "array" background is subtracted if EnableBackground=1, as described above. + the array of width NDPluginStatsBgdWidth. This average background counts per element + is then subtracted from all elements inside the array. If NDPluginStatsBgdWidth + is ≤ 0 then no background is computed. NET
- NDPluginROI
+ NDPluginStats
+ SigmaValue
+ asynFloat64 + r/o + Sigma (standard deviation) of all elements in the array + SIGMA_VALUE + $(P)$(R)Sigma_RBV + ai
+ Centroid statistics
+ NDPluginStats
+ ComputeCentroid
+ asynInt32 + 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. + COMPUTE_CENTROID + $(P)$(R)ComputeCentroid
+ $(P)$(R)ComputeCentroid_RBV
+ bo
+ bi
+ NDPluginStats
+ CentroidThreshold
+ asynFloat64 + r/w + Threshold used when computing the centroid statistics. All array elements less than + this value are set to 0 for computing the centroid statistics. It is important to + set this value to ignore the "background" when computing the position and size of + a "beam" image, for example. + CENTROID_THRESHOLD + $(P)$(R)CentroidThreshold
+ $(P)$(R)CentroidThreshold_RBV
+ ao
+ ai
+ NDPluginStats
CentroidX
asynFloat64 r/o - X centroid of the ROI. CENTROIDX_VALUE @@ -213,14 +287,14 @@
- NDPluginROI
+ NDPluginStats
CentroidY
asynFloat64 r/o - Y centroid of the ROI. CENTROIDY_VALUE @@ -229,19 +303,53 @@ ai
- ROI histogram + NDPluginStats
+ SigmaX
+ asynFloat64 + r/o + Sigma X (width) of the distribution above the centroid threshold. + SIGMAX_VALUE + $(P)$(R)SigmaX_RBV + ai
- NDPluginROI
+ NDPluginStats
+ SigmaY
+ asynFloat64 + r/o + Sigma Y (height) of the distribution above the centroid threshold. + SIGMAY_VALUE + $(P)$(R)SigmaY_RBV + ai
+ Array histogram
+ NDPluginStats
ComputeHistogram
asynInt32 r/w - Flag to control whether to compute the histogram for this ROI (0=No, 1=Yes). Not + Flag to control whether to compute the histogram for this array (0=No, 1=Yes). Not computing the histogram reduces CPU load. COMPUTE_HISTOGRAM
- NDPluginROI
+ NDPluginStats
HistSize
asynInt32
- NDPluginROI
+ NDPluginStats
HistMin
asynFloat64
- NDPluginROI
+ NDPluginStats
HistMax
asynFloat64
- NDPluginROI
+ NDPluginStats
HistEntropy
asynFloat64
- NDPluginROI
+ NDPluginStats
HistArray
asynFloat64Array