JFJochReceiver: Use floats for indexing rate and progress

This commit is contained in:
2023-05-09 17:12:28 +02:00
parent 0fb5d68154
commit 2e73acef6b
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -562,16 +562,16 @@ void JFJochReceiver::Cancel(const JFJochException &e) {
acquisition_device[d]->ActionAbort();
}
double JFJochReceiver::GetIndexingRate() const {
float JFJochReceiver::GetIndexingRate() const {
return indexing_solution.Mean();
}
double JFJochReceiver::GetProgress() const {
float JFJochReceiver::GetProgress() const {
if (experiment.GetImageNum() > 0)
return static_cast<double>(max_image_number_sent) / static_cast<double>(experiment.GetImageNum()) * 100.0;
return static_cast<float>(max_image_number_sent) / static_cast<float>(experiment.GetImageNum()) * 100.0;
else if (experiment.GetFrameNum() > 0)
// Pedestal
return static_cast<double>(max_image_number_sent) / static_cast<double>(experiment.GetFrameNum()) * 100.0;
return static_cast<float>(max_image_number_sent) / static_cast<float>(experiment.GetFrameNum()) * 100.0;
else
return 100.0;
}
+2 -2
View File
@@ -124,8 +124,8 @@ public:
void GetStatistics(JFJochProtoBuf::ReceiverOutput &out) const;
void Cancel();
double GetProgress() const;
double GetIndexingRate() const;
float GetProgress() const;
float GetIndexingRate() const;
void SetDataProcessingSettings(const JFJochProtoBuf::DataProcessingSettings &data_processing_settings);
float GetAvailableSendBuffers() const;