eulumdat-plot 1.0.3__tar.gz → 1.0.4__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eulumdat-plot
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: Photometric polar diagram generator for EULUMDAT (.ldt) files — extension to eulumdat-py
5
5
  Author: 123VincentB
6
6
  License: MIT
@@ -25,9 +25,9 @@ License-File: LICENSE
25
25
  Requires-Dist: eulumdat-py>=1.0.0
26
26
  Requires-Dist: numpy>=1.21
27
27
  Requires-Dist: svgwrite>=1.4
28
+ Requires-Dist: vl-convert-python>=1.6
29
+ Requires-Dist: Pillow>=9.0
28
30
  Provides-Extra: export
29
- Requires-Dist: vl-convert-python>=1.6; extra == "export"
30
- Requires-Dist: Pillow>=9.0; extra == "export"
31
31
  Provides-Extra: cubic
32
32
  Requires-Dist: scipy>=1.7; extra == "cubic"
33
33
  Provides-Extra: full
@@ -107,13 +107,16 @@ pip install "eulumdat-plot[full]"
107
107
  ## Quick start
108
108
 
109
109
  ```python
110
- from eulumdat_plot import plot_ldt
110
+ from eulumdat_plot import plot_ldt, plot_ldt_svg
111
111
 
112
- # Generate an SVG next to the source file
113
- svg = plot_ldt("luminaire.ldt")
112
+ # Generate an SVG file next to the source file
113
+ path = plot_ldt("luminaire.ldt")
114
114
 
115
115
  # With a distribution code in the banner centre
116
- svg = plot_ldt("luminaire.ldt", code="D53")
116
+ path = plot_ldt("luminaire.ldt", code="D53")
117
+
118
+ # Get the SVG as a string (for inline HTML embedding, no file written)
119
+ svg_str = plot_ldt_svg("luminaire.ldt")
117
120
  ```
118
121
 
119
122
  ## Scaling
@@ -169,6 +172,23 @@ def plot_ldt(
169
172
  | `interp_method` | `"linear"` | `"linear"` or `"cubic"` (requires scipy) |
170
173
  | `debug` | `False` | Colour-code C-planes for visual validation |
171
174
 
175
+ ### `plot_ldt_svg()`
176
+
177
+ Same as `plot_ldt()` but returns the SVG as a **string** instead of writing to
178
+ disk. Useful for inline HTML embedding (no temporary file created).
179
+
180
+ ```python
181
+ def plot_ldt_svg(
182
+ ldt_path: str | Path,
183
+ *,
184
+ code: str = "",
185
+ layout: Layout | None = None,
186
+ interpolate: bool = True,
187
+ interp_step_deg: float = 1.0,
188
+ interp_method: str = "linear",
189
+ ) -> str
190
+ ```
191
+
172
192
  ### `Layout.for_size()`
173
193
 
174
194
  ```python
@@ -221,15 +241,20 @@ eulumdat-plot/
221
241
  └── README.md
222
242
  ```
223
243
 
224
- ## EULUMDAT ecosystem
244
+ ## eulumdat-* ecosystem
245
+
246
+ > **New to the ecosystem?** [eulumdat-quickstart](https://github.com/123VincentB/eulumdat-quickstart) — a step-by-step guide covering all 8 packages with working examples.
225
247
 
226
- | Package | Status | Description |
227
- | ------------------------------------------------------------------ | ------- | -------------------------------------------- |
228
- | [`eulumdat-py`](https://pypi.org/project/eulumdat-py/) | v0.1.4 | Read / write EULUMDAT files |
229
- | [`eulumdat-symmetry`](https://pypi.org/project/eulumdat-symmetry/) | v1.0.0 | Symmetrise EULUMDAT files |
230
- | `eulumdat-plot` | v1.0.0 | Photometric polar diagram — **this package** |
231
- | `eulumdat-luminance` | planned | Luminance table cd/m² 55°–85°) |
232
- | `eulumdat-ugr` | planned | UGR calculation (CIE 117, CIE 190) |
248
+ | Package | Description |
249
+ |---|---|
250
+ | [eulumdat-py](https://pypi.org/project/eulumdat-py/) | Read / write EULUMDAT files |
251
+ | [eulumdat-symmetry](https://pypi.org/project/eulumdat-symmetry/) | Symmetrise and detect ISYM |
252
+ | **`eulumdat-plot`** | **Polar intensity diagram (SVG/PNG) — this package** |
253
+ | [eulumdat-luminance](https://pypi.org/project/eulumdat-luminance/) | Luminance table and polar diagram |
254
+ | [eulumdat-ugr](https://pypi.org/project/eulumdat-ugr/) | UGR catalogue (CIE 117/190) |
255
+ | [eulumdat-analysis](https://pypi.org/project/eulumdat-analysis/) | Beam half-angle, FWHM |
256
+ | [eulumdat-report](https://pypi.org/project/eulumdat-report/) | Full photometric datasheet (HTML/PDF) |
257
+ | [eulumdat-ies](https://pypi.org/project/eulumdat-ies/) | LDT ↔ IES LM-63-2002 conversion |
233
258
 
234
259
  ## Requirements
235
260
 
@@ -65,13 +65,16 @@ pip install "eulumdat-plot[full]"
65
65
  ## Quick start
66
66
 
67
67
  ```python
68
- from eulumdat_plot import plot_ldt
68
+ from eulumdat_plot import plot_ldt, plot_ldt_svg
69
69
 
70
- # Generate an SVG next to the source file
71
- svg = plot_ldt("luminaire.ldt")
70
+ # Generate an SVG file next to the source file
71
+ path = plot_ldt("luminaire.ldt")
72
72
 
73
73
  # With a distribution code in the banner centre
74
- svg = plot_ldt("luminaire.ldt", code="D53")
74
+ path = plot_ldt("luminaire.ldt", code="D53")
75
+
76
+ # Get the SVG as a string (for inline HTML embedding, no file written)
77
+ svg_str = plot_ldt_svg("luminaire.ldt")
75
78
  ```
76
79
 
77
80
  ## Scaling
@@ -127,6 +130,23 @@ def plot_ldt(
127
130
  | `interp_method` | `"linear"` | `"linear"` or `"cubic"` (requires scipy) |
128
131
  | `debug` | `False` | Colour-code C-planes for visual validation |
129
132
 
133
+ ### `plot_ldt_svg()`
134
+
135
+ Same as `plot_ldt()` but returns the SVG as a **string** instead of writing to
136
+ disk. Useful for inline HTML embedding (no temporary file created).
137
+
138
+ ```python
139
+ def plot_ldt_svg(
140
+ ldt_path: str | Path,
141
+ *,
142
+ code: str = "",
143
+ layout: Layout | None = None,
144
+ interpolate: bool = True,
145
+ interp_step_deg: float = 1.0,
146
+ interp_method: str = "linear",
147
+ ) -> str
148
+ ```
149
+
130
150
  ### `Layout.for_size()`
131
151
 
132
152
  ```python
@@ -179,15 +199,20 @@ eulumdat-plot/
179
199
  └── README.md
180
200
  ```
181
201
 
182
- ## EULUMDAT ecosystem
202
+ ## eulumdat-* ecosystem
203
+
204
+ > **New to the ecosystem?** [eulumdat-quickstart](https://github.com/123VincentB/eulumdat-quickstart) — a step-by-step guide covering all 8 packages with working examples.
183
205
 
184
- | Package | Status | Description |
185
- | ------------------------------------------------------------------ | ------- | -------------------------------------------- |
186
- | [`eulumdat-py`](https://pypi.org/project/eulumdat-py/) | v0.1.4 | Read / write EULUMDAT files |
187
- | [`eulumdat-symmetry`](https://pypi.org/project/eulumdat-symmetry/) | v1.0.0 | Symmetrise EULUMDAT files |
188
- | `eulumdat-plot` | v1.0.0 | Photometric polar diagram — **this package** |
189
- | `eulumdat-luminance` | planned | Luminance table cd/m² 55°–85°) |
190
- | `eulumdat-ugr` | planned | UGR calculation (CIE 117, CIE 190) |
206
+ | Package | Description |
207
+ |---|---|
208
+ | [eulumdat-py](https://pypi.org/project/eulumdat-py/) | Read / write EULUMDAT files |
209
+ | [eulumdat-symmetry](https://pypi.org/project/eulumdat-symmetry/) | Symmetrise and detect ISYM |
210
+ | **`eulumdat-plot`** | **Polar intensity diagram (SVG/PNG) — this package** |
211
+ | [eulumdat-luminance](https://pypi.org/project/eulumdat-luminance/) | Luminance table and polar diagram |
212
+ | [eulumdat-ugr](https://pypi.org/project/eulumdat-ugr/) | UGR catalogue (CIE 117/190) |
213
+ | [eulumdat-analysis](https://pypi.org/project/eulumdat-analysis/) | Beam half-angle, FWHM |
214
+ | [eulumdat-report](https://pypi.org/project/eulumdat-report/) | Full photometric datasheet (HTML/PDF) |
215
+ | [eulumdat-ies](https://pypi.org/project/eulumdat-ies/) | LDT ↔ IES LM-63-2002 conversion |
191
216
 
192
217
  ## Requirements
193
218
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "eulumdat-plot"
7
- version = "1.0.3"
7
+ version = "1.0.4"
8
8
  description = "Photometric polar diagram generator for EULUMDAT (.ldt) files — extension to eulumdat-py"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -15,6 +15,8 @@ dependencies = [
15
15
  "eulumdat-py >= 1.0.0",
16
16
  "numpy >= 1.21",
17
17
  "svgwrite >= 1.4",
18
+ "vl-convert-python >= 1.6",
19
+ "Pillow >= 9.0",
18
20
  ]
19
21
 
20
22
  keywords = [
@@ -36,11 +38,9 @@ classifiers = [
36
38
  ]
37
39
 
38
40
  [project.optional-dependencies]
39
- # Raster export (SVG PNG / JPEG)
40
- export = [
41
- "vl-convert-python >= 1.6",
42
- "Pillow >= 9.0",
43
- ]
41
+ # Raster export vl-convert-python and Pillow are now required dependencies.
42
+ # This extra is kept for backwards compatibility only.
43
+ export = []
44
44
  # Smooth curve interpolation
45
45
  cubic = [
46
46
  "scipy >= 1.7",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eulumdat-plot
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: Photometric polar diagram generator for EULUMDAT (.ldt) files — extension to eulumdat-py
5
5
  Author: 123VincentB
6
6
  License: MIT
@@ -25,9 +25,9 @@ License-File: LICENSE
25
25
  Requires-Dist: eulumdat-py>=1.0.0
26
26
  Requires-Dist: numpy>=1.21
27
27
  Requires-Dist: svgwrite>=1.4
28
+ Requires-Dist: vl-convert-python>=1.6
29
+ Requires-Dist: Pillow>=9.0
28
30
  Provides-Extra: export
29
- Requires-Dist: vl-convert-python>=1.6; extra == "export"
30
- Requires-Dist: Pillow>=9.0; extra == "export"
31
31
  Provides-Extra: cubic
32
32
  Requires-Dist: scipy>=1.7; extra == "cubic"
33
33
  Provides-Extra: full
@@ -107,13 +107,16 @@ pip install "eulumdat-plot[full]"
107
107
  ## Quick start
108
108
 
109
109
  ```python
110
- from eulumdat_plot import plot_ldt
110
+ from eulumdat_plot import plot_ldt, plot_ldt_svg
111
111
 
112
- # Generate an SVG next to the source file
113
- svg = plot_ldt("luminaire.ldt")
112
+ # Generate an SVG file next to the source file
113
+ path = plot_ldt("luminaire.ldt")
114
114
 
115
115
  # With a distribution code in the banner centre
116
- svg = plot_ldt("luminaire.ldt", code="D53")
116
+ path = plot_ldt("luminaire.ldt", code="D53")
117
+
118
+ # Get the SVG as a string (for inline HTML embedding, no file written)
119
+ svg_str = plot_ldt_svg("luminaire.ldt")
117
120
  ```
118
121
 
119
122
  ## Scaling
@@ -169,6 +172,23 @@ def plot_ldt(
169
172
  | `interp_method` | `"linear"` | `"linear"` or `"cubic"` (requires scipy) |
170
173
  | `debug` | `False` | Colour-code C-planes for visual validation |
171
174
 
175
+ ### `plot_ldt_svg()`
176
+
177
+ Same as `plot_ldt()` but returns the SVG as a **string** instead of writing to
178
+ disk. Useful for inline HTML embedding (no temporary file created).
179
+
180
+ ```python
181
+ def plot_ldt_svg(
182
+ ldt_path: str | Path,
183
+ *,
184
+ code: str = "",
185
+ layout: Layout | None = None,
186
+ interpolate: bool = True,
187
+ interp_step_deg: float = 1.0,
188
+ interp_method: str = "linear",
189
+ ) -> str
190
+ ```
191
+
172
192
  ### `Layout.for_size()`
173
193
 
174
194
  ```python
@@ -221,15 +241,20 @@ eulumdat-plot/
221
241
  └── README.md
222
242
  ```
223
243
 
224
- ## EULUMDAT ecosystem
244
+ ## eulumdat-* ecosystem
245
+
246
+ > **New to the ecosystem?** [eulumdat-quickstart](https://github.com/123VincentB/eulumdat-quickstart) — a step-by-step guide covering all 8 packages with working examples.
225
247
 
226
- | Package | Status | Description |
227
- | ------------------------------------------------------------------ | ------- | -------------------------------------------- |
228
- | [`eulumdat-py`](https://pypi.org/project/eulumdat-py/) | v0.1.4 | Read / write EULUMDAT files |
229
- | [`eulumdat-symmetry`](https://pypi.org/project/eulumdat-symmetry/) | v1.0.0 | Symmetrise EULUMDAT files |
230
- | `eulumdat-plot` | v1.0.0 | Photometric polar diagram — **this package** |
231
- | `eulumdat-luminance` | planned | Luminance table cd/m² 55°–85°) |
232
- | `eulumdat-ugr` | planned | UGR calculation (CIE 117, CIE 190) |
248
+ | Package | Description |
249
+ |---|---|
250
+ | [eulumdat-py](https://pypi.org/project/eulumdat-py/) | Read / write EULUMDAT files |
251
+ | [eulumdat-symmetry](https://pypi.org/project/eulumdat-symmetry/) | Symmetrise and detect ISYM |
252
+ | **`eulumdat-plot`** | **Polar intensity diagram (SVG/PNG) — this package** |
253
+ | [eulumdat-luminance](https://pypi.org/project/eulumdat-luminance/) | Luminance table and polar diagram |
254
+ | [eulumdat-ugr](https://pypi.org/project/eulumdat-ugr/) | UGR catalogue (CIE 117/190) |
255
+ | [eulumdat-analysis](https://pypi.org/project/eulumdat-analysis/) | Beam half-angle, FWHM |
256
+ | [eulumdat-report](https://pypi.org/project/eulumdat-report/) | Full photometric datasheet (HTML/PDF) |
257
+ | [eulumdat-ies](https://pypi.org/project/eulumdat-ies/) | LDT ↔ IES LM-63-2002 conversion |
233
258
 
234
259
  ## Requirements
235
260
 
File without changes
File without changes
@@ -1,6 +1,8 @@
1
1
  eulumdat-py>=1.0.0
2
2
  numpy>=1.21
3
3
  svgwrite>=1.4
4
+ vl-convert-python>=1.6
5
+ Pillow>=9.0
4
6
 
5
7
  [cubic]
6
8
  scipy>=1.7
@@ -12,8 +14,6 @@ pytest>=7.0
12
14
  eulumdat-plot[full]
13
15
 
14
16
  [export]
15
- vl-convert-python>=1.6
16
- Pillow>=9.0
17
17
 
18
18
  [full]
19
19
  eulumdat-plot[export]