aboutsummaryrefslogtreecommitdiff
path: root/src/reflist.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-05-02 16:09:12 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:25 +0100
commit31851dfe017e89ebcf00c89ea4c3a0f12f7e86a6 (patch)
tree11019bd16952189f60085beca1eecfdb748a573e /src/reflist.c
parent0b87230e52bf5c99366651a0cbafa07d212be4a7 (diff)
Get rid of "image.raw_reflections"
Diffstat (limited to 'src/reflist.c')
-rw-r--r--src/reflist.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/reflist.c b/src/reflist.c
index e420b736..d23b952c 100644
--- a/src/reflist.c
+++ b/src/reflist.c
@@ -45,6 +45,11 @@
struct _refldata {
+ /* Symmetric indices (i.e. the "real" indices) */
+ signed int hs;
+ signed int ks;
+ signed int ls;
+
/* Partiality and related geometrical stuff */
double r1; /* First excitation error */
double r2; /* Second excitation error */
@@ -288,6 +293,29 @@ void get_indices(const Reflection *refl,
/**
+ * get_symmetric_indices:
+ * @refl: A %Reflection
+ * @h: Location at which to store the 'h' index of the reflection
+ * @k: Location at which to store the 'k' index of the reflection
+ * @l: Location at which to store the 'l' index of the reflection
+ *
+ * This function gives the symmetric indices, that is, the "real" indices before
+ * squashing down to the asymmetric reciprocal unit. This may be useful if the
+ * list is indexed according to the asymmetric indices, but you still need
+ * access to the symmetric version. This happens during post-refinement.
+ *
+ **/
+void get_symmetric_indices(const Reflection *refl,
+ signed int *hs, signed int *ks,
+ signed int *ls)
+{
+ *hs = refl->data.hs;
+ *ks = refl->data.ks;
+ *ls = refl->data.ls;
+}
+
+
+/**
* get_partiality:
* @refl: A %Reflection
*
@@ -489,6 +517,15 @@ void set_ph(Reflection *refl, double phase)
}
+void set_symmetric_indices(Reflection *refl,
+ signed int hs, signed int ks, signed int ls)
+{
+ refl->data.hs = hs;
+ refl->data.ks = ks;
+ refl->data.ls = ls;
+}
+
+
/********************************* Insertion **********************************/
static void insert_node(Reflection *head, Reflection *new)