Skip to main content

eulumdat-analysis

PyPI PyPI - Python Version License: MIT

Practical photometric calculations on EULUMDAT data.

Part of the eulumdat-* Python ecosystem built on eulumdat-py.
Developed in an ISO 17025 accredited photometry laboratory.


Features

  • half_angle — half-angle at half maximum (HAHM) per C-plane, with CubicSpline interpolation
  • resample — resample a Ldt to a coarser angular resolution (linear interpolation, ISO 17025 traceable)
  • rotate — azimuthal rotation of the intensity matrix by an arbitrary multiple of the angular step
  • luminous_flux — total flux in lm/klm by trapezoidal integration (CIE 190 method)
  • luminous_flux_range — flux integrated over an arbitrary gamma window [g_min, g_max] in lm/klm
  • lorl_computed — LORL in % computed from the intensity matrix
  • dff_computed — downward flux fraction in % computed from the intensity matrix
  • check_photometric_consistency — compare matrix-computed LORL and DFF against header declared values
  • Handles all ISYM symmetry types including full rotational symmetry (ISYM=1)
  • Automatically rejects multi-peak distributions (secondary peak prominence > 5 % of I_max)
  • Returns None for undefined cases — never raises unhandled exceptions

Installation

pip install eulumdat-analysis

For development:

git clone https://github.com/123VincentB/eulumdat-analysis.git
cd eulumdat-analysis
pip install -e ".[dev]"

Quick start

from pyldt import LdtReader
from ldt_analysis import half_angle, resample, rotate, luminous_flux, lorl_computed, dff_computed, check_photometric_consistency

ldt = LdtReader.read("luminaire.ldt")

# Half-angle at half maximum per C-plane
result = half_angle(ldt, [0.0, 90.0, 180.0, 270.0])
print(result)
# {0.0: 35.4, 90.0: 36.1, 180.0: 35.8, 270.0: 36.0}

# Resample a raw 2.5°×1° measurement to standard 15°×5°
ldt_raw = LdtReader.read("luminaire_raw.ldt")   # 144 C-planes × 181 γ-angles
ldt_15x5 = resample(ldt_raw)                    # → 24 C-planes × 37 γ-angles

# Flux and photometric consistency check (CIE 190)
flux = luminous_flux(ldt)                        # e.g. 865.3 lm/klm
lorl = lorl_computed(ldt)                        # e.g. 86.53 %
dff  = dff_computed(ldt)                         # e.g. 99.8 %
report = check_photometric_consistency(ldt)
# {"lorl_header": 87.0, "lorl_computed": 86.53, "lorl_delta": -0.47, ...}

Examples

File Description
examples/01_basic_usage.md half_angle — basic usage, return values, FWHM
examples/02_resample.md resample — resolution resampling, guards, preserved fields
examples/03_luminous_flux_range.md luminous_flux_range — flux over arbitrary gamma window, edge cases
examples/04_rotate.md rotate — azimuthal rotation, valid angles, edge cases

Project structure

eulumdat-analysis/
├── src/
│   └── ldt_analysis/
│       ├── __init__.py
│       ├── half_angle.py
│       ├── resample.py
│       ├── rotate.py
│       └── flux.py
├── examples/
│   ├── 01_basic_usage.md
│   ├── 02_resample.md
│   ├── 03_luminous_flux_range.md
│   └── 04_rotate.md
├── tests/
│   ├── test_half_angle.py
│   ├── test_resample.py
│   ├── test_rotate.py
│   └── test_flux.py
├── CHANGELOG.md
├── LICENSE
└── README.md

Dependencies

  • eulumdat-py ≥ 1.0.0 — EULUMDAT parser
  • scipy ≥ 1.7 — CubicSpline interpolation and Brent root-finding

half_angle — return values

Case Return value
Normal beam float — crossing angle in degrees
C-plane not found in file (±0.01°) None
I_max = 0 (dark or inactive plane) None
Intensity never drops to half-max within [γ_max, 90°] None
Multi-peak distribution None

resample — return values

Case Return value
Success Ldt — new object at target resolution
c_step <= 0 or g_step <= 0 None
Source has fewer than 2 C-planes or γ-angles None
Target finer than source None

eulumdat-* ecosystem

New to the ecosystem? eulumdat-quickstart — a step-by-step guide covering all 8 packages with working examples.

Package Description
eulumdat-py Read / write EULUMDAT files
eulumdat-symmetry Symmetrise and detect ISYM
eulumdat-plot Polar intensity diagram (SVG/PNG)
eulumdat-luminance Luminance table and polar diagram
eulumdat-ugr UGR catalogue (CIE 117/190)
eulumdat-analysis Beam half-angle, flux integration, photometric consistency — this package
eulumdat-report Full photometric datasheet (HTML/PDF)
eulumdat-ies LDT ↔ IES LM-63-2002 conversion

License

MIT — see LICENSE.


Context

This package was developed as a practical tool in the context of ISO 17025 accredited photometric testing. It is shared as open-source in the hope that it will be useful to others working with EULUMDAT files in Python.

Release files for eulumdat-analysis 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eulumdat-analysis 1.4.0
File Size Uploaded
eulumdat_analysis-1.4.0.tar.gz 18.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eulumdat-analysis 1.4.0
File Interpreter ABI Platform
eulumdat_analysis-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.2 kB

Release files / eulumdat_analysis-1.4.0.tar.gz

Download URL eulumdat_analysis-1.4.0.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
16400868e2ef46d1dcfa704d82009226ea3bff418a995d6eac38ab2d2fe22c5a
BLAKE2b-256 checksum
How to use checksums
31e1f9962b8395654d307867c97ddbed33a6063b03fbe7e515ddbf22128717b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / eulumdat_analysis-1.4.0-py3-none-any.whl

Download URL eulumdat_analysis-1.4.0-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
964d7d349cbb9636330595b34c25d6f5aa6e206036fd10cf7c9663460d9e0818
BLAKE2b-256 checksum
How to use checksums
12771e948b02c8570e65a602dfe2a0aefa431a0b022b7246dca2b2a8c0ca3eae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page