Skip to main content

Practical photometric calculations on EULUMDAT data

Project description

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)
  • 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, 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

Project structure

eulumdat-analysis/
├── src/
│   └── ldt_analysis/
│       ├── __init__.py
│       ├── half_angle.py
│       ├── resample.py
│       └── flux.py
├── examples/
│   ├── 01_basic_usage.md
│   └── 02_resample.md
├── tests/
│   ├── test_half_angle.py
│   ├── test_resample.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.

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_analysis-1.3.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

eulumdat_analysis-1.3.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file eulumdat_analysis-1.3.0.tar.gz.

File metadata

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

File hashes

Hashes for eulumdat_analysis-1.3.0.tar.gz
Algorithm Hash digest
SHA256 d445540dfe3cf68d33f54e2695490152f949ee41d3f9a200bb50dd6068a3be19
MD5 ece0c8c7d80ad2dac2bb1954c68c6752
BLAKE2b-256 cb5653f152fefab9b3cc1a675c8f90066102b8788e3a58e58ccde248fbf419eb

See more details on using hashes here.

File details

Details for the file eulumdat_analysis-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for eulumdat_analysis-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae7f739b57f62dd5343b31cacade58fad662477eaf1e70e3f33a3a5b901d86d9
MD5 5f0e711ddc66723931636ee7777dcc6e
BLAKE2b-256 c22521a5c81bb3c16098cd2c358a97bac3acd784079c61f27e4f14826d2d6380

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