aboutsummaryrefslogtreecommitdiff
path: root/tests/linear_scale_check.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-05-03 14:35:32 +0200
committerThomas White <taw@physics.org>2018-05-07 10:08:02 +0200
commitd1a2c71235611ad878fa9bc705c6eff1a04b3600 (patch)
tree5a05d4abcc6b980ec67c0236d1a0c4be1412f539 /tests/linear_scale_check.c
parent5790b06b2e0080c48e1e9a33eb0b43914f2b5824 (diff)
Simplify scaling
Diffstat (limited to 'tests/linear_scale_check.c')
-rw-r--r--tests/linear_scale_check.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/linear_scale_check.c b/tests/linear_scale_check.c
index 5c723849..439cff36 100644
--- a/tests/linear_scale_check.c
+++ b/tests/linear_scale_check.c
@@ -43,10 +43,11 @@ int main(int argc, char *argv[])
int fail = 0;
int i;
gsl_rng *rng;
+ Crystal *cr;
RefList *list1;
RefList *list2;
- double G, B;
int r;
+ UnitCell *cell;
list1 = reflist_new();
list2 = reflist_new();
@@ -66,12 +67,22 @@ int main(int argc, char *argv[])
intens = gsl_rng_uniform(rng); /* [0,1) */
set_intensity(refl1, intens);
set_partiality(refl1, 1.0);
+ set_lorentz(refl1, 1.0);
set_intensity(refl2, intens*2.0);
set_partiality(refl2, 1.0);
+ set_lorentz(refl2, 1.0);
}
- r = scale_one(list1, list2, SCALE_NO_B, &G, &B);
- STATUS("Scaling result: %i, G = %f\n", r, G);
+ cr = crystal_new();
+ cell = cell_new();
+ cell_set_parameters(cell, 50e-10, 50e-10, 50e-10,
+ deg2rad(90), deg2rad(90), deg2rad(90));
+ crystal_set_reflections(cr, list1);
+ crystal_set_cell(cr, cell);
+
+ r = scale_one_crystal(cr, list2, SCALE_NO_B);
+ STATUS("Scaling result: %i, G = %f, B = %e\n", r,
+ crystal_get_osf(cr), crystal_get_Bfac(cr));
return fail;
}