From c6bbfe2f938f4caa32335f9927efb3d2ea0284bc Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 1 Jul 2010 11:00:37 +0200 Subject: render_hkl: Add rawcts weighting --- src/render_hkl.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/render_hkl.c') diff --git a/src/render_hkl.c b/src/render_hkl.c index ff955084..7e9317f5 100644 --- a/src/render_hkl.c +++ b/src/render_hkl.c @@ -32,6 +32,7 @@ enum { WGHT_I, WGHT_SQRTI, WGHT_COUNTS, + WGHT_RAWCOUNTS, }; static void show_help(const char *s) @@ -49,9 +50,12 @@ static void show_help(const char *s) " -y, --symmetry= Expand reflections according to point group .\n" " -w --weighting= Colour/shade the reciprocal lattice points\n" " according to:\n" -" I : the intensity of the reflection.\n" -" sqrtI : the square root of the intensity.\n" -" count : the number of counts for the reflection.\n" +" I : the intensity of the reflection.\n" +" sqrtI : the square root of the intensity.\n" +" count : the number of hits for the reflection.\n" +" (after correcting for 'epsilon')\n" +" rawcts : the raw number of hits for the\n" +" reflection (no 'epsilon' correction).\n" ); } @@ -125,6 +129,10 @@ static void render_za(UnitCell *cell, double *ref, unsigned int *c, val = (val>0.0) ? sqrt(val) : 0.0; break; case WGHT_COUNTS : + val = (float)ct; + val /= (float)num_equivs(h, k, 0, sym); + break; + case WGHT_RAWCOUNTS : val = (float)ct; break; } @@ -190,6 +198,10 @@ static void render_za(UnitCell *cell, double *ref, unsigned int *c, val = (val>0.0) ? sqrt(val) : 0.0; break; case WGHT_COUNTS : + val = (float)ct; + val /= (float)num_equivs(h, k, 0, sym); + break; + case WGHT_RAWCOUNTS : val = (float)ct; break; } @@ -345,6 +357,8 @@ int main(int argc, char *argv[]) wght = WGHT_SQRTI; } else if ( strcmp(weighting, "count") == 0 ) { wght = WGHT_COUNTS; + } else if ( strcmp(weighting, "rawcts") == 0 ) { + wght = WGHT_RAWCOUNTS; } else { ERROR("Unrecognised weighting '%s'\n", weighting); return 1; -- cgit v1.2.3