diff options
author | Thomas White <taw@bitwiz.org.uk> | 2010-05-04 06:57:00 -0700 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2010-05-04 06:57:00 -0700 |
commit | 07d406ce05760f633f72c2c3683dd3466423321a (patch) | |
tree | 7fbeea520c6a52715c70b164dbf6d6461aa9227e /src | |
parent | 7a244aaae609940ec1800459472a1be620cc7853 (diff) |
process_hkl: Placeholder for detwinning
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/Makefile.in | 5 | ||||
-rw-r--r-- | src/process_hkl.c | 16 |
3 files changed, 18 insertions, 5 deletions
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); |