Skip to main content

Bidirectional LDT ↔ IES LM-63-2002 converter for the eulumdat-* ecosystem

Project description

eulumdat-ies

PyPI version Python License: MIT

Bidirectional converter between EULUMDAT (.ldt) and IES LM-63-2002 (.ies) photometric file formats — part of the eulumdat-* ecosystem.

IES Type C only. Type A and Type B photometry are out of scope.

Installation

pip install eulumdat-ies

Command-line interface

# IES → LDT
ies-to-ldt luminaire.ies
ies-to-ldt luminaire.ies -o output/

# LDT → IES
ldt-to-ies luminaire.ldt
ldt-to-ies luminaire.ldt -o output/

Output files are written in the same directory as the source file by default, using the same stem: luminaire.iesluminaire.ldt, luminaire.ldtluminaire.ies.

Python API

from pyldt import LdtReader
from eulumdat_ies import ldt_to_ies, ies_to_ldt

# LDT → IES
ldt = LdtReader.read("luminaire.ldt")
ldt_to_ies(ldt, "luminaire.ies")        # write to file
ies_str = ldt_to_ies(ldt)               # or return as string

# IES → LDT
ldt = ies_to_ldt("luminaire.ies")       # from file path
ldt = ies_to_ldt(ies_string)            # or from string content

The Ldt object returned by ies_to_ldt is fully compatible with the entire eulumdat-* ecosystem (eulumdat-plot, eulumdat-luminance, eulumdat-ugr, etc.).

Format notes

LDT → IES

  • Intensities converted from cd/klm to absolute candelas using lamp_flux × num_lamps / 1000
  • If lamp flux is unavailable, lamp_lumens = -1 is written (IES convention for measured flux)
  • All C-planes from the expanded LDT matrix are written (ISYM is transparent to the caller)
  • C=360° is omitted if C=0° is also present (no duplicate)
  • Dimensions converted from mm to metres

IES → LDT

  • Intensities converted from absolute candelas to cd/klm
  • If lamp_lumens = -1: values stored as-is, lamp_flux set to 1000 lm, warning emitted
  • Matrix is always ISYM=0 — use eulumdat-symmetry to re-detect symmetry if needed
  • C=360° duplicate stripped if present
  • Negative IES dimensions (circular source) → positive millimetre values

Error handling

from eulumdat_ies import IESTypeError, IESParseError

try:
    ldt = ies_to_ldt("luminaire.ies")
except IESTypeError:
    print("Not a Type C file")
except IESParseError:
    print("Malformed IES file")

Ecosystem

eulumdat-py  (pyldt)
    └── eulumdat-ies  (eulumdat_ies)   ← this package

eulumdat-ies depends only on eulumdat-py. No NumPy, no external dependencies.

Package Role
eulumdat-py LDT parser — base of the ecosystem
eulumdat-symmetry ISYM detection and symmetrisation
eulumdat-plot Polar intensity diagram (SVG/PNG)
eulumdat-luminance Luminance table and polar diagram
eulumdat-ugr UGR catalogue table (CIE 117/190)
eulumdat-report Full photometric datasheet (HTML/PDF)

License

MIT

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_ies-1.1.0.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

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

eulumdat_ies-1.1.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file eulumdat_ies-1.1.0.tar.gz.

File metadata

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

File hashes

Hashes for eulumdat_ies-1.1.0.tar.gz
Algorithm Hash digest
SHA256 bef4fe92f89be6bf40e6c654ef29ec7e4fe0cb5bb98215967da50baae8974c43
MD5 cb18289d153f2bb50f861d16c875bfca
BLAKE2b-256 ae6a500a48dbc7ada91f8af15836c939f110de14951271d5fc35468bf653dab8

See more details on using hashes here.

File details

Details for the file eulumdat_ies-1.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for eulumdat_ies-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac619df64d68562bf91182d76950a0c3dfeef59d7baea66cb346b8528da1cf62
MD5 902e03b86706eb661b3ac6825d40104b
BLAKE2b-256 5a125f9fafccae6193fde4fed04bd2a84d752ee5c259759f3c030628a41938a6

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