aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-03-12 11:26:01 +0100
committerThomas White <taw@physics.org>2021-03-12 12:01:15 +0100
commit0cc8a3db1a6e57f64275deab0da2b31a15fdbb69 (patch)
tree73cfb6840c02148e048c4d3e08613443e3caf685 /libcrystfel
parent87d60b8110e68ab42052588f275506eaca4f521f (diff)
Clean up after merge
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/index.c14
-rw-r--r--libcrystfel/src/index.h2
2 files changed, 9 insertions, 7 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c
index c2f79eff..341abf58 100644
--- a/libcrystfel/src/index.c
+++ b/libcrystfel/src/index.c
@@ -63,9 +63,9 @@
#include "uthash.h"
-
/** \file index.h */
+
struct _indexingprivate
{
IndexingFlags flags;
@@ -79,6 +79,7 @@ struct _indexingprivate
void **engine_private;
};
+
static const char *onoff(int a)
{
if ( a ) return "on";
@@ -99,6 +100,7 @@ static void set_last_task(char *lt, const char *task)
strcpy(lt, task);
}
+
static void show_indexing_flags(IndexingFlags flags)
{
STATUS("Indexing parameters:\n");
@@ -404,7 +406,7 @@ IndexingPrivate *setup_indexing(const char *method_list,
pinkIndexer_opts,
felix_opts,
ttopts,
- filename);
+ filename);
if ( ipriv->engine_private[i] == NULL ) return NULL;
@@ -639,8 +641,7 @@ static int try_indexer(struct image *image, IndexingMethod indm,
case INDEXING_FILE :
set_last_task(last_task, "indexing:file");
- int crystal_number = 0;
- r = fromfile_index(image, mpriv, crystal_number);
+ r = fromfile_index(image, mpriv, 0);
break;
case INDEXING_FELIX :
@@ -942,7 +943,7 @@ void index_pattern_3(struct image *image, IndexingPrivate *ipriv, int *ping,
int ntry = 0;
int success = 0;
- if ( ipriv->methods[0] != INDEXING_FILE){
+ if ( ipriv->methods[0] != INDEXING_FILE ) {
image->features = sort_peaks(orig);
}
@@ -960,7 +961,7 @@ void index_pattern_3(struct image *image, IndexingPrivate *ipriv, int *ping,
} while ( !done );
- if ( ipriv->methods[0] != INDEXING_FILE){
+ if ( ipriv->methods[0] != INDEXING_FILE ) {
image_feature_list_free(image->features);
}
@@ -979,6 +980,7 @@ void index_pattern_3(struct image *image, IndexingPrivate *ipriv, int *ping,
image->indexed_by = INDEXING_NONE;
}
+ image->features = orig;
}
diff --git a/libcrystfel/src/index.h b/libcrystfel/src/index.h
index 92406604..5cee29b2 100644
--- a/libcrystfel/src/index.h
+++ b/libcrystfel/src/index.h
@@ -73,7 +73,7 @@ typedef enum {
INDEXING_FELIX = 4, /**< Invoke Felix program */
INDEXING_XDS = 5, /**< Invoke XDS program (NB not nXDS) */
INDEXING_SIMULATION = 6, /**< Dummy value for simulated data */
- INDEXING_FILE = 7, /**< Results injector for debugging */
+ INDEXING_FILE = 7, /**< Results injector for debugging */
INDEXING_ASDF = 8, /**< Use built-in ASDF algorithm */
INDEXING_TAKETWO = 9, /**< Use built-in TakeTwo algorithm */
INDEXING_XGANDALF = 10, /**< Use XGANDALF (via optional library) */