From 074d07c2491f37e50160399d01b58af64f86946f Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 11 Mar 2014 17:41:07 +0100 Subject: partialator: Add polarisation correction --- doc/man/partialator.1 | 5 +++++ src/partialator.c | 30 +++++++++++++++++++----------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/doc/man/partialator.1 b/doc/man/partialator.1 index 15992646..b3871ed7 100644 --- a/doc/man/partialator.1 +++ b/doc/man/partialator.1 @@ -94,6 +94,11 @@ Specify the partiality model. See the list below for possible choices. .PD Run \fIn\fR analyses in parallel. +.PD 0 +.IP \fB--no-polarisation\fR +.PD +Disable the polarisation correction. + .SH PARTIALITY MODELS The available partiality models are: diff --git a/src/partialator.c b/src/partialator.c index 8e80d076..910ed539 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -66,23 +66,16 @@ static void show_help(const char *s) " -h, --help Display this help message.\n" "\n" " -i, --input= Specify the name of the input 'stream'.\n" -" (must be a file, not e.g. stdin)\n" " -o, --output= Output filename. Default: partialator.hkl.\n" " -g. --geometry= Get detector geometry from file.\n" -" -b, --beam= Get beam parameters from file, which provides\n" -" initial values for parameters, and nominal\n" -" wavelengths if no per-shot value is found in \n" -" an HDF5 file.\n" +" -b, --beam= Get beam parameters from file.\n" " -y, --symmetry= Merge according to symmetry .\n" " -n, --iterations= Run cycles of scaling and post-refinement.\n" " --no-scale Fix all the scaling factors at unity.\n" " -r, --reference= Refine images against reflections in ,\n" -" instead of taking the mean of the intensity\n" -" estimates.\n" " -m, --model= Specify partiality model.\n" -" --min-measurements= Require at least measurements before a\n" -" reflection appears in the output. Default: 2\n" -"\n" +" --min-measurements= Minimum number of measurements to require.\n" +" --no-polarisation Disable polarisation correction.\n" " -j Run analyses in parallel.\n"); } @@ -361,9 +354,11 @@ int main(int argc, char *argv[]) int min_measurements = 2; char *rval; struct srdata srdata; + int polarisation = 1; /* Long options */ const struct option longopts[] = { + {"help", 0, NULL, 'h'}, {"input", 1, NULL, 'i'}, {"output", 1, NULL, 'o'}, @@ -371,11 +366,17 @@ int main(int argc, char *argv[]) {"beam", 1, NULL, 'b'}, {"symmetry", 1, NULL, 'y'}, {"iterations", 1, NULL, 'n'}, - {"no-scale", 0, &noscale, 1}, {"reference", 1, NULL, 'r'}, {"model", 1, NULL, 'm'}, + {"min-measurements", 1, NULL, 2}, + {"no-scale", 0, &noscale, 1}, + {"no-polarisation", 0, &polarisation, 0}, + {"no-polarization", 0, &polarisation, 0}, + {"polarisation", 0, &polarisation, 1}, /* compat */ + {"polarization", 0, &polarisation, 1}, /* compat */ + {0, 0, NULL, 0} }; @@ -593,6 +594,13 @@ int main(int argc, char *argv[]) /* This is the raw list of reflections */ cr_refl = crystal_get_reflections(cr); + + if ( polarisation ) { + polarisation_correction(cr_refl, + crystal_get_cell(cr), + cur); + } + as = asymmetric_indices(cr_refl, sym); crystal_set_reflections(cr, as); reflist_free(cr_refl); -- cgit v1.2.3