aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-05-03 17:08:17 +0200
committerThomas White <taw@physics.org>2018-05-07 10:08:02 +0200
commit2fcc4e3721b3ff5006f2d40176577ee2ce57de17 (patch)
tree40808b90aacd51b89b265a48eeb32f27229443c7 /src
parent734840568fd3cad8fc1a915f182247b75c7117fb (diff)
Add SCALE_VERBOSE_ERRORS
Diffstat (limited to 'src')
-rw-r--r--src/post-refinement.c2
-rw-r--r--src/scaling.c5
-rw-r--r--src/scaling.h1
3 files changed, 4 insertions, 4 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c
index 4e83eacc..bde9c02c 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -727,7 +727,7 @@ static void do_pr_refine(Crystal *cr, const RefList *full,
try_reindex(cr, full, sym, amb, scaleflags);
- if ( scale_one_crystal(cr, full, scaleflags) ) {
+ if ( scale_one_crystal(cr, full, scaleflags | SCALE_VERBOSE_ERRORS) ) {
ERROR("Bad scaling at start of refinement.\n");
return;
}
diff --git a/src/scaling.c b/src/scaling.c
index 94d885ea..5fbf541a 100644
--- a/src/scaling.c
+++ b/src/scaling.c
@@ -198,7 +198,6 @@ void scale_all(Crystal **crystals, int n_crystals, int nthreads, int scaleflags)
/* Calculates G and B, by which cr's reflections should be multiplied to fit reference */
int scale_one_crystal(Crystal *cr, const RefList *listR, int flags)
{
- int complain_loudly = 0;
const Reflection *reflS;
RefListIterator *iter;
int max_n = 256;
@@ -289,7 +288,7 @@ int scale_one_crystal(Crystal *cr, const RefList *listR, int flags)
}
if ( n < 2 ) {
- if ( complain_loudly ) {
+ if ( flags & SCALE_VERBOSE_ERRORS ) {
ERROR("Not enough reflections for scaling (had %i, but %i remain)\n", nb, n);
if ( n_esdR ) ERROR("%i reference reflection esd\n", n_esdR);
if ( n_esdS ) ERROR("%i subject reflection esd\n", n_esdS);
@@ -320,7 +319,7 @@ int scale_one_crystal(Crystal *cr, const RefList *listR, int flags)
if ( isnan(G) ) {
- if ( complain_loudly ) {
+ if ( flags & SCALE_VERBOSE_ERRORS ) {
ERROR("Scaling gave NaN (%i pairs)\n", n);
if ( n < 10 ) {
int i;
diff --git a/src/scaling.h b/src/scaling.h
index a4ec6931..8c2e7ef2 100644
--- a/src/scaling.h
+++ b/src/scaling.h
@@ -42,6 +42,7 @@ enum ScaleFlags
{
SCALE_NONE = 0,
SCALE_NO_B = 1<<0, /* Don't use Debye-Waller part */
+ SCALE_VERBOSE_ERRORS = 1<<1,
};
extern int scale_one_crystal(Crystal *cr, const RefList *reference, int flags);