diff options
author | Thomas White <taw@physics.org> | 2010-07-01 19:02:09 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:26:52 +0100 |
commit | 87d72e34a321aa53ad4e89f90058d5867cbd3261 (patch) | |
tree | 175ac7382109beb3a6c1888e6e33944dbbb8ea4f /src/reflections.c | |
parent | 588d243654d81e13aaee0e04ae4d9cce66acea38 (diff) |
compare_hkl: Take counts into account
Diffstat (limited to 'src/reflections.c')
-rw-r--r-- | src/reflections.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/reflections.c b/src/reflections.c index 2711936b..e93433d6 100644 --- a/src/reflections.c +++ b/src/reflections.c @@ -166,3 +166,16 @@ double *ideal_intensities(double complex *sfac) return ref; } + + +void divide_down(double *intensities, unsigned int *counts) +{ + int i; + + for ( i=0; i<IDIM*IDIM*IDIM; i++ ) { + if ( counts[i] > 0 ) { + intensities[i] /= (double)counts[i]; + counts[i] = 1; + } + } +} |