aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/index.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src/index.c')
-rw-r--r--libcrystfel/src/index.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c
index 0ab467a6..311dc2ce 100644
--- a/libcrystfel/src/index.c
+++ b/libcrystfel/src/index.c
@@ -316,6 +316,19 @@ static IndexingMethod set_lattice(IndexingMethod a)
}
+/* Set the indexer flags for "use no unit cell parameters" */
+static IndexingMethod set_nocellparams(IndexingMethod a)
+{
+ return a & ~INDEXING_USE_CELL_PARAMETERS;
+}
+
+
+/* Set the indexer flags for "use unit cell parameters" */
+static IndexingMethod set_cellparams(IndexingMethod a)
+{
+ return a | INDEXING_USE_CELL_PARAMETERS;
+}
+
char *indexer_str(IndexingMethod indm)
{
char *str;
@@ -379,6 +392,12 @@ char *indexer_str(IndexingMethod indm)
strcat(str, "-nolatt");
}
+ if ( indm & INDEXING_USE_CELL_PARAMETERS ) {
+ strcat(str, "-cell");
+ } else {
+ strcat(str, "-nocell");
+ }
+
return str;
}
@@ -433,6 +452,12 @@ IndexingMethod *build_indexer_list(const char *str)
} else if ( strcmp(methods[i], "nolatt") == 0) {
list[nmeth] = set_nolattice(list[nmeth]);
+ } else if ( strcmp(methods[i], "cell") == 0) {
+ list[nmeth] = set_cellparams(list[nmeth]);
+
+ } else if ( strcmp(methods[i], "nocell") == 0) {
+ list[nmeth] = set_nocellparams(list[nmeth]);
+
} else {
ERROR("Bad list of indexing methods: '%s'\n", str);
return NULL;