aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/xgandalf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src/xgandalf.c')
-rw-r--r--libcrystfel/src/xgandalf.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/libcrystfel/src/xgandalf.c b/libcrystfel/src/xgandalf.c
index 1900d784..98ef44d0 100644
--- a/libcrystfel/src/xgandalf.c
+++ b/libcrystfel/src/xgandalf.c
@@ -203,10 +203,6 @@ void *xgandalf_prepare(IndexingMethod *indm, UnitCell *cell,
FAKE_REFLECTION_RADIUS);
xgandalf_private_data->indexer = IndexerPlain_new(experimentSettings);
- IndexerPlain_setSamplingPitch(xgandalf_private_data->indexer,
- samplingPitch);
- IndexerPlain_setGradientDescentIterationsCount(xgandalf_private_data->indexer,
- gradientDescentIterationsCount);
if (xgandalf_opts->no_deviation_from_provided_cell) {
IndexerPlain_setRefineWithExactLattice(xgandalf_private_data->indexer, 1);
@@ -231,14 +227,17 @@ void *xgandalf_prepare(IndexingMethod *indm, UnitCell *cell,
FAKE_REFLECTION_RADIUS);
xgandalf_private_data->indexer = IndexerPlain_new(experimentSettings);
- IndexerPlain_setSamplingPitch(xgandalf_private_data->indexer,
- samplingPitch);
- IndexerPlain_setGradientDescentIterationsCount(xgandalf_private_data->indexer,
- gradientDescentIterationsCount);
ExperimentSettings_delete(experimentSettings);
}
+ IndexerPlain_setSamplingPitch(xgandalf_private_data->indexer,
+ samplingPitch);
+ IndexerPlain_setGradientDescentIterationsCount(xgandalf_private_data->indexer,
+ gradientDescentIterationsCount);
+ IndexerPlain_setMaxPeaksToUseForIndexing(xgandalf_private_data->indexer,
+ xgandalf_opts->maxPeaksForIndexing);
+
/* Flags that XGANDALF knows about */
*indm &= INDEXING_METHOD_MASK | INDEXING_USE_CELL_PARAMETERS;