Files
Jungfraujoch/image_analysis/spot_finding/SpotUtils.h
T
leonarski_fandClaude Opus 4.8 20bbcb1cd3 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>
2026-07-25 17:31:35 +02:00

36 lines
1.4 KiB
C++

// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#pragma once
#include "../../common/DiffractionSpot.h"
void GenerateSpotPlot(DataMessage &msg, const std::vector<SpotToSave> &spots, float d_min_A);
void CountSpots(DataMessage &msg,
const DiffractionExperiment& experiment,
const std::vector<DiffractionSpot> &spots,
float d_min_A);
void CountSpots(DataMessage &msg,
const std::vector<SpotToSave> &spots,
float d_min_A);
void MarkIceRings(std::vector<SpotToSave> &spots, float tolerance_q_recipA);
void FilterSpotsByCount(std::vector<SpotToSave> &input, int64_t count);
void FilterSpuriousHighResolutionSpots(std::vector<SpotToSave> &spots, float threshold);
// Ignore high res. spots if there is a gap in (1/d) between two spots of dist_threshold (default: 0.25 A^-1)
// For less than 4 spots - don't provide resolution estimation
// For less than 20 spots - take the third best high resolution
// For 20 spots or more - take the 95% percentile best high resolution spot
std::optional<float> GetResolution(const std::vector<SpotToSave> &spots);
void SpotAnalyze(const DiffractionExperiment &experiment,
const SpotFindingSettings &settings,
const std::vector<DiffractionSpot> &spots,
DataMessage &message);