aboutsummaryrefslogtreecommitdiff
path: root/src/reflist.c
diff options
context:
space:
mode:
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]);
+}