aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/histogram.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2014-02-17 12:48:37 +0100
committerThomas White <taw@bitwiz.org.uk>2014-02-17 12:48:37 +0100
commit021ddf275adf896de795ffad662f8debc6857317 (patch)
tree03e6132ec9e6987a301b2def0f86c6f9a8ea466a /libcrystfel/src/histogram.c
parent512af3db1c82578f0c82275c5cea70e04b9915d4 (diff)
Add histogram_get_data()
Diffstat (limited to 'libcrystfel/src/histogram.c')
-rw-r--r--libcrystfel/src/histogram.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libcrystfel/src/histogram.c b/libcrystfel/src/histogram.c
index ceefbe4b..bd925aea 100644
--- a/libcrystfel/src/histogram.c
+++ b/libcrystfel/src/histogram.c
@@ -167,6 +167,18 @@ static void calc_stddev(Histogram *hi)
}
+int *histogram_get_data(Histogram *hi, double *min, double *max, int *n)
+{
+ calc_bins(hi);
+
+ *n = hi->n_bins;
+ *min = hi->min;
+ *max = hi->max;
+
+ return hi->bins;
+}
+
+
void histogram_show(Histogram *hi)
{
int i;