Remove --soft-weight and --local-snr spot-finder options
Both were opt-in adaptive-spot refinements that did not help. Soft per-spot weighting was index-rate neutral across the battery (re-ranking only bites when spots exceed the max-spot cap, which weak serial data does not reach). The local-SNR gate was neutral on index rate and degraded merged CC1/2 on flooded XFEL data. Drops the flags, ApplyWeights/FilterByLocalSNR, the per-spot weight field, and the by-weight FilterSpotsByCount branch (now strongest-first only). --adaptive-spots itself is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -37,19 +37,14 @@ void MarkIceRings(std::vector<SpotToSave> &spots, float tolerance_q_recipA) {
|
||||
}
|
||||
}
|
||||
|
||||
void FilterSpotsByCount(std::vector<SpotToSave> &input, int64_t count, bool by_weight) {
|
||||
void FilterSpotsByCount(std::vector<SpotToSave> &input, int64_t count) {
|
||||
size_t output_size = std::min<size_t>(input.size(), count);
|
||||
|
||||
std::ranges::partial_sort(input, input.begin() + output_size,
|
||||
std::ranges::less{}, // comparator on the projected key
|
||||
[by_weight](const SpotToSave &s) {
|
||||
// projection: key to compare by. non-ice first (false < true), then
|
||||
// by soft quality weight (higher first) when requested -- so a loose
|
||||
// detector's bright junk cannot evict faint clean Bragg -- else by
|
||||
// raw intensity. Intensity is the tie-breaker under the weight.
|
||||
if (by_weight)
|
||||
return std::tuple{s.ice_ring, -s.weight, -s.intensity};
|
||||
return std::tuple{s.ice_ring, 0.0f, -s.intensity};
|
||||
[](const SpotToSave &s) {
|
||||
// projection: non-ice first (false < true), then strongest intensity first.
|
||||
return std::tuple{s.ice_ring, -s.intensity};
|
||||
});
|
||||
input.resize(output_size);
|
||||
}
|
||||
@@ -156,7 +151,7 @@ void SpotAnalyze(const DiffractionExperiment &experiment,
|
||||
|
||||
output.resolution_estimate = GetResolution(spots_out);
|
||||
|
||||
FilterSpotsByCount(spots_out, experiment.GetMaxSpotCount(), spot_finding_settings.soft_weight);
|
||||
FilterSpotsByCount(spots_out, experiment.GetMaxSpotCount());
|
||||
|
||||
output.spots = spots_out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user