aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-11-23 02:49:42 -0800
committerThomas White <taw@physics.org>2013-11-23 02:49:42 -0800
commit470773e8f7a1c46506cf24f281e6971101cfee1b (patch)
treeb860418bce6e4717a55c452ae6f8532161706483
parentc2337f22cfcf84d69f5827759c86a62478ce8c8a (diff)
parent8683aef3880d17c64a10598ff9c2edd1532280cb (diff)
Merge branch 'master' of ssh://git.bitwiz.org.uk/crystfel
-rw-r--r--src/get_hkl.c10
-rw-r--r--src/process_image.c2
2 files changed, 7 insertions, 5 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);
}
diff --git a/src/process_image.c b/src/process_image.c
index 0e8eedbc..b07e16b6 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -146,7 +146,7 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
free(image.data);
image.data = data_for_measurement;
- rn = get_current_dir_name();
+ rn = getcwd(NULL, 0);
r = chdir(tmpdir);
if ( r ) {