diff options
author | Thomas White <taw@physics.org> | 2010-11-17 14:35:50 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:06 +0100 |
commit | e2ff3965b0f43e3750d13e375d7a1dae72ac90ff (patch) | |
tree | 3cd95fea41bd3fe8eae797f6ff3a511ec186c40a /src/process_hkl.c | |
parent | 2f942f0a3096242ce5623cf5aae8d33253766bad (diff) |
Fix stability of SNRs
Diffstat (limited to 'src/process_hkl.c')
-rw-r--r-- | src/process_hkl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/process_hkl.c b/src/process_hkl.c index b1fcad51..162b0bd6 100644 --- a/src/process_hkl.c +++ b/src/process_hkl.c @@ -813,9 +813,12 @@ int main(int argc, char *argv[]) dev = lookup_intensity(devs, h, k, l); count = lookup_count(counts, h, k, l); - if ( count < 2 ) continue; - - esd = sqrt(dev) / (double)count; + if ( count < 2 ) { + /* If we have only one measurement, the error is 100% */ + esd = lookup_intensity(model, h, k, l); + } else { + esd = sqrt(dev) / (double)count; + } set_intensity(esds, h, k, l, esd); } |