diff --git a/image_analysis/scale_merge/ResolutionCutoff.cpp b/image_analysis/scale_merge/ResolutionCutoff.cpp index 6796d3ffe..9f7b5aa62 100644 --- a/image_analysis/scale_merge/ResolutionCutoff.cpp +++ b/image_analysis/scale_merge/ResolutionCutoff.cpp @@ -244,7 +244,6 @@ ResolutionCutoffResult ComputeCCHalfLogisticCutoff(const std::vector= s_hi) { - result.extension_past_edge = true; result.note = "CC1/2 does not fall off within the measured range"; return result; } @@ -279,8 +278,7 @@ std::optional ApplyResolutionCutoff(std::vector &merge double cc_target, bool for_search, Logger &logger, - std::optional *fit_limit_out, - std::optional whole_ring_d) { + std::optional *fit_limit_out) { std::optional effective_d_min = manual_limit; if (!effective_d_min && !for_search && method == ResolutionCutoffMethod::CCHalfLogistic) { const auto rc = ComputeCCHalfLogisticCutoff(merged, cc_target, logger); @@ -297,18 +295,6 @@ std::optional ApplyResolutionCutoff(std::vector &merge } else { logger.Info("Auto resolution cutoff: none ({}); keeping the full resolution range", rc.note); } - // Past the finest whole ring the detector records only its corners, and there a reflection is seen - // a few times at most, on whichever frames reach it: the shell written past the crossing is then - // made of those reflections, and pure noise. So the extension stops at the whole ring, or at the - // crossing where that is already in the corners - which is where established programs stop too - // (the inscribed circle of XDS's default TRUSTED_REGION). - if (rc.d_fit && whole_ring_d - && (rc.d_cut ? *rc.d_cut < *whole_ring_d : rc.extension_past_edge)) { - effective_d_min = std::max(rc.d_cut.value_or(0.0), std::min(*rc.d_fit, *whole_ring_d)); - logger.Info("Auto resolution cutoff: {:.2f} A instead - past the detector's finest whole ring at {:.2f} A " - "only its corners record, so the shell past the crossing is not written there", - *effective_d_min, *whole_ring_d); - } } if (effective_d_min) merged.erase(std::remove_if(merged.begin(), merged.end(), diff --git a/image_analysis/scale_merge/ResolutionCutoff.h b/image_analysis/scale_merge/ResolutionCutoff.h index d8a92c7f0..8252fbb1b 100644 --- a/image_analysis/scale_merge/ResolutionCutoff.h +++ b/image_analysis/scale_merge/ResolutionCutoff.h @@ -31,7 +31,6 @@ struct ResolutionCutoffResult { // reflections are actually written to. This is the number to quote. Set whenever the fit produced // a crossing inside the measured range, even when no cut was applied. std::optional d_fit; - bool extension_past_edge = false; // no cut because the one-shell extension runs past the measured edge std::string note; // human-readable description of the decision (for logging) }; @@ -60,13 +59,10 @@ ResolutionCutoffResult ComputeCCHalfLogisticCutoff(const std::vector ApplyResolutionCutoff(std::vector &merged, std::optional manual_limit, ResolutionCutoffMethod method, double cc_target, bool for_search, Logger &logger, - std::optional *fit_limit_out = nullptr, - std::optional whole_ring_d = std::nullopt); + std::optional *fit_limit_out = nullptr); diff --git a/rugnux/RugnuxScaleMerge.cpp b/rugnux/RugnuxScaleMerge.cpp index 6f9b99278..294179608 100644 --- a/rugnux/RugnuxScaleMerge.cpp +++ b/rugnux/RugnuxScaleMerge.cpp @@ -83,7 +83,6 @@ #include "../image_analysis/WriteReflections.h" #include "../image_analysis/bragg_integration/CalcISigma.h" #include "../common/Definitions.h" -#include "../common/AssembleToPlane.h" #include "../common/CorrelationCoefficient.h" #include #include @@ -93,25 +92,6 @@ using namespace rugnux_internal; namespace { - // The finest resolution the detector records on a whole ring about the beam: the coarsest along its edge. - double WholeRingResolution_A(const DiffractionExperiment &x) { - const DiffractionGeometry geom = x.GetDiffractionGeometry(); - const PlaneRaster raster = PlaneRasterOf(x.GetModules(), x.GetXPixelsNumConv(), x.GetYPixelsNumConv()); - double d = 0.0; - const auto at = [&](int64_t i, int64_t j) { - d = std::max(d, geom.PxlToRes(static_cast(raster.x0 + i), static_cast(raster.y0 + j))); - }; - for (int64_t i = 0; i < raster.width; i++) { - at(i, 0); - at(i, raster.height - 1); - } - for (int64_t j = 0; j < raster.height; j++) { - at(0, j); - at(raster.width - 1, j); - } - return d; - } - // Two groups of a given cell's frames whose mean volumes differ by less than this (relative) are one // crystal form (see the given-cell population below). constexpr double MIN_FORM_SEPARATION = 0.01; @@ -761,8 +741,7 @@ StillsMergeResult StillsScaleMerge(const DiffractionExperiment &experiment, std: // space-group search still sees the full range. const auto &cut_ss = experiment.GetScalingSettings(); out.d_min = ApplyResolutionCutoff(out.merged, cut_ss.GetHighResolutionLimit_A(), cut_ss.GetResolutionCutoff(), - cut_ss.GetResolutionCCTarget(), for_search, logger, &out.resolution_fit_A, - WholeRingResolution_A(experiment)); + cut_ss.GetResolutionCCTarget(), for_search, logger, &out.resolution_fit_A); phase("Computing statistics"); TimingMark stats_mark(logger, "stills statistics");