35 lines
1004 B
C++
35 lines
1004 B
C++
// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#ifndef JFJOCH_INDEXER_H
|
|
#define JFJOCH_INDEXER_H
|
|
|
|
#include <optional>
|
|
|
|
#include "../../common/CrystalLattice.h"
|
|
|
|
#include "../../common/DiffractionExperiment.h"
|
|
#include "../../common/JFJochMessages.h"
|
|
#include "../../common/SpotToSave.h"
|
|
|
|
|
|
class Indexer {
|
|
protected:
|
|
int64_t viable_cell_min_spots = 9;
|
|
float indexing_tolerance = 0.1;
|
|
float dist_tolerance_vs_reference = 0.05;
|
|
bool index_ice_rings = true;
|
|
|
|
DiffractionGeometry geom;
|
|
std::optional<UnitCell> reference_unit_cell;
|
|
|
|
virtual void SetupUnitCell(const std::optional<UnitCell>& cell) = 0;
|
|
public:
|
|
virtual ~Indexer() = default;
|
|
void Setup(const DiffractionExperiment& experiment);
|
|
virtual std::vector<CrystalLattice> Run(const std::vector<Coord> &coord, size_t nspots) = 0;
|
|
std::optional<CrystalLattice> Run(DataMessage &message);
|
|
};
|
|
|
|
#endif //JFJOCH_INDEXER_H
|