diff --git a/receiver/JFJochReceiverLite.cpp b/receiver/JFJochReceiverLite.cpp index bd550ffa3..001a8f6f5 100644 --- a/receiver/JFJochReceiverLite.cpp +++ b/receiver/JFJochReceiverLite.cpp @@ -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. diff --git a/tests/JFJochReceiverLiteTest.cpp b/tests/JFJochReceiverLiteTest.cpp index f03001877..bcfe1167d 100644 --- a/tests/JFJochReceiverLiteTest.cpp +++ b/tests/JFJochReceiverLiteTest.cpp @@ -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(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("/entry/instrument/detector/countrate_correction_lookup_table") == std::vector{0, 1, 3, 7}); }