aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-02-18 00:08:22 +0100
committerThomas White <taw@physics.org>2014-02-18 00:08:22 +0100
commit72e660a608a8b8971a36c16c8f442bce8002fb12 (patch)
tree654a33b291b7be7d92283fc9c657bc17c39e80e5
parenta3c9d5d13729def9da2e1baecdc10b7ff7bd5ada (diff)
Add histogram_get_num_bins()
-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);