aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/reflist.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src/reflist.c')
-rw-r--r--libcrystfel/src/reflist.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/libcrystfel/src/reflist.c b/libcrystfel/src/reflist.c
index f6fad33d..7bc98788 100644
--- a/libcrystfel/src/reflist.c
+++ b/libcrystfel/src/reflist.c
@@ -100,6 +100,10 @@ struct _refldata {
/* Redundancy */
int redundancy;
+ /* Peak height and mean background */
+ double peak;
+ double mean_bg;
+
/* User-specified temporary values */
double temp1;
double temp2;
@@ -522,6 +526,33 @@ double get_phase(const Reflection *refl, int *have_phase)
/**
+ * get_peak:
+ * @refl: A %Reflection
+ *
+ * Returns: the peak height (value of the highest pixel, before background
+ * subtraction) for this reflection.
+ *
+ **/
+double get_peak(const Reflection *refl)
+{
+ return refl->data.peak;
+}
+
+
+/**
+ * get_mean_bg:
+ * @refl: A %Reflection
+ *
+ * Returns: the mean background level for this reflection.
+ *
+ **/
+double get_mean_bg(const Reflection *refl)
+{
+ return refl->data.mean_bg;
+}
+
+
+/**
* get_temp1:
* @refl: A %Reflection
*
@@ -721,6 +752,30 @@ void set_phase(Reflection *refl, double phase)
/**
+ * set_peak:
+ * @refl: A %Reflection
+ * @peak: New peak height for the reflection
+ *
+ **/
+void set_peak(Reflection *refl, double peak)
+{
+ refl->data.peak = peak;
+}
+
+
+/**
+ * set_mean_bg:
+ * @refl: A %Reflection
+ * @mean_bg: New peak height for the reflection
+ *
+ **/
+void set_mean_bg(Reflection *refl, double mean_bg)
+{
+ refl->data.mean_bg = mean_bg;
+}
+
+
+/**
* set_symmetric_indices:
* @refl: A %Reflection
* @hs: The 'h' index of the reflection