diff options
author | Thomas White <taw@physics.org> | 2018-08-20 17:49:57 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-08-30 17:18:54 +0200 |
commit | 9cdca7b1b9edc7103e41d6805ad009f9cac272fd (patch) | |
tree | af1b72c124b15d88bb70f0dd3705a6e88db25127 /libcrystfel/src/reflist.c | |
parent | 214b23a62b478acddaeb8d52f6d59909fa931c1e (diff) |
RefList: add contribution list
Diffstat (limited to 'libcrystfel/src/reflist.c')
-rw-r--r-- | libcrystfel/src/reflist.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/libcrystfel/src/reflist.c b/libcrystfel/src/reflist.c index a35aa575..8b5dee3e 100644 --- a/libcrystfel/src/reflist.c +++ b/libcrystfel/src/reflist.c @@ -3,11 +3,11 @@ * * Fast reflection/peak list * - * Copyright © 2012-2016 Deutsches Elektronen-Synchrotron DESY, + * Copyright © 2012-2018 Deutsches Elektronen-Synchrotron DESY, * a research centre of the Helmholtz Association. * * Authors: - * 2011-2016 Thomas White <taw@physics.org> + * 2011-2018 Thomas White <taw@physics.org> * * This file is part of CrystFEL. * @@ -100,6 +100,9 @@ struct _refldata { double peak; double mean_bg; + /* Contributions */ + struct reflection_contributions *contribs; + /* User-specified temporary values */ double temp1; double temp2; @@ -587,6 +590,18 @@ int get_flag(const Reflection *refl) } +/** + * get_contributions: + * @refl: A %Reflection + * + * Returns: the reflection's contribution list + * + **/ +struct reflection_contributions *get_contributions(const Reflection *refl) +{ + return refl->data.contribs; +} + /********************************** Setters ***********************************/ /** @@ -848,6 +863,21 @@ void set_flag(Reflection *refl, int flag) } +/** + * set_contributions: + * @refl: A %Reflection + * @contribs: Pointer to the contribution list + * + * Note that the pointer will be stored, not the contents of the structure. + * + **/ +void set_contributions(Reflection *refl, + struct reflection_contributions *contribs) +{ + refl->data.contribs = contribs; +} + + /********************************* Insertion **********************************/ static Reflection *rotate_once(Reflection *refl, int dir) |