From 0315c0f9259b8de1b0d842659a5443b25945791d Mon Sep 17 00:00:00 2001 From: hdujmovic <33331092+hdujmovic@users.noreply.github.com> Date: Thu, 9 May 2019 11:57:03 +0900 Subject: [PATCH] bug fix in bayer_data.py The current example does not work properly, this change should fix it. The array is bitshfted <<2 first, so this needs to be corrected for when reading reading the 2 LSBs. --- docs/examples/bayer_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/bayer_data.py b/docs/examples/bayer_data.py index 554752ad..b4169d32 100644 --- a/docs/examples/bayer_data.py +++ b/docs/examples/bayer_data.py @@ -66,7 +66,7 @@ data = data.astype(np.uint16) << 2 for byte in range(4): - data[:, byte::5] |= ((data[:, 4::5] >> (byte * 2)) & 0b11) + data[:, byte::5] |= ((data[:, 4::5] >> ((byte + 1) * 2)) & 0b11) data = np.delete(data, np.s_[4::5], 1) # Now to split the data up into its red, green, and blue components. The