diff options
author | Thomas White <taw@physics.org> | 2014-03-03 15:44:26 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-03-03 15:44:26 +0100 |
commit | ee2a9703c723d807c4e590906ab6a45868651a81 (patch) | |
tree | 142c4f23c63cc1648a81c71f603489a361258918 /libcrystfel/src/reflist.c | |
parent | 8a15866307f7dde7ba70ed9de756cf0392904e30 (diff) |
Include background and peak height in stream
Diffstat (limited to 'libcrystfel/src/reflist.c')
-rw-r--r-- | libcrystfel/src/reflist.c | 55 |
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 |