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.c36
1 files changed, 33 insertions, 3 deletions
diff --git a/libcrystfel/src/reflist.c b/libcrystfel/src/reflist.c
index a35aa575..f1d759ea 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 ***********************************/
/**
@@ -634,6 +649,7 @@ void set_panel(Reflection *refl, struct panel *p)
refl->data.panel = p;
}
+
/**
* set_khalf:
* @refl: A %Reflection
@@ -647,7 +663,6 @@ void set_khalf(Reflection *refl, double khalf)
}
-
/**
* set_kpred:
* @refl: A %Reflection
@@ -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)