Improvements before MAX IV test
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
// Copyright (2019-2024) Paul Scherrer Institute
|
||||
|
||||
#include "IndexerWrapper.h"
|
||||
#define MAX_SPOT_COUNT_INDEXING 50
|
||||
|
||||
void IndexerWrapper::Setup(const UnitCell &cell) {
|
||||
#ifdef JFJOCH_USE_CUDA
|
||||
@@ -13,12 +12,10 @@ std::vector<IndexingResult> IndexerWrapper::Run(const std::vector<Coord> &coord,
|
||||
#ifdef JFJOCH_USE_CUDA
|
||||
std::vector<IndexingResult> ret;
|
||||
|
||||
if (coord.size() <= min_spots)
|
||||
if (coord.size() <= viable_cell_min_spots)
|
||||
return ret;
|
||||
|
||||
assert(coord.size() < MAX_SPOT_COUNT);
|
||||
|
||||
size_t nspots = std::min<size_t>(MAX_SPOT_COUNT_INDEXING, coord.size());
|
||||
assert(coord.size() <= MAX_SPOT_COUNT);
|
||||
|
||||
for (int i = 0; i < coord.size(); i++) {
|
||||
indexer.spotX(i) = coord[i].x;
|
||||
@@ -27,12 +24,12 @@ std::vector<IndexingResult> IndexerWrapper::Run(const std::vector<Coord> &coord,
|
||||
}
|
||||
|
||||
// Index
|
||||
indexer.index(1, nspots);
|
||||
indexer.index(1, coord.size());
|
||||
|
||||
fast_feedback::refine::indexer_ifssr<float>::refine(indexer.spotM().topRows(coord.size()),
|
||||
indexer.oCellM(),
|
||||
indexer.oScoreV(),
|
||||
fast_feedback::refine::config_ifssr<float>{});
|
||||
cifssr);
|
||||
|
||||
// Find cell most similar to the current one
|
||||
for (unsigned i=0u; i<cpers.max_output_cells; i++)
|
||||
@@ -41,7 +38,8 @@ std::vector<IndexingResult> IndexerWrapper::Run(const std::vector<Coord> &coord,
|
||||
// Get best cell
|
||||
auto id = fast_feedback::refine::best_cell(indexer.oScoreV());
|
||||
|
||||
bool indexed = fast_feedback::refine::is_viable_cell(indexer.oCell(id), indexer.Spots(), indexing_threshold, 9);
|
||||
bool indexed = fast_feedback::refine::is_viable_cell(indexer.oCell(id), indexer.Spots(),
|
||||
indexing_threshold, viable_cell_min_spots);
|
||||
|
||||
// Check if result is viable
|
||||
if (indexed) {
|
||||
|
||||
Reference in New Issue
Block a user