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
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>areaDetector Plugin NDPluginROI</title>
|
||||
<title>areaDetector Plugin NDPluginStats</title>
|
||||
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
|
||||
</head>
|
||||
<body>
|
||||
@@ -10,7 +10,7 @@
|
||||
<h1>
|
||||
areaDetector Plugin NDPluginStats</h1>
|
||||
<h2>
|
||||
March 7, 2010</h2>
|
||||
March 20, 2010</h2>
|
||||
<h2>
|
||||
Mark Rivers</h2>
|
||||
<h2>
|
||||
@@ -27,19 +27,22 @@
|
||||
Overview
|
||||
</h2>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
NDPluginROI inherits from NDPluginDriver. The <a href="areaDetectorDoxygenHTML/class_n_d_plugin_stats.html">
|
||||
NDPluginStats inherits from NDPluginDriver. The <a href="areaDetectorDoxygenHTML/class_n_d_plugin_stats.html">
|
||||
NDPluginStats class documentation</a> describes this class in detail.
|
||||
</p>
|
||||
<p>
|
||||
NDPluginStats.h defines the following parameters. It also implements all of the standard plugin parameters from <a href="pluginDoc.html#NDPluginDriver">
|
||||
NDPluginDriver</a>. 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 <a href="pluginDoc.html#NDPluginDriver">NDPluginDriver</a>.
|
||||
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 <code>
|
||||
NDPluginStatsComputeStatistics</code>.
|
||||
</p>
|
||||
<table border="1" cellpadding="2" cellspacing="2" style="text-align: left">
|
||||
<tbody>
|
||||
@@ -49,7 +52,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Enum name</th>
|
||||
Parameter index variable</th>
|
||||
<th>
|
||||
asyn interface</th>
|
||||
<th>
|
||||
@@ -63,9 +66,36 @@
|
||||
<th>
|
||||
EPICS record type</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="7,">
|
||||
<b>Basic statistics</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginROI<br />
|
||||
NDPluginStats<br />
|
||||
ComputeStatistics</td>
|
||||
<td>
|
||||
asynInt32</td>
|
||||
<td>
|
||||
r/w</td>
|
||||
<td>
|
||||
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.</td>
|
||||
<td>
|
||||
COMPUTE_STATISTICS</td>
|
||||
<td>
|
||||
$(P)$(R)ComputeStatistics<br />
|
||||
$(P)$(R)ComputeStatistics_RBV</td>
|
||||
<td>
|
||||
bo<br />
|
||||
bi</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginStats<br />
|
||||
BgdWidth</td>
|
||||
<td>
|
||||
asynInt32</td>
|
||||
@@ -85,34 +115,14 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginROI<br />
|
||||
ComputeStatistics</td>
|
||||
<td>
|
||||
asynInt32</td>
|
||||
<td>
|
||||
r/w</td>
|
||||
<td>
|
||||
Flag to control whether to compute statistics for this ROI (0=No, 1=Yes). Not computing
|
||||
statistics reduces CPU load.</td>
|
||||
<td>
|
||||
COMPUTE_STATISTICS</td>
|
||||
<td>
|
||||
$(P)$(R)ComputeStatistics<br />
|
||||
$(P)$(R)ComputeStatistics_RBV</td>
|
||||
<td>
|
||||
bo<br />
|
||||
bi</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginROI<br />
|
||||
NDPluginStats<br />
|
||||
MinValue</td>
|
||||
<td>
|
||||
asynFloat64</td>
|
||||
<td>
|
||||
r/o</td>
|
||||
<td>
|
||||
Minimum value in any element in the ROI</td>
|
||||
Minimum value in any element in the array</td>
|
||||
<td>
|
||||
MIN_VALUE</td>
|
||||
<td>
|
||||
@@ -122,14 +132,14 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginROI<br />
|
||||
NDPluginStats<br />
|
||||
MaxValue</td>
|
||||
<td>
|
||||
asynFloat64</td>
|
||||
<td>
|
||||
r/o</td>
|
||||
<td>
|
||||
Maximum value in any element in the ROI</td>
|
||||
Maximum value in any element in the array</td>
|
||||
<td>
|
||||
MAX_VALUE</td>
|
||||
<td>
|
||||
@@ -139,14 +149,14 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginROI<br />
|
||||
NDPluginStats<br />
|
||||
MeanValue</td>
|
||||
<td>
|
||||
asynFloat64</td>
|
||||
<td>
|
||||
r/o</td>
|
||||
<td>
|
||||
Mean value in the ROI</td>
|
||||
Mean value in the array</td>
|
||||
<td>
|
||||
MEAN_VALUE</td>
|
||||
<td>
|
||||
@@ -156,14 +166,14 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginROI<br />
|
||||
NDPluginStats<br />
|
||||
Total</td>
|
||||
<td>
|
||||
asynFloat64</td>
|
||||
<td>
|
||||
r/o</td>
|
||||
<td>
|
||||
Sum (total) of all elements in the ROI</td>
|
||||
Sum (total) of all elements in the array</td>
|
||||
<td>
|
||||
TOTAL</td>
|
||||
<td>
|
||||
@@ -173,19 +183,18 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginROI<br />
|
||||
NDPluginStats<br />
|
||||
Net</td>
|
||||
<td>
|
||||
asynFloat64</td>
|
||||
<td>
|
||||
r/o</td>
|
||||
<td>
|
||||
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.
|
||||
</td>
|
||||
<td>
|
||||
NET</td>
|
||||
@@ -196,14 +205,79 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginROI<br />
|
||||
NDPluginStats<br />
|
||||
SigmaValue</td>
|
||||
<td>
|
||||
asynFloat64</td>
|
||||
<td>
|
||||
r/o</td>
|
||||
<td>
|
||||
Sigma (standard deviation) of all elements in the array</td>
|
||||
<td>
|
||||
SIGMA_VALUE</td>
|
||||
<td>
|
||||
$(P)$(R)Sigma_RBV</td>
|
||||
<td>
|
||||
ai</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="7,">
|
||||
<b>Centroid statistics</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginStats<br />
|
||||
ComputeCentroid</td>
|
||||
<td>
|
||||
asynInt32</td>
|
||||
<td>
|
||||
r/w</td>
|
||||
<td>
|
||||
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.</td>
|
||||
<td>
|
||||
COMPUTE_CENTROID</td>
|
||||
<td>
|
||||
$(P)$(R)ComputeCentroid<br />
|
||||
$(P)$(R)ComputeCentroid_RBV</td>
|
||||
<td>
|
||||
bo<br />
|
||||
bi</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginStats<br />
|
||||
CentroidThreshold</td>
|
||||
<td>
|
||||
asynFloat64</td>
|
||||
<td>
|
||||
r/w</td>
|
||||
<td>
|
||||
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.</td>
|
||||
<td>
|
||||
CENTROID_THRESHOLD</td>
|
||||
<td>
|
||||
$(P)$(R)CentroidThreshold<br />
|
||||
$(P)$(R)CentroidThreshold_RBV</td>
|
||||
<td>
|
||||
ao<br />
|
||||
ai</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginStats<br />
|
||||
CentroidX</td>
|
||||
<td>
|
||||
asynFloat64</td>
|
||||
<td>
|
||||
r/o</td>
|
||||
<td>
|
||||
X centroid of the ROI.</td>
|
||||
X centroid of the array above the centroid threshold.</td>
|
||||
<td>
|
||||
CENTROIDX_VALUE</td>
|
||||
<td>
|
||||
@@ -213,14 +287,14 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginROI<br />
|
||||
NDPluginStats<br />
|
||||
CentroidY</td>
|
||||
<td>
|
||||
asynFloat64</td>
|
||||
<td>
|
||||
r/o</td>
|
||||
<td>
|
||||
Y centroid of the ROI.</td>
|
||||
Y centroid of the array above the centroid threshold.</td>
|
||||
<td>
|
||||
CENTROIDY_VALUE</td>
|
||||
<td>
|
||||
@@ -229,19 +303,53 @@
|
||||
ai</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="7,">
|
||||
<b>ROI histogram</b></td>
|
||||
<td>
|
||||
NDPluginStats<br />
|
||||
SigmaX</td>
|
||||
<td>
|
||||
asynFloat64</td>
|
||||
<td>
|
||||
r/o</td>
|
||||
<td>
|
||||
Sigma X (width) of the distribution above the centroid threshold.</td>
|
||||
<td>
|
||||
SIGMAX_VALUE</td>
|
||||
<td>
|
||||
$(P)$(R)SigmaX_RBV</td>
|
||||
<td>
|
||||
ai</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginROI<br />
|
||||
NDPluginStats<br />
|
||||
SigmaY</td>
|
||||
<td>
|
||||
asynFloat64</td>
|
||||
<td>
|
||||
r/o</td>
|
||||
<td>
|
||||
Sigma Y (height) of the distribution above the centroid threshold.</td>
|
||||
<td>
|
||||
SIGMAY_VALUE</td>
|
||||
<td>
|
||||
$(P)$(R)SigmaY_RBV</td>
|
||||
<td>
|
||||
ai</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="7,">
|
||||
<b>Array histogram</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginStats<br />
|
||||
ComputeHistogram</td>
|
||||
<td>
|
||||
asynInt32</td>
|
||||
<td>
|
||||
r/w</td>
|
||||
<td>
|
||||
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.</td>
|
||||
<td>
|
||||
COMPUTE_HISTOGRAM</td>
|
||||
@@ -254,7 +362,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginROI<br />
|
||||
NDPluginStats<br />
|
||||
HistSize</td>
|
||||
<td>
|
||||
asynInt32</td>
|
||||
@@ -273,7 +381,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginROI<br />
|
||||
NDPluginStats<br />
|
||||
HistMin</td>
|
||||
<td>
|
||||
asynFloat64</td>
|
||||
@@ -293,7 +401,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginROI<br />
|
||||
NDPluginStats<br />
|
||||
HistMax</td>
|
||||
<td>
|
||||
asynFloat64</td>
|
||||
@@ -313,7 +421,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginROI<br />
|
||||
NDPluginStats<br />
|
||||
HistEntropy</td>
|
||||
<td>
|
||||
asynFloat64</td>
|
||||
@@ -333,7 +441,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
NDPluginROI<br />
|
||||
NDPluginStats<br />
|
||||
HistArray</td>
|
||||
<td>
|
||||
asynFloat64Array</td>
|
||||
@@ -353,8 +461,8 @@
|
||||
<h2 id="Configuration">
|
||||
Configuration</h2>
|
||||
<p>
|
||||
The NDPluginROI plugin is created with the NDStatsConfigure command, either from C/C++
|
||||
or from the EPICS IOC shell.</p>
|
||||
The NDPluginStats plugin is created with the NDStatsConfigure command, either from
|
||||
C/C++ or from the EPICS IOC shell.</p>
|
||||
<pre>
|
||||
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,
|
||||
</pre>
|
||||
<p>
|
||||
For details on the meaning of the parameters to this function refer to the detailed
|
||||
documentation on the NDROIConfigure function in the <a href="areaDetectorDoxygenHTML/_n_d_plugin_r_o_i_8cpp.html">
|
||||
documentation on the NDStatsConfigure function in the <a href="areaDetectorDoxygenHTML/_n_d_plugin_stats_8cpp.html">
|
||||
NDPluginStats.cpp documentation</a> and in the documentation for the constructor
|
||||
for the <a href="areaDetectorDoxygenHTML/class_n_d_plugin_r_o_i.html">NDPluginStats
|
||||
for the <a href="areaDetectorDoxygenHTML/class_n_d_plugin_stats.html">NDPluginStats
|
||||
class</a>.
|
||||
</p>
|
||||
<h2 id="Screens">
|
||||
@@ -376,7 +484,7 @@ NDStatsConfigure(const char *portName, int queueSize, int blockingCallbacks,
|
||||
</p>
|
||||
<div style="text-align: center">
|
||||
<h3>
|
||||
NDROI.adl</h3>
|
||||
NDStats.adl</h3>
|
||||
<img alt="NDStats.png" src="NDStats.png" />
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user