The beam-centre check's mapping at the measured centre built as soon as the centre is measured
The first pass's beam-centre check indexes again at the centre the background puts the beam at (TryBeamCenter), and built that centre's azimuthal mapping on its own path: 0.15 s on 32 threads for a 16M detector, before its spot finding could start. The centre is known when the background-centre capture (started at the end of the pre-scan) returns, well before the check reads it, so the capture's thread now starts that mapping into the run's geometry cache (MappingsAhead) and the check finds it there. The same experiment and centre the check sets, so the same key; what the cache keeps does not depend on the mask. The mapping at the post-refined geometry was tried the same way and left out: the geometry is committed 15 ms before the pre-pass ends, so there is nothing to hide it behind, and live the pass after waited for it under the cache's lock (0.25 -> 0.34 s setup). Offline the speculative probe at that geometry already builds it first. Offline, from the file-centre schemes' verdict to the measured-centre schemes' (the mapping plus that pass's spot finding and indexing): thau 0.67/0.77 s -> 0.55/0.56/0.60 s; cytc 0.55/0.56 -> 0.44/0.44 s; lyso_x06da_ref 0.35/0.37 -> 0.35 s (a 2M detector). Outputs identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HVeDQsU5a8AJUdJPgWevAK
This commit is contained in:
1 parent
4cad43cbc3
commit
b495402794
1 file changed
+10
-1
@@ -1209,7 +1209,9 @@ void Rugnux::PreScan(int start_image, int images_to_process, int frame_count, Ru
|
||||
if (want_shadow && config_.beam_center_check)
|
||||
background_center_capture_ = std::async(std::launch::async, [x = experiment_, mask = centre_mask,
|
||||
projection,
|
||||
nthreads = config_.nthreads] {
|
||||
nthreads = config_.nthreads,
|
||||
ahead = mappings_ahead_,
|
||||
cache = azint_geometry_] {
|
||||
Logger logger("Rugnux");
|
||||
const auto t0 = std::chrono::steady_clock::now();
|
||||
BeamCenterFFTResult capture;
|
||||
@@ -1217,6 +1219,13 @@ void Rugnux::PreScan(int start_image, int images_to_process, int frame_count, Ru
|
||||
FindBeamCenter(x, mask, *projection, nthreads, &capture);
|
||||
const auto capture_ms = std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
std::chrono::steady_clock::now() - t0).count();
|
||||
// The first pass's beam-centre check indexes at this centre too (TryBeamCenter): its mapping is
|
||||
// built from here.
|
||||
if (background_center) {
|
||||
DiffractionExperiment at_centre = x;
|
||||
at_centre.BeamX_pxl(background_center->beam_x_pxl).BeamY_pxl(background_center->beam_y_pxl);
|
||||
ahead->Build(std::move(at_centre), mask, cache, nthreads);
|
||||
}
|
||||
const auto [direct_x, direct_y] = x.GetDiffractionGeometry().GetDirectBeam_pxl();
|
||||
if (!capture.point.empty())
|
||||
logger.Info("Beam centre capture: the strongest point-symmetry centre on the WHOLE "
|
||||
|
||||
Reference in new issue
Block a user