summaryrefslogtreecommitdiff
path: root/utils/raspberrypi/ctt/ctt_awb.py
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-05-02 03:32:00 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-05-13 16:58:22 +0300
commit641c6ebe9b278e0b00f0125133eebe9c0037ab88 (patch)
tree977be2b537c540af575f01dd2ada7e5841c48273 /utils/raspberrypi/ctt/ctt_awb.py
parent23f9f46c8a42ef63cd55d7b841e6065ba222f870 (diff)
utils: raspberrypi: ctt: Fix pycodestyle E225
E225 missing whitespace around 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.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/utils/raspberrypi/ctt/ctt_awb.py b/utils/raspberrypi/ctt/ctt_awb.py
index 297ba178..3abafbf5 100644
--- a/utils/raspberrypi/ctt/ctt_awb.py
+++ b/utils/raspberrypi/ctt/ctt_awb.py
@@ -27,8 +27,8 @@ def awb(Cam, cal_cr_list, cal_cb_list, plot):
"""
normalise tables so min value is 1
"""
- cr_tab= cr_tab/np.min(cr_tab)
- cb_tab= cb_tab/np.min(cb_tab)
+ cr_tab = cr_tab/np.min(cr_tab)
+ cb_tab = cb_tab/np.min(cb_tab)
colour_cals[cr['ct']] = [cr_tab, cb_tab]
"""
obtain data from greyscale macbeth patches
@@ -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)
"""
@@ -215,7 +215,7 @@ def awb(Cam, cal_cr_list, cal_cb_list, plot):
find bad index
note that in python false = 0 and true = 1
"""
- bad = i - (error_1<error_2)
+ bad = i - (error_1 < error_2)
Cam.log += '\nPoint at {} K deleted as '.format(c_fit[bad])
Cam.log += 'it is furthest from fit'
"""