diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-05-02 03:32:00 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-05-13 16:58:32 +0300 |
commit | 863e31fa52b837d30d38de9ba5d7e30096297b0c (patch) | |
tree | bd0e6c3277b9ebf67a6ae9534e260584c53fee1e /utils/raspberrypi/ctt/ctt_awb.py | |
parent | 641c6ebe9b278e0b00f0125133eebe9c0037ab88 (diff) |
utils: raspberrypi: ctt: Fix pycodestyle E228
E228 missing whitespace around modulo operator
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Diffstat (limited to 'utils/raspberrypi/ctt/ctt_awb.py')
-rw-r--r-- | utils/raspberrypi/ctt/ctt_awb.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/raspberrypi/ctt/ctt_awb.py b/utils/raspberrypi/ctt/ctt_awb.py index 3abafbf5..58ef8432 100644 --- a/utils/raspberrypi/ctt/ctt_awb.py +++ b/utils/raspberrypi/ctt/ctt_awb.py @@ -183,10 +183,10 @@ def awb(Cam, cal_cr_list, cal_cb_list, plot): """ round to 4dp """ - r_fit = np.where((1000*r_fit)%1 <= 0.05, r_fit+0.0001, r_fit) - r_fit = np.where((1000*r_fit)%1 >= 0.95, r_fit-0.0001, r_fit) - b_fit = np.where((1000*b_fit)%1 <= 0.05, b_fit+0.0001, b_fit) - b_fit = np.where((1000*b_fit)%1 >= 0.95, b_fit-0.0001, b_fit) + r_fit = np.where((1000*r_fit) % 1 <= 0.05, r_fit+0.0001, r_fit) + r_fit = np.where((1000*r_fit) % 1 >= 0.95, r_fit-0.0001, r_fit) + b_fit = np.where((1000*b_fit) % 1 <= 0.05, b_fit+0.0001, b_fit) + b_fit = np.where((1000*b_fit) % 1 >= 0.95, b_fit-0.0001, b_fit) r_fit = np.round(r_fit, 4) b_fit = np.round(b_fit, 4) """ @@ -326,7 +326,7 @@ def get_alsc_patches(Img, colour_cals, grey=True): if img colour is below minimum or above maximum alsc calibration colour, simply pick extreme closest to img colour """ - if pos%(len(cts)) == 0: + if pos % len(cts) == 0: """ this works because -0 = 0 = first and -1 = last index """ |