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
+7 -4
View File
@@ -271,17 +271,18 @@ void GetCBORMultidimTypedArray(CBORImage &v, CborValue &value) {
void JFJochFrameDeserializer::GetCBORSpots(CborValue &value) {
size_t array_len = GetCBORArrayLen(value);
if (array_len % 3 != 0)
if (array_len % 4 != 0)
throw JFJochException(JFJochExceptionCategory::CBORError,
"Spot array has to have elements multiple of 3");
"Spot array has to have elements multiple of 4");
CborValue array_value;
cborErr(cbor_value_enter_container(&value, &array_value));
for (int i = 0; i < array_len / 3; i++) {
for (int i = 0; i < array_len / 4; i++) {
SpotToSave s{
.x = GetCBORFloat(array_value),
.y = GetCBORFloat(array_value),
.intensity = GetCBORFloat(array_value)
.intensity = GetCBORFloat(array_value),
.indexed = GetCBORBool(array_value)
};
data_message.spots.push_back(s);
}
@@ -362,6 +363,8 @@ void JFJochFrameDeserializer::ProcessImageMessageUserDataElement(CborValue &valu
GetCBORFloatArray(map_value, data_message.rad_int_profile);
else if (key == "indexing_result")
data_message.indexing_result = GetCBORUInt(map_value);
else if (key == "indexing_lattice")
GetCBORFloatArray(map_value, data_message.indexing_lattice);
else if (key == "jf_info")
data_message.jf_info = GetCBORUInt(map_value) & UINT32_MAX;
else if (key == "storage_cell")