aboutsummaryrefslogtreecommitdiff
path: root/src/reflist.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-02-06 21:20:01 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:13 +0100
commit1a206036c00ca86270fe59bfc475dd059bf38969 (patch)
tree5c63c3cd610a0d936940a5278ed6ad4f6088032f /src/reflist.c
parent155ca0064e5605a345d141202d6cbf7dce9a220b (diff)
Start work on binary tree
Diffstat (limited to 'src/reflist.c')
-rw-r--r--src/reflist.c139
1 files changed, 139 insertions, 0 deletions
diff --git a/src/reflist.c b/src/reflist.c
new file mode 100644
index 00000000..990bc535
--- /dev/null
+++ b/src/reflist.c
@@ -0,0 +1,139 @@
+/*
+ * reflist.c
+ *
+ * Fast reflection/peak list
+ *
+ * (c) 2011 Thomas White <taw@physics.org>
+ *
+ * Part of CrystFEL - crystallography with a FEL
+ *
+ */
+
+
+#include <stdlib.h>
+
+#include "reflist.h"
+
+
+struct _reflection {
+
+ unsigned int serial; /* Serial number */
+
+ signed int h;
+ signed int k;
+ signed int l;
+
+ double excitation_error;
+
+ /* Partiality */
+ double r1; /* First excitation error */
+ double r2; /* Second excitation error */
+ double p; /* Partiality */
+ int clamp1; /* Clamp status for r1 */
+ int clamp2; /* Clamp status for r2 */
+
+ /* Location in image */
+ int x;
+ int y;
+
+ int scalable;
+
+ /* Intensity */
+ double intensity;
+
+
+};
+
+
+struct _reflist {
+
+ struct ref *head;
+
+};
+
+
+/**************************** Creation / deletion *****************************/
+
+/* Create a reflection list */
+RefList *reflist_new()
+{
+ RefList *new;
+
+ new = malloc(sizeof(struct _reflist));
+
+ return new;
+}
+
+
+void reflist_free(RefList *list)
+{
+}
+
+
+/********************************** Search ************************************/
+
+Reflection *find_refl(RefList *list, INDICES)
+{
+}
+
+
+/********************************** Getters ***********************************/
+
+double get_excitation_error(Reflection *refl)
+{
+}
+
+
+void get_detector_pos(Reflection *refl, double *x, double *y)
+{
+}
+
+
+void get_indices(Reflection *refl, signed int *h, signed int *k, signed int *l)
+{
+}
+
+
+/********************************** Setters ***********************************/
+
+void set_detector_pos(Reflection *refl, double exerr, double x, double y)
+{
+}
+
+
+void set_partial(Reflection *refl, double r1, double r2, double p,
+ double clamp_low, double clamp_high)
+{
+}
+
+
+/********************************* Insertion **********************************/
+
+Reflection *add_refl(RefList *list, INDICES)
+{
+}
+
+
+Reflection *add_refl_with_det_pos(RefList *refl, INDICES, double exerr,
+ double x, double y)
+{
+}
+
+
+/********************************* Iteration **********************************/
+
+Reflection *first_refl(RefList *list)
+{
+}
+
+
+Reflection *next_refl(Reflection *refl)
+{
+}
+
+
+/*********************************** Voodoo ***********************************/
+
+void optimise_reflist(RefList *list)
+{
+}