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.c14
1 files changed, 8 insertions, 6 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;
}