v1.0.0-rc.131 (#39)
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 11m20s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 10m46s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 11m27s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 12m32s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 10m57s
Build Packages / build:rpm (rocky8) (push) Successful in 11m54s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 13m9s
Build Packages / build:rpm (rocky9) (push) Successful in 12m37s
Build Packages / Generate python client (push) Successful in 24s
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 57s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 9m12s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 8m4s
Build Packages / Unit tests (push) Successful in 1h17m43s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 11m20s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 10m46s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 11m27s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 12m32s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 10m57s
Build Packages / build:rpm (rocky8) (push) Successful in 11m54s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 13m9s
Build Packages / build:rpm (rocky9) (push) Successful in 12m37s
Build Packages / Generate python client (push) Successful in 24s
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 57s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 9m12s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 8m4s
Build Packages / Unit tests (push) Successful in 1h17m43s
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.124. * jfjoch_broker: Fix bug in saving JUNGFRAU calibration (pedestal/pedestalRMS) * jfjoch_viewer: Fix calibration (pedestal) images being open flipped * jfjoch_process: Add space group detection (EXPERIMENTAL) Reviewed-on: #39
This commit was merged in pull request #39.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "../common/DiffractionExperiment.h"
|
||||
#include "../writer/FileWriter.h"
|
||||
#include "../reader/JFJochHDF5Reader.h"
|
||||
#include "../compression/JFJochCompressor.h"
|
||||
|
||||
TEST_CASE("HDF5DataType_Sign","[HDF5]") {
|
||||
HDF5DataType type_u8((uint8_t)0), type_fl(0.0f), type_i32((int32_t) 0), type_u32((uint32_t) 0);
|
||||
@@ -85,6 +86,9 @@ TEST_CASE("JFJochReader_MasterFile_Calibration", "[HDF5][Full]") {
|
||||
std::vector<uint16_t> calib_1(200*300, 10);
|
||||
std::vector<int32_t> calib_2(100*400, 55);
|
||||
std::vector<float> calib_f(100*400, 1234.56f);
|
||||
JFJochBitShuffleCompressor compressor(CompressionAlgorithm::BSHUF_LZ4);
|
||||
auto calib_1_compressed = compressor.Compress(calib_1);
|
||||
|
||||
{
|
||||
StartMessage start_message;
|
||||
x.FillMessage(start_message);
|
||||
@@ -92,14 +96,21 @@ TEST_CASE("JFJochReader_MasterFile_Calibration", "[HDF5][Full]") {
|
||||
CompressedImage calibration_01(calib_1, 200, 300);
|
||||
CompressedImage calibration_02(calib_2, 100, 400);
|
||||
CompressedImage calibration_f(calib_f, 100, 400);
|
||||
CompressedImage calibration_01_lz4(
|
||||
calib_1_compressed.data(), calib_1_compressed.size(),
|
||||
200, 300, CompressedImageMode::Uint16, CompressionAlgorithm::BSHUF_LZ4
|
||||
);
|
||||
|
||||
calibration_01.Channel("c1");
|
||||
calibration_02.Channel("c2");
|
||||
calibration_f.Channel("cf");
|
||||
calibration_01_lz4.Channel("c1_lz4");
|
||||
|
||||
EndMessage end_message;
|
||||
end_message.max_image_number = 0;
|
||||
std::unique_ptr<NXmx> master = std::make_unique<NXmx>(start_message);
|
||||
master->WriteCalibration(calibration_01);
|
||||
master->WriteCalibration(calibration_01_lz4);
|
||||
master->WriteCalibration(calibration_02);
|
||||
master->WriteCalibration(calibration_f);
|
||||
master->Finalize(end_message);
|
||||
@@ -109,10 +120,11 @@ TEST_CASE("JFJochReader_MasterFile_Calibration", "[HDF5][Full]") {
|
||||
JFJochHDF5Reader reader;
|
||||
REQUIRE_NOTHROW(reader.ReadFile("test_reader_calibration_master.h5"));
|
||||
auto dataset = reader.GetDataset();
|
||||
REQUIRE(dataset->calibration_data.size() == 3);
|
||||
REQUIRE(dataset->calibration_data.size() == 4);
|
||||
CHECK(dataset->calibration_data[0] == "c1");
|
||||
CHECK(dataset->calibration_data[1] == "c2");
|
||||
CHECK(dataset->calibration_data[2] == "cf");
|
||||
CHECK(dataset->calibration_data[1] == "c1_lz4");
|
||||
CHECK(dataset->calibration_data[2] == "c2");
|
||||
CHECK(dataset->calibration_data[3] == "cf");
|
||||
|
||||
std::vector<uint8_t> buffer;
|
||||
std::vector<uint8_t> buff_2;
|
||||
@@ -120,22 +132,29 @@ TEST_CASE("JFJochReader_MasterFile_Calibration", "[HDF5][Full]") {
|
||||
CompressedImage test;
|
||||
REQUIRE_NOTHROW(test = reader.ReadCalibration(buffer, "c1"));
|
||||
CHECK(test.GetByteDepth() == 2);
|
||||
CHECK(test.GetHeight() == 200);
|
||||
CHECK(test.GetWidth() == 300);
|
||||
CHECK(test.GetHeight() == 300);
|
||||
CHECK(test.GetWidth() == 200);
|
||||
CHECK(test.GetMode() == CompressedImageMode::Uint16);
|
||||
CHECK(reinterpret_cast<const uint16_t *>(test.GetUncompressedPtr(buff_2))[76] == 10);
|
||||
|
||||
REQUIRE_NOTHROW(test = reader.ReadCalibration(buffer, "c1_lz4"));
|
||||
CHECK(test.GetByteDepth() == 2);
|
||||
CHECK(test.GetHeight() == 300);
|
||||
CHECK(test.GetWidth() == 200);
|
||||
CHECK(test.GetMode() == CompressedImageMode::Uint16);
|
||||
CHECK(reinterpret_cast<const uint16_t *>(test.GetUncompressedPtr(buff_2))[76] == 10);
|
||||
|
||||
REQUIRE_NOTHROW(test = reader.ReadCalibration(buffer, "c2"));
|
||||
CHECK(test.GetByteDepth() == 4);
|
||||
CHECK(test.GetHeight() == 100);
|
||||
CHECK(test.GetWidth() == 400);
|
||||
CHECK(test.GetHeight() == 400);
|
||||
CHECK(test.GetWidth() == 100);
|
||||
CHECK(test.GetMode() == CompressedImageMode::Int32);
|
||||
CHECK(reinterpret_cast<const int32_t *>(test.GetUncompressedPtr(buff_2))[76] == 55);
|
||||
|
||||
REQUIRE_NOTHROW(test = reader.ReadCalibration(buffer, "cf"));
|
||||
CHECK(test.GetByteDepth() == 4);
|
||||
CHECK(test.GetHeight() == 100);
|
||||
CHECK(test.GetWidth() == 400);
|
||||
CHECK(test.GetHeight() == 400);
|
||||
CHECK(test.GetWidth() == 100);
|
||||
CHECK(test.GetMode() == CompressedImageMode::Float32);
|
||||
CHECK(reinterpret_cast<const float *>(test.GetUncompressedPtr(buff_2))[76] == Catch::Approx(1234.56f));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user