aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrystfel/src/histogram.c6
-rw-r--r--libcrystfel/src/histogram.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/libcrystfel/src/histogram.c b/libcrystfel/src/histogram.c
index 872c5dca..026bf43e 100644
--- a/libcrystfel/src/histogram.c
+++ b/libcrystfel/src/histogram.c
@@ -258,6 +258,12 @@ double histogram_get_max(Histogram *hi)
}
+int histogram_get_num_bins(Histogram *hi)
+{
+ return hi->n_bins;
+}
+
+
void histogram_set_min(Histogram *hi, double min)
{
hi->min = min;
diff --git a/libcrystfel/src/histogram.h b/libcrystfel/src/histogram.h
index 807fb44d..1b6f6bb0 100644
--- a/libcrystfel/src/histogram.h
+++ b/libcrystfel/src/histogram.h
@@ -44,6 +44,7 @@ extern void histogram_show(Histogram *hi);
extern int *histogram_get_data(Histogram *hi, double *min, double *max, int *n);
extern double histogram_get_min(Histogram *hi);
extern double histogram_get_max(Histogram *hi);
+extern int histogram_get_num_bins(Histogram *hi);
extern void histogram_set_min(Histogram *hi, double min);
extern void histogram_set_max(Histogram *hi, double max);
extern void histogram_set_num_bins(Histogram *hi, int n);