aboutsummaryrefslogtreecommitdiff
path: root/src/detector.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-11-16 09:46:47 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:05 +0100
commit684a946c37e74971f1466078536228d46a6467b1 (patch)
tree2412282b9996b08d83d92f02dfb692b9244c5290 /src/detector.c
parent07baa642d688b5d70df61615c7c3585733995f85 (diff)
Honour --no-index (again), take peak separation in geometry file
Diffstat (limited to 'src/detector.c')
-rw-r--r--src/detector.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/detector.c b/src/detector.c
index da423235..6a80ac0c 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -265,6 +265,7 @@ struct detector *get_detector_geometry(const char *filename)
det->panels[i].res = -1;
det->panels[i].badrow = '0';
det->panels[i].no_index = 0;
+ det->panels[i].peak_sep = 50.0;
}
continue;
@@ -311,6 +312,8 @@ struct detector *get_detector_geometry(const char *filename)
det->panels[np].clen = atof(bits[2]);
} else if ( strcmp(path[1], "res") == 0 ) {
det->panels[np].res = atof(bits[2]);
+ } else if ( strcmp(path[1], "peak_sep") == 0 ) {
+ det->panels[np].peak_sep = atof(bits[2]);
} else if ( strcmp(path[1], "badrow_direction") == 0 ) {
det->panels[np].badrow = bits[2][0];
if ( (det->panels[np].badrow != 'x')
@@ -397,6 +400,7 @@ struct detector *get_detector_geometry(const char *filename)
det->panels[i].badrow);
/* It's OK if the badrow direction is '0' */
/* It's not a problem if "no_index" is still zero */
+ /* The default peak_sep is OK (maybe) */
if ( det->panels[i].max_x > max_x ) {
max_x = det->panels[i].max_x;