From 021ddf275adf896de795ffad662f8debc6857317 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 17 Feb 2014 12:48:37 +0100 Subject: Add histogram_get_data() --- libcrystfel/src/histogram.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libcrystfel/src/histogram.c') 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; -- cgit v1.2.3