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.c34
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)