diff options
author | Alexandra Tolstikova <alexandra.tolstikova@desy.de> | 2016-02-26 17:50:10 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2017-02-01 16:04:31 +0100 |
commit | c1cc621eae93e96184693d94f07c9a389aa14192 (patch) | |
tree | 82eca9be18113d267442281ef5a067f46e6ddb51 /libcrystfel/src/asdf.c | |
parent | 91ba89c68c263daaa7bd903cdf33de0b11c1642b (diff) |
asdf.c: Divide volume constraints by number of lattice points per unit cell since asdf always finds primitive cell
Diffstat (limited to 'libcrystfel/src/asdf.c')
-rw-r--r-- | libcrystfel/src/asdf.c | 14 |
1 files changed, 12 insertions, 2 deletions
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); |