aboutsummaryrefslogtreecommitdiff
path: root/src/get_hkl.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-11-23 08:55:58 +0100
committerThomas White <taw@physics.org>2013-11-23 08:55:58 +0100
commit8683aef3880d17c64a10598ff9c2edd1532280cb (patch)
treec38c03ce4ed38d3efea6c33a2fe96c719267e430 /src/get_hkl.c
parent15119f0e10d93bfad5214e042ca437b86159b30f (diff)
get_hkl: Fix symmetric expansion
Diffstat (limited to 'src/get_hkl.c')
-rw-r--r--src/get_hkl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/get_hkl.c b/src/get_hkl.c
index b4025251..029f8d21 100644
--- a/src/get_hkl.c
+++ b/src/get_hkl.c
@@ -284,7 +284,7 @@ static RefList *expand_reflections(RefList *in, const SymOpList *initial,
for ( j=0; j<n; j++ ) {
signed int he, ke, le;
- Reflection *new;
+ Reflection *copy;
int have_phase;
double ph;
@@ -294,14 +294,16 @@ static RefList *expand_reflections(RefList *in, const SymOpList *initial,
/* Put it into the asymmetric unit for the target */
get_asymm(target, he, ke, le, &he, &ke, &le);
+ if ( find_refl(out, he, ke, le) != NULL ) continue;
+
/* Make sure the intensity is in the right place */
- new = add_refl(out, he, ke, le);
- copy_data(new, refl);
+ copy = add_refl(out, he, ke, le);
+ copy_data(copy, refl);
/* FIXME: Make phase negative if the reflection is
* separated from the original via an inversion */
ph = get_phase(refl, &have_phase);
- if ( have_phase ) set_phase(new, -ph);
+ if ( have_phase ) set_phase(copy, -ph);
}