aboutsummaryrefslogtreecommitdiff
path: root/src/merge.h
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-11-30 17:04:13 +0100
committerThomas White <taw@physics.org>2018-11-30 17:04:13 +0100
commita977dfd051fb0483cf27693fc8e950c99e7c88ed (patch)
tree074684efd4bd5310852670e7d8abe1d4e6b515f5 /src/merge.h
parent6e9655241ff531b300d38d3e2f5a1e5c7d69f7b3 (diff)
Factorise correction of intensity for G, B, p and L
There were no fewer than 8 different places in the code where these factors needed to be applied. They all need to agree on conventions such as whether the intensities in the pattern should be multiplied or divided by G to "correct" them. They were not. This commit reduces the number of places to three: one function (actually two functions, so that the value before partiality can also be calculated consistently), plus log_residual and scale_one_crystal, where slightly different logarithmic versions are used instead.
Diffstat (limited to 'src/merge.h')
-rw-r--r--src/merge.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/merge.h b/src/merge.h
index 476f8755..2c2cfeda 100644
--- a/src/merge.h
+++ b/src/merge.h
@@ -47,6 +47,12 @@ extern RefList *merge_intensities(Crystal **crystals, int n, int n_threads,
int min_meas, double push_res, int use_weak,
int ln_merge);
+extern double correct_reflection_nopart(Reflection *refl, double osf,
+ double Bfac, double res);
+
+extern double correct_reflection(Reflection *refl, double osf, double Bfac,
+ double res);
+
extern double residual(Crystal *cr, const RefList *full, int free,
int *pn_used, const char *filename);