JFJochReceiver: Save information on crystal lattice and spot indexing status to HDF5 file
This commit is contained in:
+20
-20
@@ -350,11 +350,11 @@ int64_t JFJochReceiver::FrameTransformationThread() {
|
||||
message.number = image_number;
|
||||
message.timestamp_base = 10*1000*1000;
|
||||
message.exptime_base = 10*1000*1000;
|
||||
message.indexing_result = 0;
|
||||
|
||||
bool send_preview = false;
|
||||
bool send_bkg_estimate = false;
|
||||
bool calculate_spots = false;
|
||||
bool index = false;
|
||||
|
||||
if ((preview_publisher != nullptr) && (preview_stride > 0) && (image_number % preview_stride == 0))
|
||||
send_preview = true;
|
||||
@@ -365,8 +365,6 @@ int64_t JFJochReceiver::FrameTransformationThread() {
|
||||
calculate_spots = true;
|
||||
if (rad_int_mapping)
|
||||
send_bkg_estimate = true;
|
||||
if (indexer)
|
||||
index = true;
|
||||
}
|
||||
|
||||
if (experiment.GetSummation() >= threaded_summation_threshold) {
|
||||
@@ -441,29 +439,31 @@ int64_t JFJochReceiver::FrameTransformationThread() {
|
||||
|
||||
if (calculate_spots) {
|
||||
spot_finder->GetSpotFinderResults(experiment, GetDataProcessingSettings(), spots);
|
||||
for (const auto & spot : spots)
|
||||
for (const auto &spot: spots)
|
||||
message.spots.push_back(spot);
|
||||
spot_count.AddElement(image_number, spots.size());
|
||||
}
|
||||
|
||||
if (index) {
|
||||
std::vector<Coord> recip;
|
||||
for (const auto &i: spots)
|
||||
recip.push_back(i.ReciprocalCoord(experiment));
|
||||
if (indexer) {
|
||||
std::vector<Coord> recip;
|
||||
for (const auto &i: spots)
|
||||
recip.push_back(i.ReciprocalCoord(experiment));
|
||||
|
||||
auto indexer_result = indexer->Run(recip);
|
||||
auto indexer_result = indexer->Run(recip);
|
||||
|
||||
if (!indexer_result.empty()) {
|
||||
message.indexing_result = 2;
|
||||
indexing_solution.AddElement(image_number, 1);
|
||||
indexing_solution_per_file.Add(image_number % experiment.GetDataFileCount(), 1);
|
||||
} else {
|
||||
message.indexing_result = 1;
|
||||
indexing_solution.AddElement(image_number, 0);
|
||||
indexing_solution_per_file.Add(image_number % experiment.GetDataFileCount(), 0);
|
||||
if (!indexer_result.empty()) {
|
||||
message.indexing_result = 2;
|
||||
indexing_solution.AddElement(image_number, 1);
|
||||
indexing_solution_per_file.Add(image_number % experiment.GetDataFileCount(), 1);
|
||||
for (int i = 0; i < recip.size(); i++)
|
||||
message.spots[i].indexed = indexer_result[0].indexed_spots[i];
|
||||
indexer_result[0].l.Save(message.indexing_lattice);
|
||||
} else {
|
||||
message.indexing_result = 1;
|
||||
indexing_solution.AddElement(image_number, 0);
|
||||
indexing_solution_per_file.Add(image_number % experiment.GetDataFileCount(), 0);
|
||||
}
|
||||
}
|
||||
} else
|
||||
message.indexing_result = 0;
|
||||
}
|
||||
|
||||
if (send_bkg_estimate) {
|
||||
uint16_t rad_int_min_bin = std::floor(
|
||||
|
||||
Reference in New Issue
Block a user