DataProcessingSettings has equivalent C++ and ProtoBuf structures

This commit is contained in:
2023-11-11 18:48:38 +01:00
parent f505ec6532
commit eaf7792459
18 changed files with 167 additions and 77 deletions
+5 -5
View File
@@ -89,7 +89,7 @@ void StrongPixelSet::ExtendSpot(DiffractionSpot &spot, std::unordered_map<uint32
AddNeighbor(spot, col, line-1);
}
void StrongPixelSet::FindSpots(const DiffractionExperiment &experiment, const JFJochProtoBuf::DataProcessingSettings &settings,
void StrongPixelSet::FindSpots(const DiffractionExperiment &experiment, const DataProcessingSettings &settings,
std::vector<DiffractionSpot> &spots) {
std::multimap<double, DiffractionSpot> spots_map;
@@ -98,10 +98,10 @@ void StrongPixelSet::FindSpots(const DiffractionExperiment &experiment, const JF
DiffractionSpot spot = BuildSpot(iter);
double d = spot.GetResolution(experiment);
if ((spot.PixelCount() <= settings.max_pix_per_spot())
&& (spot.PixelCount() >= settings.min_pix_per_spot())
&& ((settings.low_resolution_limit() < 0) || (d <= settings.low_resolution_limit()))
&& ((settings.high_resolution_limit() < 0) || (d >= settings.high_resolution_limit())))
if ((spot.PixelCount() <= settings.max_pix_per_spot)
&& (spot.PixelCount() >= settings.min_pix_per_spot)
&& ((settings.low_resolution_limit < 0) || (d <= settings.low_resolution_limit))
&& ((settings.high_resolution_limit < 0) || (d >= settings.high_resolution_limit)))
spots_map.insert(std::make_pair(-static_cast<float>(d), spot));
}