diff options
author | Thomas White <taw@physics.org> | 2015-05-13 13:43:42 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-05-13 13:45:39 +0200 |
commit | b7540780d46b92f9ce96de74eb4c2e05b2369983 (patch) | |
tree | 8c5305522021058252a6f45da60d8f00dc2fb6de /src/predict-refine.c | |
parent | 62c19009fe70b94153f57044e7717e2e59980009 (diff) |
Squash NaN shifts in prediction refinement
Diffstat (limited to 'src/predict-refine.c')
-rw-r--r-- | src/predict-refine.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/predict-refine.c b/src/predict-refine.c index 97371172..2d845feb 100644 --- a/src/predict-refine.c +++ b/src/predict-refine.c @@ -618,6 +618,9 @@ static int iterate(struct reflpeak *rps, int n, UnitCell *cell, for ( i=0; i<num_params; i++ ) { // STATUS("Shift %i = %e\n", i, gsl_vector_get(shifts, i)); + if ( isnan(gsl_vector_get(shifts, i)) ) { + gsl_vector_set(shifts, i, 0.0); + } } /* Apply shifts */ |