aboutsummaryrefslogtreecommitdiff
path: root/src/reflist.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-03-16 18:23:48 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:20 +0100
commit86e621ad289638d7bf1440092cffd4c2ac64f982 (patch)
tree0abc051952d4d7d581bfe7b2d7403972ebd7327f /src/reflist.c
parenteaee0f6415b06f40ff7f477328f9f26f01c4d7ec (diff)
Remove old reflections.h
Diffstat (limited to 'src/reflist.c')
-rw-r--r--src/reflist.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/reflist.c b/src/reflist.c
index 3181b418..a81c738e 100644
--- a/src/reflist.c
+++ b/src/reflist.c
@@ -46,6 +46,9 @@ struct _refldata {
double intensity;
double esd_i;
+ /* Phase */
+ double phase;
+
/* Redundancy */
int redundancy;
@@ -250,8 +253,20 @@ double get_esd_intensity(Reflection *refl)
}
+double get_phase(Reflection *refl)
+{
+ return refl->data.phase;
+}
+
+
/********************************** Setters ***********************************/
+void copy_data(Reflection *to, Reflection *from)
+{
+ memcpy(&to->data, &from->data, sizeof(struct _refldata));
+}
+
+
void set_detector_pos(Reflection *refl, double exerr, double x, double y)
{
refl->data.excitation_error = exerr;
@@ -301,6 +316,12 @@ void set_esd_intensity(Reflection *refl, double esd)
}
+void set_ph(Reflection *refl, double phase)
+{
+ refl->data.phase = phase;
+}
+
+
/********************************* Insertion **********************************/
static void insert_node(Reflection *head, Reflection *new)
@@ -689,3 +710,9 @@ void optimise_reflist(RefList *list)
recursive_depth(list->head->child[0]));
}
}
+
+
+int num_reflections(RefList *list)
+{
+ return recursive_count(list->head->child[0]);
+}