aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2013-06-01 11:57:04 -0700
committerThomas White <taw@bitwiz.org.uk>2013-06-01 12:04:54 -0700
commitaa52e32da9b6ad7982a025f516138d8ed97353e5 (patch)
tree15d091d8d373c6efbbc92b57b8ab430d175fe91a /libcrystfel/src
parent8e4283e4b2e7ca141919768559bf7754bd7eee5c (diff)
prof2d: Use the same mask as rings
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/integration.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c
index 3082333b..5e7066c2 100644
--- a/libcrystfel/src/integration.c
+++ b/libcrystfel/src/integration.c
@@ -1092,7 +1092,8 @@ static int suitable_reference(struct intcontext *ic, struct peak_box *bx)
static void measure_all_intensities(IntegrationMethod meth, RefList *list,
- struct image *image, UnitCell *cell)
+ struct image *image, UnitCell *cell,
+ double ir_inn, double ir_mid, double ir_out)
{
Reflection *refl;
RefListIterator *iter;
@@ -1100,7 +1101,7 @@ static void measure_all_intensities(IntegrationMethod meth, RefList *list,
int i;
int n_saturated = 0;
- ic.halfw = 4;
+ ic.halfw = ir_out;
ic.image = image;
ic.k = 1.0/image->lambda;
ic.cell = cell;
@@ -1109,6 +1110,8 @@ static void measure_all_intensities(IntegrationMethod meth, RefList *list,
return;
}
+ setup_ring_masks(&ic, ir_inn, ir_mid, ir_out);
+
for ( refl = first_refl(list, &iter);
refl != NULL;
refl = next_refl(refl, iter) )
@@ -1245,7 +1248,8 @@ static void measure_all_intensities(IntegrationMethod meth, RefList *list,
static void estimate_mosaicity(IntegrationMethod meth, Crystal *cr,
- struct image *image)
+ struct image *image,
+ double ir_inn, double ir_mid, double ir_out)
{
int msteps = 50;
int i;
@@ -1258,7 +1262,8 @@ static void estimate_mosaicity(IntegrationMethod meth, Crystal *cr,
crystal_set_mosaicity(cr, mmax);
list = find_intersections(image, cr);
crystal_set_reflections(cr, list);
- measure_all_intensities(meth, list, image, crystal_get_cell(cr));
+ measure_all_intensities(meth, list, image, crystal_get_cell(cr),
+ ir_inn, ir_mid, ir_out);
for ( i=1; i<=msteps; i++ ) {
@@ -1427,7 +1432,8 @@ static void integrate_prof2d(IntegrationMethod meth, Crystal *cr,
/* Create initial list of reflections with nominal parameters */
reflections = find_intersections(image, cr);
- measure_all_intensities(meth, reflections, image, cell);
+ measure_all_intensities(meth, reflections, image, cell,
+ ir_inn, ir_mid, ir_out);
/* Find resolution limit of pattern using this list */
//estimate_resolution(reflections, cr, image);
@@ -1443,7 +1449,7 @@ static void integrate_prof2d(IntegrationMethod meth, Crystal *cr,
/* Create new list of reflections with refined mosaicity */
//reflections = find_intersections(image, cr);
- //measure_all_intensities(reflections, image);
+ //measure_all_intensities(reflections, image, ir_inn, ir_mid, ir_out);
crystal_set_reflections(cr, reflections);
//estimate_resolution(reflections, cr, image);