From c908df3b78051f3c4a08d4114d61b5505ae51afc Mon Sep 17 00:00:00 2001 From: Yaroslav Gevorkov Date: Tue, 7 May 2019 19:26:57 +0200 Subject: Add new xgandalf options --- libcrystfel/src/xgandalf.c | 15 +++++++-------- libcrystfel/src/xgandalf.h | 1 + 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'libcrystfel') 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; diff --git a/libcrystfel/src/xgandalf.h b/libcrystfel/src/xgandalf.h index 09dbf7d4..23c5c1b0 100644 --- a/libcrystfel/src/xgandalf.h +++ b/libcrystfel/src/xgandalf.h @@ -47,6 +47,7 @@ struct xgandalf_options { unsigned int no_deviation_from_provided_cell; float minLatticeVectorLength_A; float maxLatticeVectorLength_A; + int maxPeaksForIndexing; }; #include "index.h" -- cgit v1.2.3