diff options
author | Thomas White <taw@physics.org> | 2010-07-01 11:00:37 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:26:52 +0100 |
commit | c6bbfe2f938f4caa32335f9927efb3d2ea0284bc (patch) | |
tree | cfd349dafe2c474c1c5e3720df22392a54b52568 | |
parent | 44187d0be3e33fb9ab1515698919947074d266ad (diff) |
render_hkl: Add rawcts weighting
-rw-r--r-- | src/render_hkl.c | 20 |
1 files changed, 17 insertions, 3 deletions
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=<sym> Expand reflections according to point group <sym>.\n" " -w --weighting=<wght> 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" ); } @@ -126,6 +130,10 @@ static void render_za(UnitCell *cell, double *ref, unsigned int *c, break; case WGHT_COUNTS : val = (float)ct; + val /= (float)num_equivs(h, k, 0, sym); + break; + case WGHT_RAWCOUNTS : + val = (float)ct; break; } @@ -191,6 +199,10 @@ static void render_za(UnitCell *cell, double *ref, unsigned int *c, 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; |