aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-06-15 12:13:14 +0200
committerThomas White <taw@physics.org>2015-06-15 12:13:14 +0200
commit7e2e2a70a1a7f60d9dabe3b4b79f334192309e98 (patch)
treeb80dc42ce78f1b51a84ec807c927a9499c73bb51 /src
parentd2e5a1f21accc015e5b0fdb89a37a84ebd879f9f (diff)
ambigator: Change order of checking command line options
This allows a useful possibility of using only -y/-w to calculate a left coset decomposition.
Diffstat (limited to 'src')
-rw-r--r--src/ambigator.c33
1 files 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 <taw@physics.org>
- * 2014 Wolfgang Brehm <wolfgang.brehm@gmail.com>
+ * 2014-2015 Thomas White <taw@physics.org>
+ * 2014 Wolfgang Brehm <wolfgang.brehm@gmail.com>
*
* 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;