Minor fixes to viewer/reader logic
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m38s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 14m6s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 16m16s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 17m17s
Build Packages / build:rpm (rocky8) (push) Successful in 17m49s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 18m3s
Build Packages / build:rpm (rocky9) (push) Successful in 18m56s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 19m0s
Build Packages / Generate python client (push) Successful in 1m33s
Build Packages / Build documentation (push) Successful in 2m17s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (ubuntu2204) (push) Successful in 9m19s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 10m41s
Build Packages / XDS test (durin plugin) (push) Successful in 9m6s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m13s
Build Packages / XDS test (neggia plugin) (push) Successful in 9m29s
Build Packages / DIALS test (push) Successful in 12m45s
Build Packages / Unit tests (push) Failing after 56m36s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m38s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 14m6s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 16m16s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 17m17s
Build Packages / build:rpm (rocky8) (push) Successful in 17m49s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 18m3s
Build Packages / build:rpm (rocky9) (push) Successful in 18m56s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 19m0s
Build Packages / Generate python client (push) Successful in 1m33s
Build Packages / Build documentation (push) Successful in 2m17s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (ubuntu2204) (push) Successful in 9m19s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 10m41s
Build Packages / XDS test (durin plugin) (push) Successful in 9m6s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m13s
Build Packages / XDS test (neggia plugin) (push) Successful in 9m29s
Build Packages / DIALS test (push) Successful in 12m45s
Build Packages / Unit tests (push) Failing after 56m36s
This commit is contained in:
@@ -80,9 +80,9 @@ void JFJochHDF5Reader::ReadVector(std::vector<T> &v,
|
||||
|
||||
std::string removeSuffix(const std::string& s, const std::string& suffix)
|
||||
{
|
||||
if (s.rfind(suffix) == s.size() - suffix.size()) {
|
||||
if (s.ends_with(suffix))
|
||||
return s.substr(0, s.size() - suffix.size());
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,6 @@ void JFJochHDF5Reader::ReadFile(const std::string& filename) {
|
||||
|
||||
dataset->arm_date = master_file->GetString("/entry/start_time");
|
||||
|
||||
std::filesystem::path fsPath(filename);
|
||||
dataset->experiment.FilePrefix(dataset_name(filename));
|
||||
|
||||
// JFJochReader is always using int32_t
|
||||
@@ -130,8 +129,11 @@ void JFJochHDF5Reader::ReadFile(const std::string& filename) {
|
||||
|
||||
images_per_file = number_of_images;
|
||||
|
||||
if (master_file->Exists("/entry/instrument/detector/detectorSpecific/data_collection_efficiency_image"))
|
||||
dataset->efficiency = master_file->ReadVector<float>(
|
||||
"/entry/instrument/detector/detectorSpecific/data_collection_efficiency_image");
|
||||
else
|
||||
dataset->efficiency = std::vector<float>(number_of_images, 1.0);
|
||||
|
||||
if (master_file->Exists("/entry/roi"))
|
||||
dataset->roi = master_file->FindLeafs("/entry/roi");
|
||||
@@ -322,8 +324,6 @@ void JFJochHDF5Reader::ReadFile(const std::string& filename) {
|
||||
dataset->experiment.PoniRot1_rad(master_file->GetOptFloat("/entry/instrument/detector/transformations/rot1").value_or(0.0));
|
||||
dataset->experiment.PoniRot2_rad(master_file->GetOptFloat("/entry/instrument/detector/transformations/rot2").value_or(0.0));
|
||||
dataset->experiment.PoniRot3_rad(master_file->GetOptFloat("/entry/instrument/detector/transformations/rot3").value_or(0.0));
|
||||
if (master_file->Exists("/entry/instrument/source"))
|
||||
dataset->experiment.RingCurrent_mA(master_file->GetOptFloat("/entry/instrument/source/current"));
|
||||
dataset->experiment.SampleTemperature_K(master_file->GetOptFloat("/entry/sample/temperature"));
|
||||
|
||||
dataset->experiment.BeamX_pxl(master_file->GetFloat("/entry/instrument/detector/beam_center_x"));
|
||||
@@ -765,9 +765,6 @@ std::optional<GoniometerAxis> JFJochHDF5Reader::ReadAxis(HDF5Object *file, const
|
||||
double start = angle[0];
|
||||
double incr = angle[1] - angle[0];
|
||||
|
||||
HDF5DataSet dataset_end(*file, dname + "_end");
|
||||
std::vector<double> angle_end;
|
||||
|
||||
if (dataset.ReadAttrStr("transformation_type") != "rotation")
|
||||
return {};
|
||||
|
||||
|
||||
@@ -47,8 +47,13 @@ void JFJochViewerROIResult::SetROIResult(ROIMessage roi) {
|
||||
roi_max->setText(QString("Max <b>%1</b>").arg(roi.max_count));
|
||||
roi_npixel->setText(QString("Valid <b>%1</b>").arg(roi.pixels));
|
||||
roi_masked->setText(QString("Masked <b>%1</b>").arg(roi.pixels_masked));
|
||||
roi_x->setText(QString("x: <b>%1</b>").arg(static_cast<float>(roi.x_weighted) / roi.sum));
|
||||
roi_y->setText(QString("y: <b>%1</b>").arg(static_cast<float>(roi.y_weighted) / roi.sum));
|
||||
if (roi.sum == 0) {
|
||||
roi_x->setText(QString("x: <b>N/A</b>"));
|
||||
roi_y->setText(QString("y: <b>N/A</b>"));
|
||||
} else {
|
||||
roi_x->setText(QString("x: <b>%1</b>").arg(static_cast<float>(roi.x_weighted) / roi.sum));
|
||||
roi_y->setText(QString("y: <b>%1</b>").arg(static_cast<float>(roi.y_weighted) / roi.sum));
|
||||
}
|
||||
label_1->setText(QString("Pixel count"));
|
||||
label_2->setText(QString("Center of mass"));
|
||||
} else {
|
||||
|
||||
@@ -24,6 +24,10 @@ JFJochViewerSidePanelChart::JFJochViewerSidePanelChart(QWidget *parent) : QWidge
|
||||
|
||||
layout->addWidget(azint_plot); // index 0
|
||||
setLayout(layout);
|
||||
connect(azint_plot, &JFJochSimpleChartView::writeStatusBar,
|
||||
[&](QString string, int timeout_ms) {
|
||||
emit writeStatusBar(string, timeout_ms);
|
||||
});
|
||||
}
|
||||
|
||||
void JFJochViewerSidePanelChart::comboBoxSelected(int val) {
|
||||
@@ -73,10 +77,7 @@ void JFJochViewerSidePanelChart::redrawPlot() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
connect(azint_plot, &JFJochSimpleChartView::writeStatusBar,
|
||||
[&](QString string, int timeout_ms) {
|
||||
emit writeStatusBar(string, timeout_ms);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
void JFJochViewerSidePanelChart::loadImage(std::shared_ptr<const JFJochReaderImage> in_image) {
|
||||
|
||||
Reference in New Issue
Block a user