Save radial integration results in master file
This commit is contained in:
@@ -137,6 +137,34 @@ TEST_CASE("HDF5MasterFile", "[HDF5][Full]") {
|
||||
REQUIRE (H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("HDF5MasterFile_RadInt", "[HDF5][Full]") {
|
||||
{
|
||||
RegisterHDF5Filter();
|
||||
DiffractionExperiment x(DetectorGeometry(8, 2, 8, 36));
|
||||
|
||||
x.DetectorDistance_mm(50).BeamX_pxl(1000).BeamY_pxl(1000);
|
||||
x.QSpacingForRadialInt_recipA(0.1).LowQForRadialInt_recipA(0.1).HighQForRadialInt_recipA(4);
|
||||
|
||||
x.FilePrefix("test01_rad_int").ImagesPerTrigger(950);
|
||||
|
||||
RadialIntegrationMapping mapping(x);
|
||||
RadialIntegrationProfile profile(mapping);
|
||||
|
||||
StartMessage start_message;
|
||||
x.FillMessage(start_message);
|
||||
start_message.rad_int_bin_to_q = mapping.GetBinToQ();
|
||||
EndMessage end_message;
|
||||
end_message.number_of_images = x.GetImageNum();
|
||||
end_message.rad_int_result["avg1"] = profile.GetResult();
|
||||
end_message.rad_int_result["avg2"] = profile.GetResult();
|
||||
|
||||
REQUIRE_NOTHROW(HDF5Metadata::NXmx(start_message, end_message));
|
||||
}
|
||||
remove("test01_rad_int_master.h5");
|
||||
// No leftover HDF5 objects
|
||||
REQUIRE (H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("HDF5Writer", "[HDF5][Full]") {
|
||||
{
|
||||
RegisterHDF5Filter();
|
||||
@@ -208,7 +236,7 @@ TEST_CASE("HDF5Writer_Rad_Int_Profile", "[HDF5][Full]") {
|
||||
std::vector<float> rad_int_profile(mapping.GetBinNumber(), 4.0);
|
||||
std::vector<float> rad_int_avg(mapping.GetBinNumber(), 0.33);
|
||||
|
||||
x.FilePrefix("test02_1p10_spots").ImagesPerTrigger(5).DataFileCount(2).Compression(JFJochProtoBuf::NO_COMPRESSION);
|
||||
x.FilePrefix("test02_1p10_rad_int").ImagesPerTrigger(5).DataFileCount(2).Compression(JFJochProtoBuf::NO_COMPRESSION);
|
||||
StartMessage start_message;
|
||||
x.FillMessage(start_message);
|
||||
start_message.rad_int_bin_to_q = mapping.GetBinToQ();
|
||||
|
||||
Reference in New Issue
Block a user