Skip to main content

UGR (Unified Glare Rating) calculation from EULUMDAT (.ldt) photometric files — extension to eulumdat-py

Project description

eulumdat-ugr

UGR (Unified Glare Rating) calculation from EULUMDAT (.ldt) photometric files — part of the eulumdat-* ecosystem.

Produces the full 19 × 10 UGR table per CIE 117:1995 and CIE 190:2010, compatible with DIALux and Relux catalogue output.

Installation

pip install eulumdat-ugr

Quick start

from pyldt import LdtReader
from eulumdat_ugr import UgrCalculator

ldt = LdtReader.read("luminaire.ldt")
result = UgrCalculator.compute(ldt)

# NumPy array (19, 10)
print(result.values)

# Export to CSV
with open("ugr_table.csv", "w") as f:
    f.write(result.to_csv())

# Export to JSON (compact)
with open("ugr_table.json", "w") as f:
    f.write(result.to_json())

# Export to JSON (human-readable)
with open("ugr_table.json", "w") as f:
    f.write(result.to_json(indent=2))

Output format

result.values is a (19 × 10) NumPy array:

  • 19 rows — standard room configurations from CIE 190:2010 (2H×2H to 12H×8H)
  • Columns 0–4 — crosswise orientation, 5 reflectance combinations
  • Columns 5–9 — endwise orientation, same 5 reflectance combinations

Reflectance combinations (col % 5):

Index Ceiling Walls Reference plane
0 0.7 0.5 0.2
1 0.7 0.3 0.2
2 0.5 0.5 0.2
3 0.5 0.3 0.2
4 0.3 0.3 0.2

Standards

  • CIE 117:1995 — UGR formula, Guth position index (Table 4.1)
  • CIE 190:2010 — tabular method, background luminance (E_WID), standard room geometry

Validation

Validated against DIALux and Relux reference tables on 11 luminaire samples (SHR = 0.25):

Reference Max deviation
Relux ≤ 0.43 UGR
DIALux ≤ 1.01 UGR

DIALux values are systematically 0.1–0.8 UGR below Relux for small rooms (k ≤ 2.0) — a known inter-software variation. Our implementation follows CIE 190:2010 and aligns with Relux.

Dependencies

Geometry

Fixed geometry per CIE 190:2010 §4.2:

  • H = 2.0 m (luminaire height above observer eye level)
  • Observer at mid-point of short wall, eye level 1.2 m
  • SHR = 0.25 (standard catalogue spacing)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eulumdat_ugr-1.0.0.tar.gz (26.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eulumdat_ugr-1.0.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file eulumdat_ugr-1.0.0.tar.gz.

File metadata

  • Download URL: eulumdat_ugr-1.0.0.tar.gz
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for eulumdat_ugr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cbc33c57f8bee4dd29ea9a97190e372253fa23e2be76108945e3becd27fe1e29
MD5 f80af4e59adef4c9a9ffc453856d174e
BLAKE2b-256 1f2968e9c643a694f5c0b210ae67b1f755331f9e68134e0a25e62cd1681f9fc2

See more details on using hashes here.

File details

Details for the file eulumdat_ugr-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: eulumdat_ugr-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for eulumdat_ugr-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8231509391ee66eda5a0d98f8828022f157afb2b7524eebc449255d3a473e1f
MD5 0377fd81a9e17676fd2faa5468cac2df
BLAKE2b-256 a68968b4c11f882415964ca8139c0a3b5ed56b8cbe32215de7c0d04e93abb4ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page