pixel_mask_applied is false on the DECTRIS broker path

The mask written with the data is Jungfraujoch's (the detector's own plus
user masking) and is never uploaded to the detector. The stream's
pixel_mask_enabled only says the detector applied ITS mask, so it does not
describe the mask in the file; on this path that mask is never applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013nW6FNRP1bBJJ8pfHiByAT
This commit is contained in:
leonarski_fandClaude Opus 5.5 committed 2026-09-23 21:17:42 +02:00
1 parent aea13044b5
commit ac34192201
2 files changed
+6 -4

No files matched your search

+3 -1
View File
@@ -224,7 +224,9 @@ void JFJochReceiverLite::Configure(const StartMessage &msg) {
experiment.Detector().CountRateCorrectionLookupTable(msg.countrate_correction_lookup_table);
experiment.Detector().FlatfieldApplied(msg.flatfield_enabled);
experiment.Detector().VirtualPixelInterpolationApplied(msg.virtual_pixel_interpolation_enabled);
experiment.ApplyPixelMask(msg.pixel_mask_enabled);
// The mask written with the data is ours (the detector's plus user masking); it is never
// uploaded to the detector, so the pixels arrive without it applied.
experiment.ApplyPixelMask(false);
// Images are forwarded byte-for-byte, so the stream's own image_dtype - not anything configured
// locally - decides both the width and the sign the outgoing metadata must declare. Taking only
// the width used to leave a signed stream declared unsigned in NXmx.
+3 -3
View File
@@ -55,8 +55,8 @@ TEST_CASE("JFJochReceiverLite", "[JFJochReceiver]") {
start_msg.flatfield_enabled = true;
start_msg.countrate_correction_lookup_table = {0, 1, 3, 7};
start_msg.virtual_pixel_interpolation_enabled = true;
// What the detector did to the pixels, not the local setting
start_msg.pixel_mask_enabled = !experiment.IsApplyPixelMask();
// The detector applied its own mask, not the one written with the data
start_msg.pixel_mask_enabled = true;
puller->Put(ImagePullerOutput{
.cbor = std::make_shared<CBORStream2DeserializerOutput>(start_msg)
@@ -112,7 +112,7 @@ TEST_CASE("JFJochReceiverLite", "[JFJochReceiver]") {
CHECK(master.GetBool("/entry/instrument/detector/countrate_correction_applied"));
CHECK(master.GetBool("/entry/instrument/detector/flatfield_applied"));
CHECK(master.GetBool("/entry/instrument/detector/virtual_pixel_interpolation_applied"));
CHECK(master.GetBool("/entry/instrument/detector/pixel_mask_applied") == start_msg.pixel_mask_enabled);
CHECK(!master.GetBool("/entry/instrument/detector/pixel_mask_applied"));
CHECK(master.ReadVector<uint32_t>("/entry/instrument/detector/countrate_correction_lookup_table")
== std::vector<uint32_t>{0, 1, 3, 7});
}