diff --git a/image_analysis/SpotAnalyze.cpp b/image_analysis/SpotAnalyze.cpp index b39780e9..accc6c08 100644 --- a/image_analysis/SpotAnalyze.cpp +++ b/image_analysis/SpotAnalyze.cpp @@ -27,12 +27,12 @@ void SpotAnalyze(const DiffractionExperiment &experiment, CountSpots(output, spots_out, spot_finding_settings.cutoff_spot_count_low_res); + output.resolution_estimate = GetResolution(spots_out); + FilterSpotsByCount(spots_out, experiment.GetMaxSpotCount()); output.spots = spots_out; - output.resolution_estimate = GetResolution(output.spots); - if ((indexer != nullptr) && spot_finding_settings.indexing) { auto latt_f = indexer->Run(experiment, output); auto latt = latt_f.get();