v1.0.0-rc.97
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 8m11s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 9m9s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 9m18s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 10m14s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 10m3s
Build Packages / Generate python client (push) Successful in 15s
Build Packages / Build documentation (push) Successful in 50s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky8) (push) Successful in 8m31s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 8m21s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 7m42s
Build Packages / build:rpm (rocky9) (push) Successful in 9m11s
Build Packages / Unit tests (push) Failing after 1h13m19s

This is an UNSTABLE release and not recommended for production use (please use rc.96 instead).

* jfjoch_broker: For DECTRIS detectors add dark data collection during initialization for bad pixel mask
* jfjoch_broker: Refactor of calibration logic for more clear code (likely to introduce problems)
* jfjoch_viewer: Add option to handle user pixel mask (experimental)
* jfjoch_viewer: More options for ROI
* jfjoch_viewer: Add window to display calibration

Reviewed-on: #2
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
This commit was merged in pull request #2.
This commit is contained in:
2025-11-09 12:42:27 +01:00
committed by leonarski_f
parent 8b356a7001
commit 4dbbf0e365
243 changed files with 4531 additions and 1831 deletions
+24 -40
View File
@@ -111,6 +111,9 @@ JFJochViewerImageStatistics::JFJochViewerImageStatistics(QWidget *parent) : QWid
valid_values = new QLabel(this);
layout->addRow(new QLabel("Valid values:"), valid_values);
masked_pixels = new QLabel(this);
layout->addRow(new QLabel("Masked pixels:"), masked_pixels);
spots = new QLabel(this);
layout->addRow(new QLabel("Spots:"), spots);
@@ -128,19 +131,6 @@ JFJochViewerImageStatistics::JFJochViewerImageStatistics(QWidget *parent) : QWid
b_factor = new QLabel(this);
layout->addRow(new QLabel("B-factor:"), b_factor);
roi_sum = new QLabel(this);
layout->addRow(new QLabel("ROI sum:"), roi_sum);
roi_mean = new QLabel(this);
layout->addRow(new QLabel("ROI mean:"), roi_mean);
roi_stddev = new QLabel(this);
layout->addRow(new QLabel("ROI st. dev.:"), roi_stddev);
roi_max = new QLabel(this);
layout->addRow(new QLabel("ROI max:"), roi_max);
}
QString TrimZeros(double number, int precision) {
@@ -172,13 +162,11 @@ void JFJochViewerImageStatistics::loadImage(std::shared_ptr<const JFJochReaderIm
bkg_estimate->setText("");
indexed->setText("");
indexed->setToolTip("");
roi_sum->setText("");
roi_mean->setText("");
roi_stddev->setText("");
roi_max->setText("");
b_factor->setText("");
profile_radius->setText("");
res_estimate->setText("");
masked_pixels->setText("");
masked_pixels->setToolTip("");
return;
}
@@ -273,6 +261,25 @@ void JFJochViewerImageStatistics::loadImage(std::shared_ptr<const JFJochReaderIm
res_estimate->setText("N/A");
}
float total_pixels = image->Dataset().experiment.GetPixelsNum();
if (total_pixels == 0)
total_pixels = 1;
auto mask_stats = image->Dataset().pixel_mask.GetStatistics();
text = QString("<b>%1</b>").arg(mask_stats.total_masked);
masked_pixels->setText(text);
masked_pixels->setToolTip(
QString(
"Error pixels: <b>%1</b> (%2 %)<br/> Noisy pixels: <b>%3</b> (%4 %) <br/> User mask: <b>%5</b> (%6 %)<br/>"
"Chip gaps: <b>%7</b> (%8 %)<br/>"
"Non active area (module gap and fill): <b>%9</b> (%10 %)")
.arg(mask_stats.error_pixel).arg(QString::number(mask_stats.error_pixel / total_pixels * 100.0, 'f', 1))
.arg(mask_stats.noisy_pixel).arg(QString::number(mask_stats.noisy_pixel / total_pixels * 100.0, 'f', 1))
.arg(mask_stats.user_mask).arg(QString::number(mask_stats.user_mask / total_pixels * 100.0, 'f', 1))
.arg(mask_stats.chip_gap_pixel).arg(QString::number(mask_stats.chip_gap_pixel / total_pixels * 100.0, 'f', 1))
.arg(mask_stats.module_gap_pixel).arg(QString::number(mask_stats.module_gap_pixel / total_pixels * 100.0, 'f', 1))
);
if (!image->Dataset().indexing_result.empty()) {
QString tooltip;
@@ -314,27 +321,4 @@ void JFJochViewerImageStatistics::loadImage(std::shared_ptr<const JFJochReaderIm
} else {
indexed->setText("N/A");
}
auto roi = image->GetROI();
if (roi && roi->pixels > 0) {
text = QString("<b>%1</b>").arg(roi->sum);
roi_sum->setText(text);
auto roi_npixel = static_cast<double>(roi->pixels);
double roi_mean_val = static_cast<double>(roi->sum) / roi_npixel;
text = QString("<b>%1</b>").arg(QString::number(roi_mean_val, 'f', 3));
roi_mean->setText(text);
double variance = static_cast<double>(roi->sum_square) / roi_npixel - roi_mean_val * roi_mean_val;
text = QString("<b>%1</b>").arg(QString::number(sqrt(variance), 'f', 3));
roi_stddev->setText(text);
text = QString("<b>%1</b>").arg(roi->max_count);
roi_max->setText(text);
} else {
roi_sum->setText("N/A");
roi_mean->setText("N/A");
roi_stddev->setText("N/A");
roi_max->setText("N/A");
}
}