Bidirectional LDT ↔ IES LM-63-2002 converter for the eulumdat-* ecosystem
Project description
eulumdat-ies
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
Quick start
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 = -1is 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_fluxset to 1000 lm, warning emitted - Matrix is always
ISYM=0— useeulumdat-symmetryto 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eulumdat_ies-1.0.0.tar.gz.
File metadata
- Download URL: eulumdat_ies-1.0.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a76232b4316830a46aa8031ee84b5079854d539e620001eb8b76ae4e1042235c
|
|
| MD5 |
63eedc66c9b179a8aaa96788d9e2200a
|
|
| BLAKE2b-256 |
dbdeed87a1d445de38248b8dafe51c1b4c0741b183748a9e3b78bfd5275c6036
|
File details
Details for the file eulumdat_ies-1.0.0-py3-none-any.whl.
File metadata
- Download URL: eulumdat_ies-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9680d2aebfe978511e3176f06cab72ee6e86b5db12a26f7a72892ae0f087d568
|
|
| MD5 |
bc5e5012988b7f84d0c05bb00cf9bd7f
|
|
| BLAKE2b-256 |
45b8e2b15dd234dc28a9e21d37749af7ccfe7bed63f06c8f292b996c4bc5f0ca
|