summaryrefslogtreecommitdiff
path: root/utils/raspberrypi/ctt/ctt_ccm.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_ccm.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_ccm.py')
-rw-r--r--utils/raspberrypi/ctt/ctt_ccm.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/raspberrypi/ctt/ctt_ccm.py b/utils/raspberrypi/ctt/ctt_ccm.py
index 769603b9..52fd9744 100644
--- a/utils/raspberrypi/ctt/ctt_ccm.py
+++ b/utils/raspberrypi/ctt/ctt_ccm.py
@@ -74,8 +74,8 @@ def ccm(Cam, cal_cr_list, cal_cb_list):
"""
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]
"""
@@ -135,8 +135,8 @@ def ccm(Cam, cal_cr_list, cal_cb_list):
"""
for k, v in ccm_tab.items():
tab = np.mean(v, axis=0)
- tab = np.where((10000*tab)%1<=0.05, tab+0.00001, tab)
- tab = np.where((10000*tab)%1>=0.95, tab-0.00001, tab)
+ tab = np.where((10000*tab)%1 <= 0.05, tab+0.00001, tab)
+ tab = np.where((10000*tab)%1 >= 0.95, tab-0.00001, tab)
ccm_tab[k] = list(np.round(tab, 5))
Cam.log += '\nMatrix calculated for colour temperature of {} K'.format(k)