receiver, image_analysis: fix comments that describe removed behaviour
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
c5fdd2a4dd
commit
b146cd6f89
4 files changed
+10
-11
No files matched your search
@@ -25,9 +25,9 @@
|
|||||||
#include "scale_merge/ScalingResult.h"
|
#include "scale_merge/ScalingResult.h"
|
||||||
#include "IntegrationOutcome.h"
|
#include "IntegrationOutcome.h"
|
||||||
|
|
||||||
// Integrates the predicted reflections off whatever image the caller holds: the preprocessed GPU/CPU
|
// Integrates the predicted reflections off whatever image the caller holds, the preprocessed GPU/CPU
|
||||||
// buffer on the WithoutFPGA path (GPU when available), or the assembled detector image read straight,
|
// buffer of MXAnalysisWithoutFPGA (GPU when available). Keeps IndexAndRefine independent of the image
|
||||||
// on the CPU, on the forced-CPU FPGA path. Keeps IndexAndRefine independent of the image representation.
|
// representation.
|
||||||
using BraggIntegrateFn = std::function<std::vector<Reflection>(
|
using BraggIntegrateFn = std::function<std::vector<Reflection>(
|
||||||
const std::vector<Reflection> &predicted, size_t npredicted, int64_t image_number)>;
|
const std::vector<Reflection> &predicted, size_t npredicted, int64_t image_number)>;
|
||||||
|
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ class MXAnalysisWithoutFPGA {
|
|||||||
ImageSpotFinder &FixedThresholdFinder();
|
ImageSpotFinder &FixedThresholdFinder();
|
||||||
// Self-calibrating finder, used when spot settings request adaptive detection. Kept alongside the
|
// Self-calibrating finder, used when spot settings request adaptive detection. Kept alongside the
|
||||||
// default finder because the choice arrives with the per-image settings, not at construction. It is
|
// default finder because the choice arrives with the per-image settings, not at construction. It is
|
||||||
// an AdaptiveSpotFinderCPU by default; on the GPU path, when the fused engine is enabled (rugnux
|
// an AdaptiveSpotFinderCPU by default; on the GPU path, when the fused engine is enabled (rugnux,
|
||||||
// offline only), it is instead an AdaptiveSpotFinderGPU that also computes the azimuthal profile,
|
// the viewer and the receivers), it is instead an AdaptiveSpotFinderGPU that also computes the
|
||||||
// aliased through fused_adaptive so Analyze() can take that profile and skip the separate azint pass.
|
// azimuthal profile, aliased through fused_adaptive so Analyze() can take that profile and skip the separate azint pass.
|
||||||
std::unique_ptr<ImageSpotFinder> adaptiveSpotFinder;
|
std::unique_ptr<ImageSpotFinder> adaptiveSpotFinder;
|
||||||
AdaptiveSpotFinderGPU *fused_adaptive = nullptr;
|
AdaptiveSpotFinderGPU *fused_adaptive = nullptr;
|
||||||
// The CPU finder, where it gives the profile too (the azimuthal integration being on the CPU).
|
// The CPU finder, where it gives the profile too (the azimuthal integration being on the CPU).
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ JFJochReceiver::JFJochReceiver(const DiffractionExperiment &in_experiment,
|
|||||||
scan_result(in_experiment),
|
scan_result(in_experiment),
|
||||||
serialmx_filter(in_experiment),
|
serialmx_filter(in_experiment),
|
||||||
pixel_mask(in_pixel_mask),
|
pixel_mask(in_pixel_mask),
|
||||||
// retain_outcomes=false: no online scaling/merge at the end, so the integration outcomes are not used
|
// retain_outcomes=false: the receivers index only, there is no scaling or merging at the end
|
||||||
indexer(experiment, indexing_thread_pool, false, /*real_time=*/true) {
|
indexer(experiment, indexing_thread_pool, false, /*real_time=*/true) {
|
||||||
logger.Debug("Initializing receiver");
|
logger.Debug("Initializing receiver");
|
||||||
// Ensure there is nothing running for now
|
// Ensure there is nothing running for now
|
||||||
@@ -38,7 +38,7 @@ JFJochReceiver::JFJochReceiver(const DiffractionExperiment &in_experiment,
|
|||||||
logger.Debug("Image buffer from previous run finalized");
|
logger.Debug("Image buffer from previous run finalized");
|
||||||
|
|
||||||
current_status.SetProgress(0);
|
current_status.SetProgress(0);
|
||||||
current_status.SetStatus(JFJochReceiverStatus{}); // GetStatus() is virtual function and cannot be called yet!
|
current_status.SetStatus(JFJochReceiverStatus{}); // GetStatus() calls virtual functions and cannot be called yet
|
||||||
|
|
||||||
auto start_time_point = std::chrono::steady_clock::now();
|
auto start_time_point = std::chrono::steady_clock::now();
|
||||||
az_int_mapping = std::make_unique<AzimuthalIntegrationMapping>(experiment, pixel_mask);
|
az_int_mapping = std::make_unique<AzimuthalIntegrationMapping>(experiment, pixel_mask);
|
||||||
@@ -198,7 +198,7 @@ void JFJochReceiver::StampImage(DataMessage &message, size_t fifo_delay) {
|
|||||||
message.run_name = experiment.GetRunName();
|
message.run_name = experiment.GetRunName();
|
||||||
message.receiver_buf_available = image_buffer.GetAvailSlots();
|
message.receiver_buf_available = image_buffer.GetAvailSlots();
|
||||||
message.receiver_aq_dev_delay = fifo_delay;
|
message.receiver_aq_dev_delay = fifo_delay;
|
||||||
// Uncompressed/compressed (e.g. 7x), as JFJochReceiverFPGA and JFJochReceiver::GetFinalStatistics
|
// Uncompressed/compressed (e.g. 7x), as JFJochReceiverFPGA and JFJochReceiver::GetStatus
|
||||||
if (message.image.GetCompressedSize() > 0)
|
if (message.image.GetCompressedSize() > 0)
|
||||||
message.compression_ratio = static_cast<float>(message.image.GetUncompressedSize())
|
message.compression_ratio = static_cast<float>(message.image.GetUncompressedSize())
|
||||||
/ static_cast<float>(message.image.GetCompressedSize());
|
/ static_cast<float>(message.image.GetCompressedSize());
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ void JFJochReceiverService::Start(const DiffractionExperiment &experiment,
|
|||||||
|
|
||||||
preview_image.Configure(experiment, pixel_mask);
|
preview_image.Configure(experiment, pixel_mask);
|
||||||
|
|
||||||
// Pedestal runs and host summation stay with JFJochReceiverFPGA
|
// Pedestal runs go to JFJochReceiverPedestal, host summation stays with JFJochReceiverFPGA
|
||||||
bool stream_input = (experiment.GetDetectorType() == DetectorType::DECTRIS);
|
bool stream_input = (experiment.GetDetectorType() == DetectorType::DECTRIS);
|
||||||
if (fpga_image_puller && !stream_input && (experiment.GetImageNum() > 0)) {
|
if (fpga_image_puller && !stream_input && (experiment.GetImageNum() > 0)) {
|
||||||
if (experiment.IsCPUSummation())
|
if (experiment.IsCPUSummation())
|
||||||
@@ -424,7 +424,6 @@ void JFJochReceiverService::ClearImageBuffer() {
|
|||||||
|
|
||||||
JFJochReceiverService &JFJochReceiverService::Indexing(const IndexingSettings &input) {
|
JFJochReceiverService &JFJochReceiverService::Indexing(const IndexingSettings &input) {
|
||||||
std::unique_lock ul(state_mutex);
|
std::unique_lock ul(state_mutex);
|
||||||
// Clearing image buffer during data collection could be catastrophic, so better protect here
|
|
||||||
if (state == ReceiverState::Idle) {
|
if (state == ReceiverState::Idle) {
|
||||||
// The receiver goes first: it holds a raw pointer to the pool, and a stale one's GPU resources can fail the new indexers
|
// The receiver goes first: it holds a raw pointer to the pool, and a stale one's GPU resources can fail the new indexers
|
||||||
receiver.reset();
|
receiver.reset();
|
||||||
|
|||||||
Reference in new issue
Block a user