aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.c16
5 files changed, 20 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am
index 9b0d96f6..96fa0839 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 src/geometry-lcls.tmp \
- data/diffraction.cl data/sfac
+ data/diffraction.cl data/sfac src/likelihood.h
SUBDIRS = src data
diff --git a/Makefile.in b/Makefile.in
index e0b2d1a6..0a98e459 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 src/geometry-lcls.tmp \
- data/diffraction.cl data/sfac
+ data/diffraction.cl data/sfac src/likelihood.h
SUBDIRS = src data
all: config.h
diff --git a/src/Makefile.am b/src/Makefile.am
index d1d2c274..9dbf685a 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
+ reflections.c likelihood.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 008e248a..28146741 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -97,7 +97,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)
+ reflections.$(OBJEXT) likelihood.$(OBJEXT)
process_hkl_OBJECTS = $(am_process_hkl_OBJECTS)
process_hkl_DEPENDENCIES =
am_render_hkl_OBJECTS = render_hkl.$(OBJEXT) cell.$(OBJEXT) \
@@ -232,7 +232,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
+ reflections.c likelihood.c
process_hkl_LDADD = @LIBS@
indexamajig_SOURCES = indexamajig.c hdf5-file.c utils.c cell.c image.c \
@@ -373,6 +373,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/index.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indexamajig.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/likelihood.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pattern_sim.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/peaks.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/powder_plot.Po@am__quote@
diff --git a/src/process_hkl.c b/src/process_hkl.c
index e76835a0..dfb84ee1 100644
--- a/src/process_hkl.c
+++ b/src/process_hkl.c
@@ -25,6 +25,7 @@
#include "statistics.h"
#include "sfac.h"
#include "reflections.h"
+#include "likelihood.h"
/* Number of divisions for R vs |q| graphs */
@@ -61,7 +62,11 @@ static void show_help(const char *s)
" -r, --rvsq Output lists of R vs |q| (\"Luzzatti plots\")\n"
" when analysing figures of merit.\n"
" --zone-axis Output an [001] zone axis pattern each time the\n"
-" figures of merit are analysed.\n");
+" figures of merit are analysed.\n"
+" --detwin Correlate each new pattern with the current\n"
+" model and choose the best fitting out of the\n"
+" allowable twins.\n"
+);
}
@@ -230,6 +235,7 @@ int main(int argc, char *argv[])
int config_stopafter = 0;
int config_zoneaxis = 0;
int config_sum = 0;
+ int config_detwin = 0;
char *intfile = NULL;
double *new_pattern = NULL;
unsigned int *new_counts = NULL;
@@ -246,7 +252,8 @@ int main(int argc, char *argv[])
{"stop-after", 1, NULL, 's'},
{"zone-axis", 0, &config_zoneaxis, 1},
{"compare-with", 0, NULL, 'c'},
- {"sum", 0, &config_sum, 1},
+ {"sum", 0, &config_sum, 1},
+ {"detwin", 0, &config_detwin, 1},
{0, 0, NULL, 0}
};
@@ -362,6 +369,11 @@ int main(int argc, char *argv[])
continue;
}
+ if ( config_detwin ) {
+ detwin_intensities(model, new_pattern,
+ model_counts, new_counts);
+ }
+
/* Start of second or later pattern */
merge_pattern(model, new_pattern, model_counts,
new_counts, config_maxonly, config_sum);