From 31ad9448d21a0419215a3cfa0607aa86cde1c143 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 21 Jul 2026 10:03:54 +0000 Subject: [PATCH] =?UTF-8?q?Locate=20a=20band's=20floor=20on=20the=20contin?= =?UTF-8?q?uous=20SAP=20scale=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- datatypes/epc/domain/epc.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/datatypes/epc/domain/epc.py b/datatypes/epc/domain/epc.py index 6c65cf0a9..67b69dbaa 100644 --- a/datatypes/epc/domain/epc.py +++ b/datatypes/epc/domain/epc.py @@ -48,4 +48,13 @@ class Epc(Enum): return bounds[self] def sap_lower_bound_continuous(self) -> float: - raise NotImplementedError + """The band floor on the **continuous** SAP scale — the lowest un-rounded + rating whose *published* rating falls in this band (C → 68.5). + + A dwelling is in a band by its published rating, which is the continuous + score rounded half up, so the published rating enters the band half a + point below the integer floor. Anything judging "has this dwelling + reached band X?" against a continuous score must compare with this, not + with `sap_lower_bound`: a dwelling at a continuous 68.6 publishes as SAP + 69 and *is* band C, but reads as 0.4 short of an integer floor of 69.""" + return self.sap_lower_bound() - 0.5