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)
  • 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.2.0.tar.gz (14.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_analysis-1.2.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eulumdat_analysis-1.2.0.tar.gz
  • Upload date:
  • Size: 14.3 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.2.0.tar.gz
Algorithm Hash digest
SHA256 c2dd797b270ca8e903e016d90703ea6d2ada01dcec562e3c246d54a3fa1b9068
MD5 759fe86c1ff37847a9e62f1036cdd386
BLAKE2b-256 20ab4deefd351b2cb7a98d47bd0d203d1137ce43cbcdbd76f79d8fd676acc24b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for eulumdat_analysis-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4acf8d5d56f9670bfe5006d273bcf42d2ebb884335fbd0a5bdb81acb056c350e
MD5 284bd4703a7b2ed3c727dbe7a7f81a89
BLAKE2b-256 be8afdc2f2617348b3b22fc834faf333d30fb3a1f7d5ab8fee7d991d4e2ef269

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