eulumdat 0.8.1__cp315-cp315-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
eulumdat/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ from .eulumdat import *
2
+
3
+ __doc__ = eulumdat.__doc__
4
+ if hasattr(eulumdat, "__all__"):
5
+ __all__ = eulumdat.__all__
Binary file
@@ -0,0 +1,177 @@
1
+ Metadata-Version: 2.4
2
+ Name: eulumdat
3
+ Version: 0.8.1
4
+ Classifier: Development Status :: 4 - Beta
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: Intended Audience :: Science/Research
7
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
8
+ Classifier: Programming Language :: Rust
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.8
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Scientific/Engineering
16
+ Summary: Python bindings for eulumdat photometric file parsing library
17
+ Keywords: eulumdat,photometry,lighting,ies,ldt
18
+ License: AGPL-3.0-or-later
19
+ Requires-Python: >=3.8
20
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
21
+ Project-URL: Homepage, https://github.com/holg/eulumdat-rs
22
+ Project-URL: Repository, https://github.com/holg/eulumdat-rs
23
+
24
+ # eulumdat
25
+
26
+ Python bindings for the [eulumdat-rs](https://github.com/holg/eulumdat-rs) Rust library.
27
+
28
+ Parse, write, and analyze **EULUMDAT (LDT)** and **IES** photometric files with high performance.
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ pip install eulumdat
34
+ ```
35
+
36
+ ## Quick Start
37
+
38
+ ```python
39
+ import eulumdat
40
+
41
+ # Parse an LDT file
42
+ ldt = eulumdat.Eulumdat.from_file("luminaire.ldt")
43
+
44
+ # Access photometric data
45
+ print(f"Luminaire: {ldt.luminaire_name}")
46
+ print(f"Symmetry: {ldt.symmetry}")
47
+ print(f"Max intensity: {ldt.max_intensity()} cd/klm")
48
+ print(f"Lamp flux (lamp set 1): {ldt.luminous_flux()} lm")
49
+
50
+ # Validate the data
51
+ for warning in ldt.validate():
52
+ print(f"Warning [{warning.code}]: {warning.message}")
53
+
54
+ # Generate SVG diagrams
55
+ polar_svg = ldt.polar_svg(width=500, height=500)
56
+ butterfly_svg = ldt.butterfly_svg(width=500, height=400)
57
+ cartesian_svg = ldt.cartesian_svg(width=600, height=400)
58
+ heatmap_svg = ldt.heatmap_svg(width=700, height=500)
59
+
60
+ # Calculate BUG rating (IESNA TM-15-11)
61
+ rating = ldt.bug_rating()
62
+ print(f"BUG Rating: {rating}") # e.g., "B2 U1 G3"
63
+
64
+ # Export to IES format
65
+ ies_content = ldt.to_ies()
66
+ ```
67
+
68
+ ## Photometric Calculations (v0.3.0+)
69
+
70
+ ```python
71
+ # Complete photometric summary
72
+ summary = ldt.photometric_summary()
73
+ print(summary.to_text()) # Full multi-line report
74
+ print(summary.to_compact()) # One-line summary
75
+ data = summary.to_dict() # For JSON serialization
76
+
77
+ # CIE flux codes (N1-N5)
78
+ cie = ldt.cie_flux_codes()
79
+ print(f"CIE Flux Code: {cie}") # e.g., "100 77 43 0 0"
80
+ print(f"N1 (DLOR): {cie.n1}%")
81
+ print(f"N4 (ULOR): {cie.n4}%")
82
+
83
+ # Beam characteristics: full width at 50 % / 10 % of the peak, in the
84
+ # section through the peak; None when there is no downward lobe (up-lights)
85
+ beam, field = ldt.beam_angle(), ldt.field_angle()
86
+ print(f"Beam angle (50% of peak): {beam:.1f}°" if beam is not None else "Beam angle: —")
87
+ print(f"Field angle (10% of peak): {field:.1f}°" if field is not None else "Field angle: —")
88
+ print(ldt.beam_field_sections()) # C0–C180 and C90–C270
89
+ print(f"Cut-off angle: {ldt.cut_off_angle():.1f}°")
90
+
91
+ # Spacing criteria (S/H ratios)
92
+ s_c0, s_c90 = ldt.spacing_criteria()
93
+ print(f"S/H ratio: {s_c0:.2f} (C0), {s_c90:.2f} (C90)")
94
+
95
+ # Zonal lumens (30° zones)
96
+ zones = ldt.zonal_lumens_30()
97
+ print(f"Downward: {zones.downward_total():.1f}%")
98
+ print(f"Upward: {zones.upward_total():.1f}%")
99
+
100
+ # Photometric classification code
101
+ print(f"Classification: {ldt.photometric_code()}") # e.g., "D-M"
102
+
103
+ # Downward flux to specific angle
104
+ flux_60 = ldt.downward_flux(60.0) # % within 60° of nadir
105
+ ```
106
+
107
+ ## GLDF Export (v0.3.0+)
108
+
109
+ ```python
110
+ # Get GLDF-compatible photometric data
111
+ gldf = ldt.gldf_data()
112
+ print(gldf.cie_flux_code)
113
+ print(gldf.light_output_ratio)
114
+ print(gldf.bug_rating)
115
+
116
+ # Export as dictionary for JSON
117
+ gldf_dict = gldf.to_dict()
118
+ import json
119
+ json.dumps(gldf_dict)
120
+ ```
121
+
122
+ ## UGR Calculation (v0.3.0+)
123
+
124
+ ```python
125
+ # Standard office room
126
+ params = eulumdat.UgrParams.standard_office()
127
+ ugr = ldt.calculate_ugr(params)
128
+ print(f"UGR: {ugr:.1f}")
129
+
130
+ # Custom room configuration
131
+ params = eulumdat.UgrParams(
132
+ room_length=10.0,
133
+ room_width=6.0,
134
+ mounting_height=3.0,
135
+ eye_height=1.2,
136
+ observer_x=5.0,
137
+ observer_y=3.0
138
+ )
139
+ params.add_luminaire(2.5, 2.0)
140
+ params.add_luminaire(7.5, 2.0)
141
+ params.add_luminaire(2.5, 4.0)
142
+ params.add_luminaire(7.5, 4.0)
143
+ ugr = ldt.calculate_ugr(params)
144
+ ```
145
+
146
+ ## IES Format Support
147
+
148
+ ```python
149
+ # Parse IES files
150
+ ldt = eulumdat.Eulumdat.parse_ies(ies_content)
151
+ # or from file
152
+ ldt = eulumdat.Eulumdat.from_ies_file("luminaire.ies")
153
+
154
+ # Export to IES
155
+ ies_output = ldt.to_ies()
156
+ ```
157
+
158
+ ## Diagram Themes
159
+
160
+ ```python
161
+ # Light theme (default)
162
+ svg = ldt.polar_svg(theme=eulumdat.SvgTheme.Light)
163
+
164
+ # Dark theme
165
+ svg = ldt.polar_svg(theme=eulumdat.SvgTheme.Dark)
166
+
167
+ # CSS variables for dynamic theming
168
+ svg = ldt.polar_svg(theme=eulumdat.SvgTheme.CssVariables)
169
+
170
+ # BUG diagram with detailed zone lumens table
171
+ detailed_bug = ldt.bug_svg_with_details(width=600, height=400)
172
+ ```
173
+
174
+ ## License
175
+
176
+ AGPL-3.0-or-later
177
+
@@ -0,0 +1,6 @@
1
+ eulumdat/__init__.py,sha256=IQVl4GI_WwgU7M-sePp6otuqIJEfkyjrpj2s3A73zu0,115
2
+ eulumdat/eulumdat.cp315-win_amd64.pyd,sha256=yE_122G88WC59WvGcENBWrZEGxFAXRI1K01_qh-eLu0,2134528
3
+ eulumdat-0.8.1.dist-info/METADATA,sha256=1YE12bTlOsr5Ocz_4VQkBliSNt4pgzNurio8lzPh2Ac,5130
4
+ eulumdat-0.8.1.dist-info/WHEEL,sha256=Q5QdGvjBfn8x6ihg-B4VQuuGKk7DT67L9DVrwEH_qj8,97
5
+ eulumdat-0.8.1.dist-info/sboms/eulumdat-py.cyclonedx.json,sha256=VeScqAM_m47OjNdMWOk7PLsLtxTNV5C1Dc1B1tvr9tw,43973
6
+ eulumdat-0.8.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.16.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp315-cp315-win_amd64