aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/geometry.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-09-05 15:28:31 +0200
committerThomas White <taw@physics.org>2019-09-05 15:28:31 +0200
commit4640801af015f6eb46f12d17b22f8c0767a0091e (patch)
tree8613b401716b9e33e76a0517fc9f9edeed01f4ee /libcrystfel/src/geometry.c
parent9fb94994155948fdc7c1f3034e4e628bad32484d (diff)
Allow the polarsation correction to be completely disabled
Diffstat (limited to 'libcrystfel/src/geometry.c')
-rw-r--r--libcrystfel/src/geometry.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcrystfel/src/geometry.c b/libcrystfel/src/geometry.c
index 13fcbe3b..fa896cd0 100644
--- a/libcrystfel/src/geometry.c
+++ b/libcrystfel/src/geometry.c
@@ -967,10 +967,12 @@ struct polarisation parse_polarisation(const char *text)
if ( strcmp(text, "none") == 0 ) {
p.fraction = 0.5;
p.angle = 0.0;
+ p.disable = 1;
return p;
}
p.fraction = 1.0;
+ p.disable = 0;
i = 0;
n = 0;
@@ -1027,6 +1029,10 @@ void polarisation_correction(RefList *list, UnitCell *cell,
double bsx, bsy, bsz;
double csx, csy, csz;
+ if ( p.disable ) {
+ return;
+ }
+
cell_get_reciprocal(cell, &asx, &asy, &asz,
&bsx, &bsy, &bsz,
&csx, &csy, &csz);