jfjoch_indexing_test: Rotation indexer test (for the time being)
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
#include "../reader/JFJochHDF5Reader.h"
|
||||
#include "../image_analysis/indexing/IndexerFactory.h"
|
||||
#include "../common/Logger.h"
|
||||
#include "../image_analysis/RotationIndexer.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
Logger logger("jfjoch_indexing_test");
|
||||
|
||||
/*
|
||||
if (argc != 2) {
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Usage: ./jfjoch_indexing_test <file>");
|
||||
}
|
||||
@@ -20,9 +20,11 @@ int main(int argc, char** argv) {
|
||||
|
||||
DiffractionExperiment experiment(reader.GetDataset()->experiment);
|
||||
experiment.IndexingAlgorithm(IndexingAlgorithmEnum::Auto);
|
||||
// experiment.SetUnitCell(UnitCell(37,78,78,90,90,90));
|
||||
auto indexer = CreateIndexer(experiment);
|
||||
|
||||
IndexerThreadPool indexer(experiment.GetIndexingSettings());
|
||||
|
||||
auto geom = experiment.GetDiffractionGeometry();
|
||||
RotationIndexer rot_index(experiment, indexer);
|
||||
|
||||
for (int i = 0; i < reader.GetNumberOfImages(); i++) {
|
||||
auto img = reader.LoadImage(i);
|
||||
@@ -31,24 +33,18 @@ int main(int argc, char** argv) {
|
||||
continue;
|
||||
|
||||
DataMessage msg = img->ImageData();
|
||||
std::vector<Coord> recip;
|
||||
recip.reserve(msg.spots.size());
|
||||
for (const auto &s: msg.spots) {
|
||||
if (!s.ice_ring)
|
||||
recip.emplace_back(s.ReciprocalCoord(geom));
|
||||
}
|
||||
auto output = indexer->Run(msg);
|
||||
|
||||
logger.Info("Result {} {}", msg.number, msg.indexing_result.value_or(0));
|
||||
if (msg.indexing_lattice) {
|
||||
auto a = msg.indexing_lattice->Vec0();
|
||||
auto output = rot_index.ProcessImage(i, msg.spots);
|
||||
|
||||
auto b = msg.indexing_lattice->Vec1();
|
||||
auto c = msg.indexing_lattice->Vec2();
|
||||
logger.Info("Result {} {}", msg.number, output.has_value());
|
||||
if (output.has_value()) {
|
||||
auto a = output->Vec0();
|
||||
auto b = output->Vec1();
|
||||
auto c = output->Vec2();
|
||||
|
||||
logger.Info("Lattice {:8.02f} {:8.02f} {:8.02f} {:8.02f} {:8.02f} {:8.02f} {:8.02f} {:8.02f} {:8.02f}",
|
||||
a[0],a[1],a[2],b[0],b[1],b[2],c[0],c[1], c[2]);
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user