From ee2a9703c723d807c4e590906ab6a45868651a81 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 3 Mar 2014 15:44:26 +0100 Subject: Include background and peak height in stream --- libcrystfel/src/reflist.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'libcrystfel/src/reflist.c') 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; @@ -521,6 +525,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 @@ -720,6 +751,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 -- cgit v1.2.3