From patchwork Sun Jun 28 12:37:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 8472 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 7F988C2E69 for ; Sun, 28 Jun 2020 12:37:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F0723609D6; Sun, 28 Jun 2020 14:37:39 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="GdCjoPEL"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 515D5609A3 for ; Sun, 28 Jun 2020 14:37:38 +0200 (CEST) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 32F0D4FB; Sun, 28 Jun 2020 14:37:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1593347858; bh=ixyth3IeMRhJas3olS7zBLaWWafJ+wtbe8DQa57vU1Y=; h=From:To:Cc:Subject:Date:From; b=GdCjoPELb2BZ96Z7bItw+DE0Cs0KhvkBN65CkgOAA2W9/UGFHlDtlElS4+kxjtgUO oQzU9r5mNWQyxKg14sVq7OBBJvnMPSJ++0bQKlxeHimJHhSun/CGDHj+dwh08jtOA+ z1GsQZlsAsXFjXyNgODHFEMr+QFyNI3AZQaQavB8= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sun, 28 Jun 2020 15:37:30 +0300 Message-Id: <20200628123730.31992-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2] utils: raspberrypi: ctt: Fix pycodestyle W605 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" W605 invalid escape sequence '\.' Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: David Plowman --- Changes since v1: - Use raw strings for regular expressions --- utils/raspberrypi/ctt/ctt.py | 4 ++-- utils/raspberrypi/ctt/ctt_awb.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/raspberrypi/ctt/ctt.py b/utils/raspberrypi/ctt/ctt.py index d7e38c31986d..30d35ae4e3d4 100755 --- a/utils/raspberrypi/ctt/ctt.py +++ b/utils/raspberrypi/ctt/ctt.py @@ -42,8 +42,8 @@ def get_col_lux(string): """ Extract colour and lux values from filename """ - col = re.search('([0-9]+)[kK](\.(jpg|jpeg|brcm|dng)|_.*\.(jpg|jpeg|brcm|dng))$', string) - lux = re.search('([0-9]+)[lL](\.(jpg|jpeg|brcm|dng)|_.*\.(jpg|jpeg|brcm|dng))$', string) + col = re.search(r'([0-9]+)[kK](\.(jpg|jpeg|brcm|dng)|_.*\.(jpg|jpeg|brcm|dng))$', string) + lux = re.search(r'([0-9]+)[lL](\.(jpg|jpeg|brcm|dng)|_.*\.(jpg|jpeg|brcm|dng))$', string) try: col = col.group(1) except AttributeError: diff --git a/utils/raspberrypi/ctt/ctt_awb.py b/utils/raspberrypi/ctt/ctt_awb.py index 7055b8639178..3c8cd9027a1a 100644 --- a/utils/raspberrypi/ctt/ctt_awb.py +++ b/utils/raspberrypi/ctt/ctt_awb.py @@ -257,8 +257,8 @@ def awb(Cam, cal_cr_list, cal_cb_list, plot): plt.scatter(rbs_hat[0], rbs_hat[1], color='red') for i, ct in enumerate(rbs_hat[2]): plt.annotate(str(ct), (rbs_hat[0][i], rbs_hat[1][i])) - plt.xlabel('$\hat{r}$') - plt.ylabel('$\hat{b}$') + plt.xlabel('$\\hat{r}$') + plt.ylabel('$\\hat{b}$') """ optional set axes equal to shortest distance so line really does looks perpendicular and everybody is happy