aboutsummaryrefslogtreecommitdiff
path: root/tests/pr_l_gradient_check.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-06-25 16:01:51 +0200
committerThomas White <taw@physics.org>2014-06-25 16:01:51 +0200
commitcf34597c5f8583f68eaad22d85c849e1050c922b (patch)
tree4bf919b7591cc6f701157bb48885238e4b3afbfc /tests/pr_l_gradient_check.c
parentdef8bd0c541252e7f606c9286912eb67d3ac5929 (diff)
Pass the partiality model down from the API level
Diffstat (limited to 'tests/pr_l_gradient_check.c')
-rw-r--r--tests/pr_l_gradient_check.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/pr_l_gradient_check.c b/tests/pr_l_gradient_check.c
index 72d353f9..b707629f 100644
--- a/tests/pr_l_gradient_check.c
+++ b/tests/pr_l_gradient_check.c
@@ -89,7 +89,8 @@ static void shift_parameter(struct image *image, int k, double shift)
static void calc_either_side(Crystal *cr, double incr_val,
- int *valid, long double *vals[3], int refine)
+ int *valid, long double *vals[3], int refine,
+ PartialityModel pmodel)
{
RefList *compare;
struct image *image = crystal_get_image(cr);
@@ -97,14 +98,14 @@ static void calc_either_side(Crystal *cr, double incr_val,
im_moved = *image;
shift_parameter(&im_moved, refine, -incr_val);
- compare = find_intersections(&im_moved, cr);
+ compare = find_intersections(&im_moved, cr, pmodel);
scan_partialities(crystal_get_reflections(cr), compare,
valid, vals, 0);
reflist_free(compare);
im_moved = *image;
shift_parameter(&im_moved, refine, +incr_val);
- compare = find_intersections(&im_moved, cr);
+ compare = find_intersections(&im_moved, cr, pmodel);
scan_partialities(crystal_get_reflections(cr), compare,
valid, vals, 2);
reflist_free(compare);
@@ -133,7 +134,7 @@ static double test_gradients(Crystal *cr, double incr_val, int refine,
int n_line;
double cc;
- reflections = find_intersections(crystal_get_image(cr), cr);
+ reflections = find_intersections(crystal_get_image(cr), cr, pmodel);
crystal_set_reflections(cr, reflections);
nref = num_reflections(reflections);
@@ -159,7 +160,7 @@ static double test_gradients(Crystal *cr, double incr_val, int refine,
scan_partialities(reflections, reflections, valid, vals, 1);
- calc_either_side(cr, incr_val, valid, vals, refine);
+ calc_either_side(cr, incr_val, valid, vals, refine, pmodel);
if ( plot ) {
snprintf(tmp, 32, "gradient-test-%s.dat", file);