diff options
author | Thomas White <taw@physics.org> | 2020-05-27 16:40:43 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:42:57 +0200 |
commit | ab352f28b1c9d2691e4f39730b0ad5adf056426b (patch) | |
tree | cc00ecb99d79e218c9b41d89765cc90b44963a7e /libcrystfel/src/peaks.c | |
parent | 17fc522b88a8eb425ff094077f8c9d5463647993 (diff) |
Convert make_BgMask to detgeom
Diffstat (limited to 'libcrystfel/src/peaks.c')
-rw-r--r-- | libcrystfel/src/peaks.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c index de024b0d..e4921058 100644 --- a/libcrystfel/src/peaks.c +++ b/libcrystfel/src/peaks.c @@ -64,7 +64,8 @@ /** \file peaks.h */ -static void add_crystal_to_mask(struct image *image, struct panel *p, +static void add_crystal_to_mask(struct image *image, + struct detgeom_panel *p, int pn, double ir_inn, int *mask, Crystal *cr) { Reflection *refl; @@ -81,7 +82,7 @@ static void add_crystal_to_mask(struct image *image, struct panel *p, get_detector_pos(refl, &pk2_fs, &pk2_ss); /* Determine if reflection is in the same panel */ - if ( get_panel(refl) != p ) continue; + if ( get_panel_number(refl) != pn ) continue; for ( dfs=-ir_inn; dfs<=ir_inn; dfs++ ) { for ( dss=-ir_inn; dss<=ir_inn; dss++ ) { @@ -110,7 +111,8 @@ static void add_crystal_to_mask(struct image *image, struct panel *p, /* cfs, css relative to panel origin */ -int *make_BgMask(struct image *image, struct panel *p, double ir_inn) +int *make_BgMask(struct image *image, struct detgeom_panel *p, + int pn, double ir_inn) { int *mask; int i; @@ -121,7 +123,7 @@ int *make_BgMask(struct image *image, struct panel *p, double ir_inn) if ( image->crystals == NULL ) return mask; for ( i=0; i<image->n_crystals; i++ ) { - add_crystal_to_mask(image, p, ir_inn, + add_crystal_to_mask(image, p, pn, ir_inn, mask, image->crystals[i]); } |