Show a patch.

GET /api/1.1/patches/3777/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 3777,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3777/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3777/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20200512000322.11753-24-laurent.pinchart@ideasonboard.com>",
    "date": "2020-05-12T00:03:21",
    "name": "[libcamera-devel,23/24] utils: raspberrypi: ctt: Fix pycodestyle E305",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "9ede25ef7c14ec2ba733d4ab32540ddbbf8e5801",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3777/mbox/",
    "series": [
        {
            "id": 897,
            "url": "https://patchwork.libcamera.org/api/1.1/series/897/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=897",
            "date": "2020-05-12T00:02:58",
            "name": "utils: raspberrypi: ctt: Comply with pycodestyle",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/897/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3777/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3777/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<laurent.pinchart@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 53DF760E1E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 May 2020 02:03:48 +0200 (CEST)",
            "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C984911F3;\n\tTue, 12 May 2020 02:03:47 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"k2TisRIn\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1589241828;\n\tbh=qYgSzfYk8qfXQvj7AQz1975n95mssuUQXjDhA6CrPfo=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=k2TisRInK4BWCAKGwnA9TuKnSCiTTOVPcYTPR7kItEg71CeVk8CdPvXtTtpYBUZOq\n\t8ciH6ah9s7C5FG9UG9OUbqQt2GloZqdZsBes4ZMQ9DqFHEPxa6sv+nISF80l/ruaej\n\tPypO/pcBx/p0jY3Vo1YU/KYnDozotrtTB2TMH3j0=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 12 May 2020 03:03:21 +0300",
        "Message-Id": "<20200512000322.11753-24-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.26.2",
        "In-Reply-To": "<20200512000322.11753-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20200512000322.11753-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 23/24] utils: raspberrypi: ctt: Fix\n\tpycodestyle E305",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "X-List-Received-Date": "Tue, 12 May 2020 00:03:49 -0000"
    },
    "content": "E305 expected 2 blank lines after class or function definition\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n utils/raspberrypi/ctt/ctt.py                 | 2 ++\n utils/raspberrypi/ctt/ctt_alsc.py            | 2 ++\n utils/raspberrypi/ctt/ctt_awb.py             | 1 +\n utils/raspberrypi/ctt/ctt_ccm.py             | 2 ++\n utils/raspberrypi/ctt/ctt_geq.py             | 1 +\n utils/raspberrypi/ctt/ctt_image_load.py      | 1 +\n utils/raspberrypi/ctt/ctt_lux.py             | 1 +\n utils/raspberrypi/ctt/ctt_macbeth_locator.py | 1 +\n utils/raspberrypi/ctt/ctt_tools.py           | 7 +++++++\n 9 files changed, 18 insertions(+)",
    "diff": "diff --git a/utils/raspberrypi/ctt/ctt.py b/utils/raspberrypi/ctt/ctt.py\nindex 8f8e06f069df..02f1d8531269 100755\n--- a/utils/raspberrypi/ctt/ctt.py\n+++ b/utils/raspberrypi/ctt/ctt.py\n@@ -60,6 +60,7 @@ def get_col_lux(string):\n         return col, None\n     return int(col), int(lux)\n \n+\n \"\"\"\n Camera object that is the backbone of the tuning tool.\n Input is the desired path of the output json.\n@@ -797,6 +798,7 @@ def run_ctt(json_output, directory, config, log_output):\n     else:\n         Cam.write_log(log_output)\n \n+\n if __name__ == '__main__':\n     \"\"\"\n     initialise calibration\ndiff --git a/utils/raspberrypi/ctt/ctt_alsc.py b/utils/raspberrypi/ctt/ctt_alsc.py\nindex b697ed3e22b4..b988f565f245 100644\n--- a/utils/raspberrypi/ctt/ctt_alsc.py\n+++ b/utils/raspberrypi/ctt/ctt_alsc.py\n@@ -218,6 +218,7 @@ def get_16x12_grid(chan, dx, dy):\n     \"\"\"\n     return np.array(grid)\n \n+\n \"\"\"\n obtains sigmas for red and blue, effectively a measure of the 'error'\n \"\"\"\n@@ -257,6 +258,7 @@ def get_sigma(Cam, cal_cr_list, cal_cb_list):\n     # print(sigma_r, sigma_b)\n     return sigma_r, sigma_b\n \n+\n \"\"\"\n calculate sigma from two adjacent gain tables\n \"\"\"\ndiff --git a/utils/raspberrypi/ctt/ctt_awb.py b/utils/raspberrypi/ctt/ctt_awb.py\nindex c269b67a12c0..834d4dec2742 100644\n--- a/utils/raspberrypi/ctt/ctt_awb.py\n+++ b/utils/raspberrypi/ctt/ctt_awb.py\n@@ -288,6 +288,7 @@ def awb(Cam, cal_cr_list, cal_cb_list, plot):\n     \"\"\"\n     return(ct_curve, np.round(transverse_pos, 5), np.round(transverse_neg, 5))\n \n+\n \"\"\"\n obtain greyscale patches and perform alsc colour correction\n \"\"\"\ndiff --git a/utils/raspberrypi/ctt/ctt_ccm.py b/utils/raspberrypi/ctt/ctt_ccm.py\nindex 0a4eb57a8cdf..dd660e40bb66 100644\n--- a/utils/raspberrypi/ctt/ctt_ccm.py\n+++ b/utils/raspberrypi/ctt/ctt_ccm.py\n@@ -16,6 +16,7 @@ def degamma(x):\n     x = x * ((2**16)-1)\n     return x\n \n+\n \"\"\"\n FInds colour correction matrices for list of images\n \"\"\"\n@@ -153,6 +154,7 @@ def ccm(Cam, cal_cr_list, cal_cb_list):\n         })\n     return ccms\n \n+\n \"\"\"\n calculates the ccm for an individual image.\n ccms are calculate in rgb space, and are fit by hand. Although it is a 3x3\ndiff --git a/utils/raspberrypi/ctt/ctt_geq.py b/utils/raspberrypi/ctt/ctt_geq.py\nindex 1ffa4e91b1b7..d24b216389df 100644\n--- a/utils/raspberrypi/ctt/ctt_geq.py\n+++ b/utils/raspberrypi/ctt/ctt_geq.py\n@@ -165,6 +165,7 @@ def geq_fit(Cam, plot):\n \n     return round(slope, 5), int(offset)\n \n+\n \"\"\"\"\n Return green channels of macbeth patches\n returns g0, g1 where\ndiff --git a/utils/raspberrypi/ctt/ctt_image_load.py b/utils/raspberrypi/ctt/ctt_image_load.py\nindex e373c7c0d2a0..240d68f984a2 100644\n--- a/utils/raspberrypi/ctt/ctt_image_load.py\n+++ b/utils/raspberrypi/ctt/ctt_image_load.py\n@@ -418,6 +418,7 @@ def load_image(Cam, im_str, mac_config=None, show=False, mac=True, show_meta=Fal\n         # print('\\nERROR:\\nInvalid file extension')\n         return 0\n \n+\n \"\"\"\n bytearray splice to number little endian\n \"\"\"\ndiff --git a/utils/raspberrypi/ctt/ctt_lux.py b/utils/raspberrypi/ctt/ctt_lux.py\nindex 55b2aa299ed3..ab367cae37d7 100644\n--- a/utils/raspberrypi/ctt/ctt_lux.py\n+++ b/utils/raspberrypi/ctt/ctt_lux.py\n@@ -19,6 +19,7 @@ def lux(Cam, Img):\n     channels = [Img.channels[i] for i in Img.order]\n     return lux_calc(Cam, Img, patches, channels), shutter_speed, gain\n \n+\n \"\"\"\n perform lux calibration on bayer channels\n \"\"\"\ndiff --git a/utils/raspberrypi/ctt/ctt_macbeth_locator.py b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\nindex 4e666b0f1089..6567490c5539 100644\n--- a/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n+++ b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n@@ -21,6 +21,7 @@ output to the console\n def fxn():\n     warnings.warn(\"runtime\", RuntimeWarning)\n \n+\n \"\"\"\n Define the success message\n \"\"\"\ndiff --git a/utils/raspberrypi/ctt/ctt_tools.py b/utils/raspberrypi/ctt/ctt_tools.py\nindex 3a2fb4af95c5..d5d64d47d25b 100644\n--- a/utils/raspberrypi/ctt/ctt_tools.py\n+++ b/utils/raspberrypi/ctt/ctt_tools.py\n@@ -48,6 +48,8 @@ def get_config(dictt, key, default, ttype):\n     except (KeyError, ValueError):\n         val = default\n     return val\n+\n+\n \"\"\"\n argument parser\n \"\"\"\n@@ -67,6 +69,8 @@ def parse_input():\n     if json_output is None:\n         raise ArgError('\\n\\nERROR! No output json given.')\n     return json_output, directory, config, log_path\n+\n+\n \"\"\"\n custom arg and macbeth error class\n \"\"\"\n@@ -75,6 +79,7 @@ class ArgError(Exception):\n class MacbethError(Exception):\n     pass\n \n+\n \"\"\"\n correlation function to quantify match\n \"\"\"\n@@ -84,6 +89,7 @@ def correlate(im1, im2):\n     cor = np.corrcoef(f1, f2)\n     return cor[0][1]\n \n+\n \"\"\"\n get list of files from directory\n \"\"\"\n@@ -94,6 +100,7 @@ def get_photos(directory='photos'):\n             filename_list.append(filename)\n     return filename_list\n \n+\n \"\"\"\n display image for debugging... read at your own risk...\n \"\"\"\n",
    "prefixes": [
        "libcamera-devel",
        "23/24"
    ]
}