diff options
author | Thomas White <taw@physics.org> | 2017-02-06 17:25:04 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-02-27 17:12:41 +0100 |
commit | 7a9103aa277fd080cd0a4e43a03959ce3e5cfd40 (patch) | |
tree | c7b19bded4cc2376d47675e479fb4c858a4abea2 /src/post-refinement.c | |
parent | b2496671f4d75fbfcb7c509f29013604f1db3138 (diff) |
Use new reflection list in residual calculation
Diffstat (limited to 'src/post-refinement.c')
-rw-r--r-- | src/post-refinement.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c index 78ce562e..f20f9832 100644 --- a/src/post-refinement.c +++ b/src/post-refinement.c @@ -42,6 +42,7 @@ #include "geometry.h" #include "cell.h" #include "cell-utils.h" +#include "reflist-utils.h" struct prdata @@ -307,6 +308,7 @@ static double residual_f(const gsl_vector *v, void *pp) struct rf_priv *pv = pp; int i; UnitCell *cell; + RefList *list; Crystal *cr; double res; double ang1 = 0.0; @@ -332,6 +334,8 @@ static double residual_f(const gsl_vector *v, void *pp) cell = rotate_cell_xy(crystal_get_cell_const(pv->cr), ang1, ang2); cr = crystal_copy(pv->cr); + list = copy_reflist(crystal_get_reflections(cr)); + crystal_set_reflections(cr, list); crystal_set_cell(cr, cell); update_predictions(cr); @@ -339,6 +343,7 @@ static double residual_f(const gsl_vector *v, void *pp) res = residual(cr, pv->full, 0, NULL, NULL); cell_free(cell); + reflist_free(list); crystal_free(cr); return res; |