diff options
author | Thomas White <taw@physics.org> | 2018-01-29 13:00:13 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-02-27 17:12:42 +0100 |
commit | 0ba30eafceabc7f3dc7a80cecfa48ae0553a5cfd (patch) | |
tree | 2162e7aa3cc8280032528d2c409d34895fc0f1d9 | |
parent | 5d80b28ccbf55e60b27fadd6348f8fd49d6507eb (diff) |
Mark crystals as bad if they don't scale properly
-rw-r--r-- | src/post-refinement.c | 3 | ||||
-rw-r--r-- | src/post-refinement.h | 1 | ||||
-rw-r--r-- | src/scaling.c | 4 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c index 4a5ef69f..6fa9364e 100644 --- a/src/post-refinement.c +++ b/src/post-refinement.c @@ -74,6 +74,9 @@ const char *str_prflag(enum prflag flag) case PRFLAG_BIGB : return "B too big"; + case PRFLAG_SCALEBAD : + return "bad scaling"; + default : return "Unknown flag"; } diff --git a/src/post-refinement.h b/src/post-refinement.h index 0db2ae42..f95bff32 100644 --- a/src/post-refinement.h +++ b/src/post-refinement.h @@ -51,6 +51,7 @@ enum prflag PRFLAG_EARLY = 18, PRFLAG_CC = 19, PRFLAG_BIGB = 20, + PRFLAG_SCALEBAD = 21, }; diff --git a/src/scaling.c b/src/scaling.c index cd257e48..f44f047b 100644 --- a/src/scaling.c +++ b/src/scaling.c @@ -144,7 +144,9 @@ static void scale_crystal(void *task, int id) r = linear_scale(pargs->full, crystal_get_reflections(pargs->crystal), &G, 1); if ( r == 0 ) { crystal_set_osf(pargs->crystal, G); - } /* else don't change it */ + } else { + crystal_set_user_flag(pargs->crystal, PRFLAG_SCALEBAD); + } } |