diff options
author | Thomas White <taw@physics.org> | 2020-04-06 16:12:28 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:42:57 +0200 |
commit | 1f00febd2ce3492e080afebf8d1c6368a19ae4e7 (patch) | |
tree | 2894b294575248567c507e8e0690b7936582b550 /src | |
parent | e342600debbbefb8c36e246f78a253e709be75a7 (diff) |
Split off parse_peaksearch()
Diffstat (limited to 'src')
-rw-r--r-- | src/indexamajig.c | 17 | ||||
-rw-r--r-- | src/process_image.c | 1 |
2 files changed, 3 insertions, 15 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index 620026ad..e44f9576 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -225,21 +225,8 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state) break; case 301 : - if ( strcmp(arg, "zaef") == 0 ) { - args->iargs.peaks = PEAK_ZAEF; - } else if ( strcmp(arg, "peakfinder8") == 0 ) { - args->iargs.peaks = PEAK_PEAKFINDER8; - } else if ( strcmp(arg, "hdf5") == 0 ) { - args->iargs.peaks = PEAK_HDF5; - } else if ( strcmp(arg, "cxi") == 0 ) { - args->iargs.peaks = PEAK_CXI; - } else if ( strcmp(arg, "peakfinder9") == 0 ) { - args->iargs.peaks = PEAK_PEAKFINDER9; - } else if ( strcmp(arg, "msgpack") == 0 ) { - args->iargs.peaks = PEAK_MSGPACK; - } else if ( strcmp(arg, "none") == 0 ) { - args->iargs.peaks = PEAK_NONE; - } else { + args->iargs.peaks = parse_peaksearch(arg); + if ( args->iargs.peaks == PEAK_ERROR ) { ERROR("Unrecognised peak detection method '%s'\n", arg); return EINVAL; } diff --git a/src/process_image.c b/src/process_image.c index a7640718..b71fbec3 100644 --- a/src/process_image.c +++ b/src/process_image.c @@ -395,6 +395,7 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs, break; case PEAK_NONE: + case PEAK_ERROR: break; } |