aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrystfel/src/histogram.c30
-rw-r--r--libcrystfel/src/histogram.h6
2 files changed, 35 insertions, 1 deletions
diff --git a/libcrystfel/src/histogram.c b/libcrystfel/src/histogram.c
index bd925aea..872c5dca 100644
--- a/libcrystfel/src/histogram.c
+++ b/libcrystfel/src/histogram.c
@@ -244,3 +244,33 @@ void histogram_show(Histogram *hi)
free(bins);
}
+
+
+double histogram_get_min(Histogram *hi)
+{
+ return hi->min;
+}
+
+
+double histogram_get_max(Histogram *hi)
+{
+ return hi->max;
+}
+
+
+void histogram_set_min(Histogram *hi, double min)
+{
+ hi->min = min;
+}
+
+
+void histogram_set_max(Histogram *hi, double max)
+{
+ hi->max = max;
+}
+
+
+void histogram_set_num_bins(Histogram *hi, int n)
+{
+ hi->n_bins = n;
+}
diff --git a/libcrystfel/src/histogram.h b/libcrystfel/src/histogram.h
index bcd000a5..807fb44d 100644
--- a/libcrystfel/src/histogram.h
+++ b/libcrystfel/src/histogram.h
@@ -42,6 +42,10 @@ extern void histogram_add_value(Histogram *hi, double val);
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 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);
#endif /* HISTOGRAM_H */