diff options
author | Thomas White <taw@physics.org> | 2012-10-01 18:33:06 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-10-01 18:36:32 +0200 |
commit | e66759e2af3e761915fa02d842e9e00673452741 (patch) | |
tree | 60067159720e458f9e9fbb192f1dd691d9c500cd | |
parent | 21885b2a40089e51e635912868dcc012b173bcfd (diff) |
make_bgMask() does not need to know the peak coordinates (any more)
Also, s/ir_in/ir_inn/
-rw-r--r-- | libcrystfel/src/peaks.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c index 16692a7f..418e7bde 100644 --- a/libcrystfel/src/peaks.c +++ b/libcrystfel/src/peaks.c @@ -148,7 +148,7 @@ static int cull_peaks(struct image *image) /* cfs, css relative to panel origin */ static int *make_BgMask(struct image *image, struct panel *p, - double ir_out, int cfs, int css, double ir_in) + double ir_out, double ir_inn) { Reflection *refl; RefListIterator *iter; @@ -181,13 +181,13 @@ static int *make_BgMask(struct image *image, struct panel *p, pk2_cfs = pk2_fs - p->min_fs; pk2_css = pk2_ss - p->min_ss; - for ( dfs=-ir_in; dfs<=ir_in; dfs++ ) { - for ( dss=-ir_in; dss<=ir_in; dss++ ) { + for ( dfs=-ir_inn; dfs<=ir_inn; dfs++ ) { + for ( dss=-ir_inn; dss<=ir_inn; dss++ ) { signed int fs, ss; /* In peak region for this peak? */ - if ( dfs*dfs + dss*dss > ir_in*ir_in ) continue; + if ( dfs*dfs + dss*dss > ir_inn*ir_inn ) continue; fs = pk2_cfs + dfs; ss = pk2_css + dss; @@ -241,7 +241,7 @@ static int integrate_peak(struct image *image, int cfs, int css, p_css = css - p->min_ss; /* Panel-relative coordinates */ p_w = p->max_fs - p->min_fs + 1; p_h = p->max_ss - p->min_ss + 1; - bgPkMask = make_BgMask(image, p, ir_out, p_cfs, p_css, ir_inn); + bgPkMask = make_BgMask(image, p, ir_out, ir_inn); if ( bgPkMask == NULL ) return 1; aduph = p->adu_per_eV * ph_lambda_to_eV(image->lambda); |