Scaling/Merging: Clean-up data structures
This commit is contained in:
+27
-19
@@ -1970,6 +1970,9 @@ TEST_CASE("JFJochReader_ReadReflections_VDS", "[HDF5][Full]") {
|
||||
.zeta = 0.02f
|
||||
}
|
||||
};
|
||||
|
||||
message.mosaicity_deg = i*0.15f;
|
||||
message.indexing_lattice = CrystalLattice({100,0,0}, {0,50,0}, {0,0,30});
|
||||
}
|
||||
|
||||
REQUIRE_NOTHROW(writer.WriteHDF5(message));
|
||||
@@ -1992,23 +1995,28 @@ TEST_CASE("JFJochReader_ReadReflections_VDS", "[HDF5][Full]") {
|
||||
|
||||
REQUIRE(reflections.size() == 4);
|
||||
|
||||
CHECK(reflections[0].empty());
|
||||
CHECK(reflections[0].reflections.empty());
|
||||
|
||||
REQUIRE(reflections[1].size() == 2);
|
||||
CHECK(reflections[1][0].h == 11);
|
||||
CHECK(reflections[1][0].k == 20);
|
||||
CHECK(reflections[1][0].l == 30);
|
||||
CHECK(reflections[1][0].I == Catch::Approx(1001.0f));
|
||||
CHECK(reflections[1][0].predicted_x == Catch::Approx(101.0f));
|
||||
CHECK(reflections[1][0].predicted_y == Catch::Approx(201.0f));
|
||||
REQUIRE(reflections[1].reflections.size() == 2);
|
||||
CHECK(reflections[1].reflections[0].h == 11);
|
||||
CHECK(reflections[1].reflections[0].k == 20);
|
||||
CHECK(reflections[1].reflections[0].l == 30);
|
||||
CHECK(reflections[1].reflections[0].I == Catch::Approx(1001.0f));
|
||||
CHECK(reflections[1].reflections[0].predicted_x == Catch::Approx(101.0f));
|
||||
CHECK(reflections[1].reflections[0].predicted_y == Catch::Approx(201.0f));
|
||||
CHECK(reflections[1].mosaicity_deg == Catch::Approx(0.15f));
|
||||
CHECK(reflections[1].latt.CalcVolume() == Catch::Approx(100*50*30));
|
||||
|
||||
CHECK(reflections[2].empty());
|
||||
CHECK(reflections[2].reflections.empty());
|
||||
|
||||
REQUIRE(reflections[3].size() == 2);
|
||||
CHECK(reflections[3][0].h == 13);
|
||||
CHECK(reflections[3][0].I == Catch::Approx(1003.0f));
|
||||
CHECK(reflections[3][1].h == 43);
|
||||
CHECK(reflections[3][1].I == Catch::Approx(2003.0f));
|
||||
REQUIRE(reflections[3].reflections.size() == 2);
|
||||
CHECK(reflections[3].reflections[0].h == 13);
|
||||
CHECK(reflections[3].reflections[0].I == Catch::Approx(1003.0f));
|
||||
CHECK(reflections[3].reflections[1].h == 43);
|
||||
CHECK(reflections[3].reflections[1].I == Catch::Approx(2003.0f));
|
||||
CHECK(reflections[3].mosaicity_deg == Catch::Approx(0.45f));
|
||||
CHECK(reflections[3].latt.Vec0().x == Catch::Approx(100.0f));
|
||||
CHECK(reflections[3].latt.Vec1().y == Catch::Approx(50.0f));
|
||||
}
|
||||
|
||||
{
|
||||
@@ -2019,13 +2027,13 @@ TEST_CASE("JFJochReader_ReadReflections_VDS", "[HDF5][Full]") {
|
||||
|
||||
REQUIRE(reflections.size() == 3);
|
||||
|
||||
REQUIRE(reflections[0].size() == 2); // original image 1
|
||||
CHECK(reflections[0][0].h == 11);
|
||||
REQUIRE(reflections[0].reflections.size() == 2); // original image 1
|
||||
CHECK(reflections[0].reflections[0].h == 11);
|
||||
|
||||
CHECK(reflections[1].empty()); // original image 2
|
||||
CHECK(reflections[1].reflections.empty()); // original image 2
|
||||
|
||||
REQUIRE(reflections[2].size() == 2); // original image 3
|
||||
CHECK(reflections[2][0].h == 13);
|
||||
REQUIRE(reflections[2].reflections.size() == 2); // original image 3
|
||||
CHECK(reflections[2].reflections[0].h == 13);
|
||||
}
|
||||
|
||||
remove("read_reflections_vds_master.h5");
|
||||
|
||||
Reference in New Issue
Block a user