Remove jfjoch_indexing_test, as it is not used anymore
This commit is contained in:
@@ -35,10 +35,6 @@ ADD_EXECUTABLE(jfjoch_lite_perf_test jfjoch_lite_perf_test.cpp)
|
||||
TARGET_LINK_LIBRARIES(jfjoch_lite_perf_test JFJochReceiver JFJochWriter)
|
||||
INSTALL(TARGETS jfjoch_lite_perf_test RUNTIME COMPONENT jfjoch)
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_indexing_test jfjoch_indexing_test.cpp)
|
||||
TARGET_LINK_LIBRARIES(jfjoch_indexing_test JFJochReader JFJochImageAnalysis JFJochWriter)
|
||||
INSTALL(TARGETS jfjoch_indexing_test RUNTIME COMPONENT jfjoch)
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_extract_hkl jfjoch_extract_hkl.cpp
|
||||
XdsIntegrateParser.cpp
|
||||
XdsIntegrateParser.h)
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
#include "../reader/JFJochHDF5Reader.h"
|
||||
#include "../image_analysis/indexing/IndexerFactory.h"
|
||||
#include "../common/Logger.h"
|
||||
#include "../image_analysis/IndexAndRefine.h"
|
||||
#include "../image_analysis/bragg_prediction/BraggPredictionFactory.h"
|
||||
#include "../writer/FileWriter.h"
|
||||
#include "../image_analysis/indexing/AnalyzeIndexing.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
Logger logger("jfjoch_indexing_test");
|
||||
|
||||
if (argc != 2) {
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Usage: ./jfjoch_indexing_test <file>");
|
||||
}
|
||||
|
||||
JFJochHDF5Reader reader;
|
||||
reader.ReadFile(argv[1]);
|
||||
if (!reader.GetDataset())
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Error opening file");
|
||||
|
||||
IndexingSettings indexing_settings;
|
||||
indexing_settings.Algorithm(IndexingAlgorithmEnum::FFT);
|
||||
indexing_settings.RotationIndexing(true);
|
||||
indexing_settings.GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum::BeamCenter);
|
||||
DiffractionExperiment experiment(reader.GetDataset()->experiment);
|
||||
experiment.ImportIndexingSettings(indexing_settings);
|
||||
experiment.SetUnitCell({});
|
||||
experiment.FilePrefix("output");
|
||||
|
||||
StartMessage msg;
|
||||
experiment.FillMessage(msg);
|
||||
// FileWriter fw(msg);
|
||||
|
||||
IndexerThreadPool indexer(experiment.GetIndexingSettings());
|
||||
SpotFindingSettings settings{};
|
||||
settings.quick_integration = false;
|
||||
settings.indexing = true;
|
||||
|
||||
auto geom = experiment.GetDiffractionGeometry();
|
||||
IndexAndRefine rot_index(experiment, &indexer);
|
||||
|
||||
auto prediction = CreateBraggPrediction();
|
||||
|
||||
int cnt = 0;
|
||||
for (int i = 0; i < reader.GetNumberOfImages(); i++) {
|
||||
auto img = reader.LoadImage(i);
|
||||
|
||||
if (!img)
|
||||
continue;
|
||||
|
||||
DataMessage msg = img->ImageData();
|
||||
|
||||
rot_index.ProcessImage(msg, settings, msg.image, *prediction);
|
||||
|
||||
if (msg.indexing_result && msg.indexing_result.value())
|
||||
cnt++;
|
||||
|
||||
if (i % 200 == 0)
|
||||
logger.Info("Image {} {}", i, cnt);
|
||||
|
||||
}
|
||||
auto latt_1 = rot_index.Finalize();
|
||||
if (latt_1) {
|
||||
auto uc = latt_1->lattice.GetUnitCell();
|
||||
logger.Info("Unit cell {} {} {} {} {} {}", uc.a, uc.b, uc.c, uc.alpha, uc.beta, uc.gamma);
|
||||
logger.Info("Latt1 {} {} {}", latt_1->lattice.Vec0().x, latt_1->lattice.Vec0().y, latt_1->lattice.Vec0().z);
|
||||
logger.Info("Latt1 {} {} {}", latt_1->lattice.Vec1().x, latt_1->lattice.Vec1().y, latt_1->lattice.Vec1().z);
|
||||
logger.Info("Latt1 {} {} {}", latt_1->lattice.Vec2().x, latt_1->lattice.Vec2().y, latt_1->lattice.Vec2().z);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user