From 4640801af015f6eb46f12d17b22f8c0767a0091e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 5 Sep 2019 15:28:31 +0200 Subject: Allow the polarsation correction to be completely disabled --- libcrystfel/src/geometry.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libcrystfel/src/geometry.c') 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); -- cgit v1.2.3