diff options
author | Thomas White <taw@physics.org> | 2019-06-05 15:26:12 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-06-21 15:43:40 +0200 |
commit | 51103691a46f8319d201de09704f58c68468d163 (patch) | |
tree | 4e50532dfbc7f81233227a87f0c63b515105723e | |
parent | 4479b302e18238fdaae3eb8a02626dd4c8f8cf3b (diff) |
Formatting
About the comment: yes, it is. temp2 (T) has already been de-logged by
this point.
-rw-r--r-- | src/merge.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/merge.c b/src/merge.c index 96bd2e3e..1ca3ccda 100644 --- a/src/merge.c +++ b/src/merge.c @@ -101,7 +101,7 @@ static int alloc_contribs(struct reflection_contributions *c) /* Find reflection hkl in 'list', creating it if it's not there, under * protection of 'lock' and returning a locked reflection */ static Reflection *get_locked_reflection(RefList *list, pthread_rwlock_t *lock, - signed int h, signed int k, signed int l) + signed int h, signed int k, signed int l) { Reflection *f; @@ -297,9 +297,12 @@ RefList *merge_intensities(Crystal **crystals, int n, int n_threads, refl != NULL; refl = next_refl(refl, iter) ) { + double var; + int red; /* Correct for averaging log of intensities*/ - if (ln_merge){ + if ( ln_merge ) { + double ln_I, ln_temp2; ln_temp2 = get_temp2(refl); @@ -307,13 +310,10 @@ RefList *merge_intensities(Crystal **crystals, int n, int n_threads, ln_I = get_intensity(refl); set_intensity(refl, exp(ln_I)); - } - double var; - int red; + } red = get_redundancy(refl); - //TODO is this still correct for log averaging? var = get_temp2(refl) / get_temp1(refl); set_esd_intensity(refl, sqrt(var)/sqrt(red)); |