Spot plot: the resolution axis comes from the detector, not from 1.5 A
Dropping the fixed spot-finding limit left the reader still generating the spot-vs-resolution plot over shells that stop at 1.5 A, so a stored file reopened in the viewer showed a plot truncated at exactly the limit that was removed - GenerateSpotPlot drops every spot outside its shells. Pass the detector's own maximum resolution, as SpotAnalyze already does. That value is 0 when the geometry gives no scattering angle at all (no distance or no wavelength), and ResolutionShells throws on a non-positive d_min, once per image. There is no resolution axis to plot against in that case, so skip the plot. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -98,6 +98,10 @@ std::optional<float> GetResolution(const std::vector<SpotToSave> &spots) {
|
||||
|
||||
void GenerateSpotPlot(DataMessage &msg, const std::vector<SpotToSave> &spots, float d_min_A) {
|
||||
const int nshells = 20;
|
||||
// The geometry gives no usable high-resolution corner (no distance or no wavelength), so there is
|
||||
// no resolution axis to plot the spots against. ResolutionShells would throw on it, once per image.
|
||||
if (d_min_A <= 0.0f || d_min_A >= 50.0f)
|
||||
return;
|
||||
ResolutionShells shells(d_min_A, 50.0, nshells);
|
||||
|
||||
std::vector<float> intensity(nshells);
|
||||
|
||||
Reference in New Issue
Block a user