diff options
author | Thomas White <taw@physics.org> | 2018-02-26 17:21:50 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-02-27 17:12:42 +0100 |
commit | bd5d2ec01be4aef4731498424fe777e3cdb797ef (patch) | |
tree | 612e8a1da5a3e51ac8ca4b0c391818eaf8d8f936 /src/post-refinement.c | |
parent | 989b96e3970d94f4480d05229dceaed8d7f33d0d (diff) |
Add --force-bandwidth and --force-radius
Diffstat (limited to 'src/post-refinement.c')
-rw-r--r-- | src/post-refinement.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c index 60810349..acafb8aa 100644 --- a/src/post-refinement.c +++ b/src/post-refinement.c @@ -330,6 +330,13 @@ static double residual_f(const gsl_vector *v, void *pp) return GSL_NAN; } + /* Can happen with grid scans and certain --force-radius values */ + if ( fabs(crystal_get_profile_radius(cr)) < 0.0000001e9 ) { + crystal_free(cr); + if ( pv->verbose ) STATUS("radius very small\n"); + return GSL_NAN; + } + if ( im.lambda <= 0.0 ) { crystal_free(cr); if ( pv->verbose ) STATUS("lambda < 0\n"); |