aboutsummaryrefslogtreecommitdiff
path: root/src/process_hkl.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-06-29 17:27:43 +0200
committerThomas White <taw@physics.org>2012-02-22 15:26:51 +0100
commit5bc4a6971f6ed08bc63f685cf39994d836af19d3 (patch)
treee89421bda0042292633adf1d06589ce965c01a9b /src/process_hkl.c
parente27c9f1e9cc53c335910ee0d195910e9d4aa6ad6 (diff)
process_hkl: Merge with symmetry
Diffstat (limited to 'src/process_hkl.c')
-rw-r--r--src/process_hkl.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/process_hkl.c b/src/process_hkl.c
index deeb77f5..86bb92cd 100644
--- a/src/process_hkl.c
+++ b/src/process_hkl.c
@@ -26,6 +26,7 @@
#include "sfac.h"
#include "reflections.h"
#include "likelihood.h"
+#include "symmetry.h"
/* Number of divisions for R vs |q| graphs */
@@ -188,21 +189,25 @@ static void process_reflections(double *ref, unsigned int *counts,
static void merge_pattern(double *model, const double *new,
unsigned int *model_counts,
- ReflItemList *items, int mo, int sum)
+ ReflItemList *items, int mo, int sum,
+ const char *symm)
{
int i;
for ( i=0; i<num_items(items); i++ ) {
double intensity;
+ signed int hs, ks, ls;
signed int h, k, l;
struct refl_item *item;
item = get_item(items, i);
- h = item->h;
- k = item->k;
- l = item->l;
+ hs = item->h;
+ ks = item->k;
+ ls = item->l;
+
+ get_asymm(hs, ks, ls, &h, &k, &l, symm);
intensity = lookup_intensity(new, h, k, l);
@@ -268,7 +273,7 @@ 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'},
+ {"symmetry", 1, NULL, 'y'},
{"pdb", 1, NULL, 'p'},
{0, 0, NULL, 0}
};
@@ -413,7 +418,7 @@ int main(int argc, char *argv[])
/* Start of second or later pattern */
merge_pattern(model, new_pattern, model_counts,
- items, config_maxonly, config_sum);
+ items, config_maxonly, config_sum, sym);
if ( (trueref != NULL) && config_every
&& (n_patterns % config_every == 0) ) {