v1.0.0-rc.134 (#43)
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 12m57s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 13m4s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 11m18s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 13m12s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m51s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 13m59s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m45s
Build Packages / build:rpm (rocky8) (push) Successful in 12m29s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 12m2s
Build Packages / Generate python client (push) Successful in 24s
Build Packages / XDS test (durin plugin) (push) Successful in 9m50s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky9) (push) Successful in 14m15s
Build Packages / Build documentation (push) Successful in 1m6s
Build Packages / DIALS test (push) Successful in 13m10s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 6m45s
Build Packages / XDS test (neggia plugin) (push) Successful in 5m58s
Build Packages / Unit tests (push) Successful in 1h20m42s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 12m57s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 13m4s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 11m18s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 13m12s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m51s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 13m59s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m45s
Build Packages / build:rpm (rocky8) (push) Successful in 12m29s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 12m2s
Build Packages / Generate python client (push) Successful in 24s
Build Packages / XDS test (durin plugin) (push) Successful in 9m50s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky9) (push) Successful in 14m15s
Build Packages / Build documentation (push) Successful in 1m6s
Build Packages / DIALS test (push) Successful in 13m10s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 6m45s
Build Packages / XDS test (neggia plugin) (push) Successful in 5m58s
Build Packages / Unit tests (push) Successful in 1h20m42s
This is an UNSTABLE release. The release has significant modifications and bug fixes, if things go wrong, it is better to revert to 1.0.0-rc.132. * jfjoch_broker: Add better locking for detector object - should help, when detector initialization takes too long * jfjoch_writer: Enable writing single, integrated HDF5 file with both data and metadata * XDS plugin: Add generation of Jungfraujoch plugin for XDS * CI: Add tests with XDS and DIALS (`xia2.ssx`) Reviewed-on: #43
This commit was merged in pull request #43.
This commit is contained in:
@@ -1414,3 +1414,86 @@ TEST_CASE("JFJochReader_InstrumentMetadata_Sample_RingCurrent", "[HDF5][Full]")
|
||||
remove("test_meta_master.h5");
|
||||
REQUIRE(H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochReader_NXmxIntegrated", "[HDF5][Full]") {
|
||||
DiffractionExperiment x(DetJF(1));
|
||||
|
||||
x.FilePrefix("test_reader_integrated").ImagesPerTrigger(3).OverwriteExistingFiles(true);
|
||||
x.BitDepthImage(16).PixelSigned(false).SetFileWriterFormat(FileWriterFormat::NXmxIntegrated);
|
||||
x.Compression(CompressionAlgorithm::NO_COMPRESSION);
|
||||
x.BeamX_pxl(100).BeamY_pxl(200).DetectorDistance_mm(150)
|
||||
.IncidentEnergy_keV(WVL_1A_IN_KEV)
|
||||
.FrameTime(std::chrono::microseconds(500), std::chrono::microseconds(10));
|
||||
|
||||
AzimuthalIntegrationSettings azint_settings;
|
||||
azint_settings.AzimuthalBinCount(4);
|
||||
x.ImportAzimuthalIntegrationSettings(azint_settings);
|
||||
|
||||
std::vector<uint16_t> image(x.GetPixelsNum(), 0);
|
||||
image[0] = UINT16_MAX;
|
||||
image[1] = 123;
|
||||
image[5678] = 321;
|
||||
|
||||
AzimuthalIntegration azint(x, PixelMask(x));
|
||||
RegisterHDF5Filter();
|
||||
|
||||
{
|
||||
StartMessage start_message;
|
||||
x.FillMessage(start_message);
|
||||
start_message.az_int_bin_to_q = azint.GetBinToQ();
|
||||
start_message.az_int_bin_to_phi = azint.GetBinToPhi();
|
||||
start_message.az_int_q_bin_count = azint.GetQBinCount();
|
||||
start_message.az_int_phi_bin_count = azint.GetAzimuthalBinCount();
|
||||
|
||||
FileWriter file_set(start_message);
|
||||
|
||||
for (int i = 0; i < x.GetImageNum(); i++) {
|
||||
DataMessage message{};
|
||||
image[5678] = 321 + i;
|
||||
message.image = CompressedImage(image, x.GetXPixelsNum(), x.GetYPixelsNum());
|
||||
message.number = i;
|
||||
message.image_collection_efficiency = 0.9f + 0.01f * i;
|
||||
message.az_int_profile = std::vector<float>(azint_settings.GetBinCount(), static_cast<float>(50 + i));
|
||||
|
||||
REQUIRE_NOTHROW(file_set.WriteHDF5(message));
|
||||
}
|
||||
|
||||
EndMessage end_message;
|
||||
end_message.max_image_number = x.GetImageNum();
|
||||
file_set.WriteHDF5(end_message);
|
||||
file_set.Finalize();
|
||||
}
|
||||
{
|
||||
JFJochHDF5Reader reader;
|
||||
REQUIRE_NOTHROW(reader.ReadFile("test_reader_integrated_master.h5"));
|
||||
auto dataset = reader.GetDataset();
|
||||
|
||||
CHECK(dataset->experiment.GetImageNum() == 3);
|
||||
REQUIRE(dataset->efficiency.size() == 3);
|
||||
CHECK(dataset->efficiency[0] == Catch::Approx(0.90f));
|
||||
CHECK(dataset->efficiency[1] == Catch::Approx(0.91f));
|
||||
CHECK(dataset->efficiency[2] == Catch::Approx(0.92f));
|
||||
|
||||
CHECK(dataset->az_int_bin_to_q.size() == azint_settings.GetBinCount());
|
||||
CHECK(dataset->azimuthal_bins == azint_settings.GetAzimuthalBinCount());
|
||||
CHECK(dataset->q_bins == azint_settings.GetQBinCount());
|
||||
|
||||
std::shared_ptr<JFJochReaderImage> reader_image;
|
||||
REQUIRE_NOTHROW(reader_image = reader.LoadImage(1));
|
||||
REQUIRE(reader_image);
|
||||
|
||||
CHECK(reader_image->Image()[0] == SATURATED_PXL_VALUE);
|
||||
CHECK(reader_image->Image()[1] == 123);
|
||||
CHECK(reader_image->Image()[5678] == 322);
|
||||
|
||||
REQUIRE(reader_image->ImageData().image_collection_efficiency.has_value());
|
||||
CHECK(reader_image->ImageData().image_collection_efficiency.value() == Catch::Approx(0.91f));
|
||||
|
||||
REQUIRE(reader_image->ImageData().az_int_profile.size() == azint_settings.GetBinCount());
|
||||
CHECK(reader_image->ImageData().az_int_profile[0] == Catch::Approx(51.0f));
|
||||
CHECK(reader_image->ImageData().az_int_profile[23] == Catch::Approx(51.0f));
|
||||
}
|
||||
remove("test_reader_integrated_master.h5");
|
||||
|
||||
REQUIRE(H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0);
|
||||
}
|
||||
Reference in New Issue
Block a user