aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-06-22 01:55:24 +0200
committerThomas White <taw@physics.org>2012-02-22 15:26:50 +0100
commit48d0b9b12474e2c73411c234ef972a0a4a692e34 (patch)
tree066a489d7c3f2337ececc755773a7eaa71abff86
parent7c9587d69305edd53487a61cc8f5a26cc1373638 (diff)
process_hkl: Add symmetry module
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in2
-rw-r--r--src/Makefile.am2
-rw-r--r--src/Makefile.in5
-rw-r--r--src/process_hkl.c9
-rw-r--r--src/symmetry.c23
-rw-r--r--src/symmetry.h22
7 files changed, 59 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index 7d83b292..ad9deea9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,5 +5,5 @@ EXTRA_DIST = configure src/cell.h src/hdf5-file.h src/image.h \
data/displaywindow.ui src/dirax.h src/peaks.h src/index.h \
src/filters.h src/diffraction-gpu.h src/cl-utils.h \
data/defs.h src/parameters-lcls.tmp \
- data/diffraction.cl data/sfac src/likelihood.h
+ data/diffraction.cl data/sfac src/likelihood.h src/symmetry.h
SUBDIRS = src data
diff --git a/Makefile.in b/Makefile.in
index 70b5907a..f017b5e7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -202,7 +202,7 @@ EXTRA_DIST = configure src/cell.h src/hdf5-file.h src/image.h \
data/displaywindow.ui src/dirax.h src/peaks.h src/index.h \
src/filters.h src/diffraction-gpu.h src/cl-utils.h \
data/defs.h src/parameters-lcls.tmp \
- data/diffraction.cl data/sfac src/likelihood.h
+ data/diffraction.cl data/sfac src/likelihood.h src/symmetry.h
SUBDIRS = src data
all: config.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 82361202..5a9cd309 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -17,7 +17,7 @@ endif
pattern_sim_LDADD = @LIBS@
process_hkl_SOURCES = process_hkl.c sfac.c statistics.c cell.c utils.c \
- reflections.c likelihood.c
+ reflections.c likelihood.c symmetry.c
process_hkl_LDADD = @LIBS@
indexamajig_SOURCES = indexamajig.c hdf5-file.c utils.c cell.c image.c \
diff --git a/src/Makefile.in b/src/Makefile.in
index fef3e01d..403e790e 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -104,7 +104,7 @@ powder_plot_OBJECTS = $(am_powder_plot_OBJECTS)
powder_plot_DEPENDENCIES =
am_process_hkl_OBJECTS = process_hkl.$(OBJEXT) sfac.$(OBJEXT) \
statistics.$(OBJEXT) cell.$(OBJEXT) utils.$(OBJEXT) \
- reflections.$(OBJEXT) likelihood.$(OBJEXT)
+ reflections.$(OBJEXT) likelihood.$(OBJEXT) symmetry.$(OBJEXT)
process_hkl_OBJECTS = $(am_process_hkl_OBJECTS)
process_hkl_DEPENDENCIES =
am_render_hkl_OBJECTS = render_hkl.$(OBJEXT) cell.$(OBJEXT) \
@@ -240,7 +240,7 @@ pattern_sim_SOURCES = pattern_sim.c diffraction.c utils.c image.c \
$(am__append_2)
pattern_sim_LDADD = @LIBS@
process_hkl_SOURCES = process_hkl.c sfac.c statistics.c cell.c utils.c \
- reflections.c likelihood.c
+ reflections.c likelihood.c symmetry.c
process_hkl_LDADD = @LIBS@
indexamajig_SOURCES = indexamajig.c hdf5-file.c utils.c cell.c image.c \
@@ -400,6 +400,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/render_hkl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfac.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statistics.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symmetry.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
.c.o:
diff --git a/src/process_hkl.c b/src/process_hkl.c
index d5d934c9..32eaa608 100644
--- a/src/process_hkl.c
+++ b/src/process_hkl.c
@@ -246,6 +246,7 @@ int main(int argc, char *argv[])
unsigned int *new_counts = NULL;
unsigned int n_total_patterns;
unsigned int *truecounts = NULL;
+ char *sym = NULL;
char *pdb = NULL;
float f0;
int f0_valid;
@@ -264,12 +265,14 @@ int main(int argc, char *argv[])
{"sum", 0, &config_sum, 1},
{"detwin", 0, &config_detwin, 1},
{"scale", 0, &config_scale, 1},
+ {"symmetry", 0, NULL, 'y'},
{"pdb", 1, NULL, 'p'},
{0, 0, NULL, 0}
};
/* Short options */
- while ((c = getopt_long(argc, argv, "hi:e:ro:p:", longopts, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "hi:e:ro:p:y:",
+ longopts, NULL)) != -1) {
switch (c) {
case 'h' :
@@ -305,6 +308,10 @@ int main(int argc, char *argv[])
pdb = strdup(optarg);
break;
+ case 'y' :
+ sym = strdup(optarg);
+ break;
+
case 0 :
break;
diff --git a/src/symmetry.c b/src/symmetry.c
new file mode 100644
index 00000000..7a6a5ed6
--- /dev/null
+++ b/src/symmetry.c
@@ -0,0 +1,23 @@
+/*
+ * symmetry.c
+ *
+ * Symmetry
+ *
+ * (c) 2006-2010 Thomas White <taw@physics.org>
+ *
+ * Part of CrystFEL - crystallography with a FEL
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+
+void apply_symmetry(double ref, unsigned int *counts, const char *sym)
+{
+}
diff --git a/src/symmetry.h b/src/symmetry.h
new file mode 100644
index 00000000..de061a63
--- /dev/null
+++ b/src/symmetry.h
@@ -0,0 +1,22 @@
+/*
+ * symmetry.h
+ *
+ * Symmetry
+ *
+ * (c) 2006-2010 Thomas White <taw@physics.org>
+ *
+ * Part of CrystFEL - crystallography with a FEL
+ *
+ */
+
+
+#ifndef SYMMETRY_H
+#define SYMMETRY_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+extern void apply_symmetry(double ref, unsigned int *counts, const char *sym);
+
+#endif /* SYMMETRY_H */