diff options
author | Thomas White <taw@physics.org> | 2014-09-09 10:38:56 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-09-09 10:38:56 +0200 |
commit | affe4b0ebb20211d806baf0bf03bd288377a19a2 (patch) | |
tree | 233d2d550ff5a8bafb365b353a8e0f6f773817b4 /src/pattern_sim.c | |
parent | 16a5848ff278be2e7612f36ca9103b668e47306d (diff) |
pattern_sim: Fix handling of centric reflections
Diffstat (limited to 'src/pattern_sim.c')
-rw-r--r-- | src/pattern_sim.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/pattern_sim.c b/src/pattern_sim.c index fca12bab..86f7d27a 100644 --- a/src/pattern_sim.c +++ b/src/pattern_sim.c @@ -99,22 +99,27 @@ static void show_help(const char *s) } -static double *intensities_from_list(RefList *list) +static double *intensities_from_list(RefList *list, SymOpList *sym) { Reflection *refl; RefListIterator *iter; double *out = new_arr_intensity(); + SymOpMask *m = new_symopmask(sym); + int neq = num_equivs(sym, NULL); for ( refl = first_refl(list, &iter); refl != NULL; refl = next_refl(refl, iter) ) { signed int h, k, l; + int eps; double intensity = get_intensity(refl); get_indices(refl, &h, &k, &l); + special_position(sym, m, h, k, l); + eps = neq / num_equivs(sym, m); - set_arr_intensity(out, h, k, l, intensity); + set_arr_intensity(out, h, k, l, intensity / eps); } @@ -521,7 +526,7 @@ int main(int argc, char *argv[]) } else { phases = NULL; } - intensities = intensities_from_list(reflections); + intensities = intensities_from_list(reflections, sym); phases = phases_from_list(reflections); flags = flags_from_list(reflections); |