diff options
author | Thomas White <taw@physics.org> | 2013-03-15 15:53:39 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2013-04-17 17:33:49 +0200 |
commit | cef0a71eb385773fa2290dfc99de225948fef06a (patch) | |
tree | 5ff754fc7e15c70c8af3c0018f31222ddf96d8ce /libcrystfel | |
parent | d5bcdd268da3ed20609a390ed89ea8e61cc26cd7 (diff) |
partialator: Add --model=
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/geometry.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libcrystfel/src/geometry.c b/libcrystfel/src/geometry.c index f457fc4f..cdc62ab5 100644 --- a/libcrystfel/src/geometry.c +++ b/libcrystfel/src/geometry.c @@ -362,6 +362,21 @@ RefList *select_intersections(struct image *image, Crystal *cryst) } +static void set_unity_partialities(Crystal *cryst) +{ + Reflection *refl; + RefListIterator *iter; + + for ( refl = first_refl(crystal_get_reflections(cryst), &iter); + refl != NULL; + refl = next_refl(refl, iter) ) + { + set_partiality(refl, 1.0); + set_lorentz(refl, 1.0); + } +} + + /* Calculate partialities and apply them to the image's reflections */ void update_partialities(Crystal *cryst, PartialityModel pmodel) { @@ -373,6 +388,14 @@ void update_partialities(Crystal *cryst, PartialityModel pmodel) double csx, csy, csz; struct image *image = crystal_get_image(cryst); + if ( pmodel == PMODEL_UNITY ) { + /* It isn't strictly necessary to set the partialities to 1, + * because the scaling stuff will just a correction factor of + * 1 anyway. This is just to help things make sense. */ + set_unity_partialities(cryst); + return; + } + cell_get_reciprocal(crystal_get_cell(cryst), &asx, &asy, &asz, &bsx, &bsy, &bsz, &csx, &csy, &csz); |