aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-02-14 17:32:06 -0800
committerThomas White <taw@physics.org>2012-02-22 15:27:14 +0100
commit66913c316206cd4970a4480ac7131a0077a9c752 (patch)
tree895b4f9cb6e05269fa6e8193431a239b967e4ece /src
parentfb6ea76376f45bb8cb5183652586d0c0fa134e17 (diff)
Allow badrow_direction = -
Diffstat (limited to 'src')
-rw-r--r--src/detector.c9
-rw-r--r--src/peaks.c5
2 files changed, 6 insertions, 8 deletions
diff --git a/src/detector.c b/src/detector.c
index 6a80ac0c..af7b0c0d 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -317,10 +317,11 @@ struct detector *get_detector_geometry(const char *filename)
} else if ( strcmp(path[1], "badrow_direction") == 0 ) {
det->panels[np].badrow = bits[2][0];
if ( (det->panels[np].badrow != 'x')
- && (det->panels[np].badrow != 'y') ) {
- ERROR("badrow_direction must be 'x' or 'y'\n");
- ERROR("Assuming 'x'\n.");
- det->panels[np].badrow = 'x';
+ && (det->panels[np].badrow != 'y')
+ && (det->panels[np].badrow != '-') ) {
+ ERROR("badrow_direction must be x, y or '-'\n");
+ ERROR("Assuming '-'\n.");
+ det->panels[np].badrow = '-';
}
} else if ( strcmp(path[1], "no_index") == 0 ) {
det->panels[np].no_index = atob(bits[2]);
diff --git a/src/peaks.c b/src/peaks.c
index c9dbe8e0..99c82323 100644
--- a/src/peaks.c
+++ b/src/peaks.c
@@ -115,10 +115,7 @@ static int cull_peaks_in_panel(struct image *image, struct panel *p)
if ( fabs(f->y - g->y) < 2.0 ) ncol++;
} else if ( p->badrow == 'y' ) {
if ( fabs(f->x - g->x) < 2.0 ) ncol++;
- } else {
- ERROR("Invalid badrow direction.\n");
- abort();
- }
+ } /* else do nothing */
}