From 49004f0cc3a573e8a866e0e999c138732683b99f Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 12 Nov 2010 17:07:38 +0100 Subject: Don't cull peaks if badrow direction is not specified --- doc/geometry.txt | 4 +++- src/detector.c | 6 +----- src/peaks.c | 6 ++++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/geometry.txt b/doc/geometry.txt index 414ad634..e24d24df 100644 --- a/doc/geometry.txt +++ b/doc/geometry.txt @@ -43,9 +43,11 @@ n_panels = 1 ; The resolution (in pixels per metre) for this panel 0/res = 13333.3 ; 75 micron pixel size -; The readout direction (x or y). If more than three peaks are found in +; The readout direction (x, y or 0). If more than three peaks are found in ; the same readout region, they are all discarded. This helps to avoid ; problems due to streaks appearing along the readout direction. +; If the badrow direction is '0', then the culling described above will not +; be performed for this panel. 0/badrow_direction = y ; If "no_index" is "true", then peaks in this panel will not be used for diff --git a/src/detector.c b/src/detector.c index d8d385c9..fa3208a6 100644 --- a/src/detector.c +++ b/src/detector.c @@ -395,11 +395,7 @@ struct detector *get_detector_geometry(const char *filename) } STATUS("Panel %i, badrow direction = %c\n", i, det->panels[i].badrow); - if ( det->panels[i].badrow == '0' ) { - ERROR("Please specify the bad row direction for" - " panel %i\n", i); - reject = 1; - } + /* It's OK if the badrow direction is '0' */ /* It's not a problem if "no_index" is still zero */ if ( det->panels[i].max_x > max_x ) { diff --git a/src/peaks.c b/src/peaks.c index e70ebfe2..e7ec9c9e 100644 --- a/src/peaks.c +++ b/src/peaks.c @@ -33,7 +33,7 @@ /* Maximum number of peaks which may be predicted by find_projected_peaks() */ -#define MAX_CPEAKS (1024) +#define MAX_CPEAKS (2048) /* How close a peak must be to an indexed position to be considered "close" * for the purposes of double hit detection and sanity checking. */ @@ -174,7 +174,9 @@ static int cull_peaks(struct image *image) for ( i=0; idet->n_panels; i++ ) { p = &image->det->panels[i]; - nelim += cull_peaks_in_panel(image, p); + if ( p->badrow != '0' ) { + nelim += cull_peaks_in_panel(image, p); + } } return nelim; -- cgit v1.2.3