JFJochReceiver: Save information on crystal lattice and spot indexing status to HDF5 file

This commit is contained in:
2023-05-18 10:46:46 +02:00
parent e3998a7488
commit bb4cee9b2d
12 changed files with 68 additions and 37 deletions
+5 -2
View File
@@ -437,8 +437,8 @@ TEST_CASE("CBORSerialize_Image_Spots", "[CBOR]") {
JFJochFrameSerializer serializer(buffer.data(), buffer.size());
std::vector<SpotToSave> spots;
spots.push_back(SpotToSave{.x = 7, .y = 8, .intensity = 34});
spots.push_back(SpotToSave{.x = 37, .y = 48, .intensity = 123});
spots.push_back(SpotToSave{.x = 7, .y = 8, .intensity = 34, .indexed = false});
spots.push_back(SpotToSave{.x = 37, .y = 48, .intensity = 123, .indexed = true});
std::vector<uint8_t> test(1024);
for (int i = 0; i < test.size(); i++)
@@ -474,10 +474,13 @@ JFJochFrameSerializer serializer(buffer.data(), buffer.size());
REQUIRE(image_array.spots.size() == 2);
REQUIRE(image_array.spots[0].intensity == 34);
REQUIRE(!image_array.spots[0].indexed);
REQUIRE(image_array.spots[1].x == 37);
REQUIRE(image_array.spots[1].y == 48);
REQUIRE(image_array.spots[1].intensity == 123);
REQUIRE(image_array.spots[1].indexed);
}
inline bool CmpString(const char *str1, const std::string& str2) {