diff options
author | Thomas White <taw@physics.org> | 2018-06-12 11:14:34 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-06-12 11:14:53 +0200 |
commit | 4264dd4d25076beaa5279c496d8e9d00d7bb2334 (patch) | |
tree | 7ea22a8fa042ab5843c27abe7cc0a19245bf83be /libcrystfel/src/peakfinder8.c | |
parent | 20ab32852e6e2a07f3bf554f49f1c41d5b7112b8 (diff) |
peakfinder8: Check peak is actually within panel
From Oleksandr Yefanov <oleksandr.yefanov@desy.de>
Diffstat (limited to 'libcrystfel/src/peakfinder8.c')
-rw-r--r-- | libcrystfel/src/peakfinder8.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libcrystfel/src/peakfinder8.c b/libcrystfel/src/peakfinder8.c index 891a0878..39fe8a79 100644 --- a/libcrystfel/src/peakfinder8.c +++ b/libcrystfel/src/peakfinder8.c @@ -904,6 +904,14 @@ static void process_panel(int asic_size_fs, int asic_size_ss, int num_pix_fs, // different! if (peak_max_i < background_max_i - local_offset) continue; + if ( peak_com_fs < aifs*asic_size_fs + || peak_com_fs > (aifs+1)*asic_size_fs-1 + || peak_com_ss < aiss*asic_size_ss + || peak_com_ss > (aiss+1)*asic_size_ss-1) + { + continue; + } + // This is a peak? If so, add info to peak list if ( num_pix_in_peak >= min_pix_count && num_pix_in_peak <= max_pix_count ) { |