From 7e2e2a70a1a7f60d9dabe3b4b79f334192309e98 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 15 Jun 2015 12:13:14 +0200 Subject: ambigator: Change order of checking command line options This allows a useful possibility of using only -y/-w to calculate a left coset decomposition. --- src/ambigator.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/ambigator.c b/src/ambigator.c index 39609e5f..2268b400 100644 --- a/src/ambigator.c +++ b/src/ambigator.c @@ -3,13 +3,13 @@ * * Resolve indexing ambiguities * - * Copyright © 2014 Deutsches Elektronen-Synchrotron DESY, - * a research centre of the Helmholtz Association. + * Copyright © 2014-2015 Deutsches Elektronen-Synchrotron DESY, + * a research centre of the Helmholtz Association. * Copyright © 2014 Wolfgang Brehm * * Authors: - * 2014 Thomas White - * 2014 Wolfgang Brehm + * 2014-2015 Thomas White + * 2014 Wolfgang Brehm * * This file is part of CrystFEL. * @@ -1049,18 +1049,6 @@ int main(int argc, char *argv[]) } - if ( argc != (optind+1) ) { - ERROR("Please provide exactly one stream filename.\n"); - return 1; - } - - infile = argv[optind++]; - st = open_stream_for_read(infile); - if ( st == NULL ) { - ERROR("Failed to open input stream '%s'\n", infile); - return 1; - } - if ( s_sym_str == NULL ) { ERROR("You must specify the input symmetry (with -y)\n"); return 1; @@ -1111,6 +1099,19 @@ int main(int argc, char *argv[]) } } + if ( argc != (optind+1) ) { + ERROR("Please provide exactly one stream filename.\n"); + return 1; + } + + infile = argv[optind++]; + st = open_stream_for_read(infile); + if ( st == NULL ) { + ERROR("Failed to open input stream '%s'\n", infile); + return 1; + } + + crystals = NULL; n_crystals = 0; max_crystals = 0; -- cgit v1.2.3