aboutsummaryrefslogtreecommitdiff
path: root/src/check_hkl.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-10-18 15:43:56 +0200
committerThomas White <taw@physics.org>2017-10-19 14:16:30 +0200
commit2ed069ab219098a3b878a890c95c6c3b4191055a (patch)
tree786e856d0f16dd6adb9d751fe77920226329b11c /src/check_hkl.c
parent21181e2de9338859af0f84dd0d42b0d23d22d1bf (diff)
check_hkl: Use symmetry from file
Diffstat (limited to 'src/check_hkl.c')
-rw-r--r--src/check_hkl.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/check_hkl.c b/src/check_hkl.c
index c7afb6cc..3c71d4cc 100644
--- a/src/check_hkl.c
+++ b/src/check_hkl.c
@@ -3,11 +3,11 @@
*
* Characterise reflection lists
*
- * Copyright © 2012-2016 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2012-2017 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
- * 2010-2016 Thomas White <taw@physics.org>
+ * 2010-2017 Thomas White <taw@physics.org>
*
* This file is part of CrystFEL.
*
@@ -690,6 +690,7 @@ int main(int argc, char *argv[])
UnitCell *cell;
char *file = NULL;
char *sym_str = NULL;
+ char *sym_str_fromfile = NULL;
SymOpList *sym;
RefList *raw_list;
RefList *list;
@@ -838,12 +839,6 @@ int main(int argc, char *argv[])
"set!\n");
}
- if ( sym_str == NULL ) {
- sym_str = strdup("1");
- }
- sym = get_pointgroup(sym_str);
- free(sym_str);
-
file = strdup(argv[optind++]);
if ( cellfile == NULL ) {
@@ -857,13 +852,25 @@ int main(int argc, char *argv[])
}
free(cellfile);
- raw_list = read_reflections(file);
+ raw_list = read_reflections_2(file, &sym_str_fromfile);
if ( raw_list == NULL ) {
ERROR("Couldn't read file '%s'\n", file);
return 1;
}
free(file);
+ if ( sym_str == NULL ) {
+ if ( sym_str_fromfile != NULL ) {
+ STATUS("Using symmetry from reflection file: %s\n",
+ sym_str_fromfile);
+ sym_str = sym_str_fromfile;
+ } else {
+ sym_str = strdup("1");
+ }
+ }
+ sym = get_pointgroup(sym_str);
+ free(sym_str);
+
if ( shell_file == NULL ) shell_file = strdup("shells.dat");
/* Check that the intensities have the correct symmetry */