From c1cc621eae93e96184693d94f07c9a389aa14192 Mon Sep 17 00:00:00 2001 From: Alexandra Tolstikova Date: Fri, 26 Feb 2016 17:50:10 +0100 Subject: asdf.c: Divide volume constraints by number of lattice points per unit cell since asdf always finds primitive cell --- libcrystfel/src/asdf.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'libcrystfel/src') diff --git a/libcrystfel/src/asdf.c b/libcrystfel/src/asdf.c index bf2ce342..9c917523 100644 --- a/libcrystfel/src/asdf.c +++ b/libcrystfel/src/asdf.c @@ -1128,8 +1128,18 @@ int run_asdf(struct image *image, IndexingPrivate *ipriv) double volume = cell_get_volume(dp->template); double vtol = (dp->ltl[0] + dp->ltl[1] + dp->ltl[2]) / 100 + dp->ltl[3] / 180 * M_PI; - volume_min = volume * (1 - vtol); - volume_max = volume * (1 + vtol); + + /* Divide volume constraints by number of lattice points per + * unit cell since asdf always finds primitive cell */ + int latt_points_per_uc = 1; + char centering = cell_get_centering(dp->template); + if ( centering == 'A' || + centering == 'B' || + centering == 'C' || + centering == 'I') latt_points_per_uc = 2; + + volume_min = volume * (1 - vtol)/latt_points_per_uc; + volume_max = volume * (1 + vtol)/latt_points_per_uc; } int n = image_feature_count(image->features); -- cgit v1.2.3