lightstone 0.1.0__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.
Files changed (51) hide show
  1. lightstone-0.1.0/Cargo.lock +484 -0
  2. lightstone-0.1.0/Cargo.toml +28 -0
  3. lightstone-0.1.0/PKG-INFO +44 -0
  4. lightstone-0.1.0/README.md +26 -0
  5. lightstone-0.1.0/crates/lightstone-analysis/Cargo.toml +15 -0
  6. lightstone-0.1.0/crates/lightstone-analysis/examples/sweep.rs +36 -0
  7. lightstone-0.1.0/crates/lightstone-analysis/src/eye.rs +131 -0
  8. lightstone-0.1.0/crates/lightstone-analysis/src/lib.rs +25 -0
  9. lightstone-0.1.0/crates/lightstone-analysis/src/nodes.rs +281 -0
  10. lightstone-0.1.0/crates/lightstone-analysis/src/pam4.rs +567 -0
  11. lightstone-0.1.0/crates/lightstone-analysis/src/spectrum.rs +282 -0
  12. lightstone-0.1.0/crates/lightstone-analysis/src/stats.rs +66 -0
  13. lightstone-0.1.0/crates/lightstone-analysis/src/tdecq.rs +425 -0
  14. lightstone-0.1.0/crates/lightstone-analysis/tests/analysis_nodes.rs +350 -0
  15. lightstone-0.1.0/crates/lightstone-analysis/tests/g2_mode_resolution.rs +64 -0
  16. lightstone-0.1.0/crates/lightstone-analysis/tests/g6_nonlinear_ser.rs +88 -0
  17. lightstone-0.1.0/crates/lightstone-analysis/tests/spectrum_analyzers.rs +111 -0
  18. lightstone-0.1.0/crates/lightstone-core/Cargo.toml +12 -0
  19. lightstone-0.1.0/crates/lightstone-core/examples/timing.rs +25 -0
  20. lightstone-0.1.0/crates/lightstone-core/src/align.rs +202 -0
  21. lightstone-0.1.0/crates/lightstone-core/src/component.rs +358 -0
  22. lightstone-0.1.0/crates/lightstone-core/src/components.rs +1567 -0
  23. lightstone-0.1.0/crates/lightstone-core/src/config.rs +364 -0
  24. lightstone-0.1.0/crates/lightstone-core/src/coupling.rs +618 -0
  25. lightstone-0.1.0/crates/lightstone-core/src/custom.rs +521 -0
  26. lightstone-0.1.0/crates/lightstone-core/src/dsp.rs +278 -0
  27. lightstone-0.1.0/crates/lightstone-core/src/example.rs +195 -0
  28. lightstone-0.1.0/crates/lightstone-core/src/ffe.rs +407 -0
  29. lightstone-0.1.0/crates/lightstone-core/src/fiber.rs +194 -0
  30. lightstone-0.1.0/crates/lightstone-core/src/graph.rs +661 -0
  31. lightstone-0.1.0/crates/lightstone-core/src/graph_tests.rs +1395 -0
  32. lightstone-0.1.0/crates/lightstone-core/src/lib.rs +48 -0
  33. lightstone-0.1.0/crates/lightstone-core/src/link.rs +301 -0
  34. lightstone-0.1.0/crates/lightstone-core/src/material.rs +122 -0
  35. lightstone-0.1.0/crates/lightstone-core/src/modes.rs +622 -0
  36. lightstone-0.1.0/crates/lightstone-core/src/prbs.rs +114 -0
  37. lightstone-0.1.0/crates/lightstone-core/src/rng.rs +92 -0
  38. lightstone-0.1.0/crates/lightstone-core/src/rx.rs +291 -0
  39. lightstone-0.1.0/crates/lightstone-core/src/signal.rs +1016 -0
  40. lightstone-0.1.0/crates/lightstone-core/src/system.rs +912 -0
  41. lightstone-0.1.0/crates/lightstone-core/src/tx.rs +462 -0
  42. lightstone-0.1.0/crates/lightstone-core/src/units.rs +59 -0
  43. lightstone-0.1.0/crates/lightstone-core/src/wdm.rs +378 -0
  44. lightstone-0.1.0/crates/lightstone-py/Cargo.toml +19 -0
  45. lightstone-0.1.0/crates/lightstone-py/LICENSE-APACHE +202 -0
  46. lightstone-0.1.0/crates/lightstone-py/LICENSE-MIT +21 -0
  47. lightstone-0.1.0/crates/lightstone-py/README.md +26 -0
  48. lightstone-0.1.0/crates/lightstone-py/python/lightstone/__init__.py +871 -0
  49. lightstone-0.1.0/crates/lightstone-py/src/lib.rs +717 -0
  50. lightstone-0.1.0/pyproject.toml +28 -0
  51. lightstone-0.1.0/python/lightstone/__init__.py +871 -0
@@ -0,0 +1,484 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "autocfg"
7
+ version = "1.5.1"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
10
+
11
+ [[package]]
12
+ name = "bumpalo"
13
+ version = "3.20.3"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
16
+
17
+ [[package]]
18
+ name = "cfg-if"
19
+ version = "1.0.5"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
22
+
23
+ [[package]]
24
+ name = "futures-core"
25
+ version = "0.3.34"
26
+ source = "registry+https://github.com/rust-lang/crates.io-index"
27
+ checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
28
+
29
+ [[package]]
30
+ name = "futures-task"
31
+ version = "0.3.34"
32
+ source = "registry+https://github.com/rust-lang/crates.io-index"
33
+ checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"
34
+
35
+ [[package]]
36
+ name = "futures-util"
37
+ version = "0.3.34"
38
+ source = "registry+https://github.com/rust-lang/crates.io-index"
39
+ checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
40
+ dependencies = [
41
+ "futures-core",
42
+ "futures-task",
43
+ "pin-project-lite",
44
+ "slab",
45
+ ]
46
+
47
+ [[package]]
48
+ name = "heck"
49
+ version = "0.5.0"
50
+ source = "registry+https://github.com/rust-lang/crates.io-index"
51
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
52
+
53
+ [[package]]
54
+ name = "itoa"
55
+ version = "1.0.19"
56
+ source = "registry+https://github.com/rust-lang/crates.io-index"
57
+ checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4"
58
+
59
+ [[package]]
60
+ name = "js-sys"
61
+ version = "0.3.107"
62
+ source = "registry+https://github.com/rust-lang/crates.io-index"
63
+ checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a"
64
+ dependencies = [
65
+ "cfg-if",
66
+ "futures-util",
67
+ "wasm-bindgen",
68
+ ]
69
+
70
+ [[package]]
71
+ name = "libc"
72
+ version = "0.2.191"
73
+ source = "registry+https://github.com/rust-lang/crates.io-index"
74
+ checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
75
+
76
+ [[package]]
77
+ name = "libm"
78
+ version = "0.2.16"
79
+ source = "registry+https://github.com/rust-lang/crates.io-index"
80
+ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
81
+
82
+ [[package]]
83
+ name = "lightstone-analysis"
84
+ version = "0.1.0"
85
+ dependencies = [
86
+ "libm",
87
+ "lightstone-core",
88
+ "num-complex",
89
+ "rustfft",
90
+ "serde",
91
+ "serde_json",
92
+ ]
93
+
94
+ [[package]]
95
+ name = "lightstone-core"
96
+ version = "0.1.0"
97
+ dependencies = [
98
+ "num-complex",
99
+ "rustfft",
100
+ "serde",
101
+ "serde_json",
102
+ ]
103
+
104
+ [[package]]
105
+ name = "lightstone-py"
106
+ version = "0.1.0"
107
+ dependencies = [
108
+ "lightstone-analysis",
109
+ "lightstone-core",
110
+ "num-complex",
111
+ "numpy",
112
+ "pyo3",
113
+ "serde",
114
+ "serde_json",
115
+ ]
116
+
117
+ [[package]]
118
+ name = "lightstone-wasm"
119
+ version = "0.1.0"
120
+ dependencies = [
121
+ "js-sys",
122
+ "lightstone-analysis",
123
+ "lightstone-core",
124
+ "num-complex",
125
+ "rustfft",
126
+ "serde",
127
+ "serde_json",
128
+ "wasm-bindgen",
129
+ ]
130
+
131
+ [[package]]
132
+ name = "matrixmultiply"
133
+ version = "0.3.11"
134
+ source = "registry+https://github.com/rust-lang/crates.io-index"
135
+ checksum = "3f607c237553f086e7043417a51df26b2eb899d3caff94e6a67592ff992fedc7"
136
+ dependencies = [
137
+ "autocfg",
138
+ "rawpointer",
139
+ ]
140
+
141
+ [[package]]
142
+ name = "memchr"
143
+ version = "2.8.3"
144
+ source = "registry+https://github.com/rust-lang/crates.io-index"
145
+ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
146
+
147
+ [[package]]
148
+ name = "ndarray"
149
+ version = "0.17.2"
150
+ source = "registry+https://github.com/rust-lang/crates.io-index"
151
+ checksum = "520080814a7a6b4a6e9070823bb24b4531daac8c4627e08ba5de8c5ef2f2752d"
152
+ dependencies = [
153
+ "matrixmultiply",
154
+ "num-complex",
155
+ "num-integer",
156
+ "num-traits",
157
+ "portable-atomic",
158
+ "portable-atomic-util",
159
+ "rawpointer",
160
+ ]
161
+
162
+ [[package]]
163
+ name = "num-complex"
164
+ version = "0.4.6"
165
+ source = "registry+https://github.com/rust-lang/crates.io-index"
166
+ checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
167
+ dependencies = [
168
+ "num-traits",
169
+ ]
170
+
171
+ [[package]]
172
+ name = "num-integer"
173
+ version = "0.1.47"
174
+ source = "registry+https://github.com/rust-lang/crates.io-index"
175
+ checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b"
176
+ dependencies = [
177
+ "num-traits",
178
+ ]
179
+
180
+ [[package]]
181
+ name = "num-traits"
182
+ version = "0.2.19"
183
+ source = "registry+https://github.com/rust-lang/crates.io-index"
184
+ checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
185
+ dependencies = [
186
+ "autocfg",
187
+ ]
188
+
189
+ [[package]]
190
+ name = "numpy"
191
+ version = "0.30.0"
192
+ source = "registry+https://github.com/rust-lang/crates.io-index"
193
+ checksum = "aa0b9111761885449e894981fa8051dcf69e0bd114aecbd4bcdd830b6be4ed92"
194
+ dependencies = [
195
+ "libc",
196
+ "ndarray",
197
+ "num-complex",
198
+ "num-integer",
199
+ "num-traits",
200
+ "pyo3",
201
+ "pyo3-build-config",
202
+ "rustc-hash",
203
+ ]
204
+
205
+ [[package]]
206
+ name = "once_cell"
207
+ version = "1.21.4"
208
+ source = "registry+https://github.com/rust-lang/crates.io-index"
209
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
210
+
211
+ [[package]]
212
+ name = "pin-project-lite"
213
+ version = "0.2.17"
214
+ source = "registry+https://github.com/rust-lang/crates.io-index"
215
+ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
216
+
217
+ [[package]]
218
+ name = "portable-atomic"
219
+ version = "1.15.0"
220
+ source = "registry+https://github.com/rust-lang/crates.io-index"
221
+ checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
222
+
223
+ [[package]]
224
+ name = "portable-atomic-util"
225
+ version = "0.2.8"
226
+ source = "registry+https://github.com/rust-lang/crates.io-index"
227
+ checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715"
228
+ dependencies = [
229
+ "portable-atomic",
230
+ ]
231
+
232
+ [[package]]
233
+ name = "primal-check"
234
+ version = "0.3.4"
235
+ source = "registry+https://github.com/rust-lang/crates.io-index"
236
+ checksum = "dc0d895b311e3af9902528fbb8f928688abbd95872819320517cc24ca6b2bd08"
237
+ dependencies = [
238
+ "num-integer",
239
+ ]
240
+
241
+ [[package]]
242
+ name = "proc-macro2"
243
+ version = "1.0.107"
244
+ source = "registry+https://github.com/rust-lang/crates.io-index"
245
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
246
+ dependencies = [
247
+ "unicode-ident",
248
+ ]
249
+
250
+ [[package]]
251
+ name = "pyo3"
252
+ version = "0.30.1"
253
+ source = "registry+https://github.com/rust-lang/crates.io-index"
254
+ checksum = "229ca13b8a15bb0d1487b81ab975bfcd97513416499a8312011b6036e42e0de4"
255
+ dependencies = [
256
+ "libc",
257
+ "once_cell",
258
+ "portable-atomic",
259
+ "pyo3-build-config",
260
+ "pyo3-ffi",
261
+ "pyo3-macros",
262
+ ]
263
+
264
+ [[package]]
265
+ name = "pyo3-build-config"
266
+ version = "0.30.1"
267
+ source = "registry+https://github.com/rust-lang/crates.io-index"
268
+ checksum = "70130e2b6dd1ee589a8788026a429561ca5c40fa7a2fa7914c2282eddae24700"
269
+ dependencies = [
270
+ "target-lexicon",
271
+ ]
272
+
273
+ [[package]]
274
+ name = "pyo3-ffi"
275
+ version = "0.30.1"
276
+ source = "registry+https://github.com/rust-lang/crates.io-index"
277
+ checksum = "5e7ff73c555c286d212d4ce7e5fbda845a973c4f61bd5f160f5f2c3c2a04d1c4"
278
+ dependencies = [
279
+ "libc",
280
+ "pyo3-build-config",
281
+ ]
282
+
283
+ [[package]]
284
+ name = "pyo3-macros"
285
+ version = "0.30.1"
286
+ source = "registry+https://github.com/rust-lang/crates.io-index"
287
+ checksum = "c46d2e5862c7bb8207e3b639f713dda3c499933444784154c11d013c5a691b60"
288
+ dependencies = [
289
+ "proc-macro2",
290
+ "pyo3-macros-backend",
291
+ "quote",
292
+ "syn",
293
+ ]
294
+
295
+ [[package]]
296
+ name = "pyo3-macros-backend"
297
+ version = "0.30.1"
298
+ source = "registry+https://github.com/rust-lang/crates.io-index"
299
+ checksum = "38b89f066f2ae72a2aef52d1537ca2fcd104440ebfadee06e97aa90738a25b9b"
300
+ dependencies = [
301
+ "heck",
302
+ "proc-macro2",
303
+ "quote",
304
+ "syn",
305
+ ]
306
+
307
+ [[package]]
308
+ name = "quote"
309
+ version = "1.0.47"
310
+ source = "registry+https://github.com/rust-lang/crates.io-index"
311
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
312
+ dependencies = [
313
+ "proc-macro2",
314
+ ]
315
+
316
+ [[package]]
317
+ name = "rawpointer"
318
+ version = "0.2.1"
319
+ source = "registry+https://github.com/rust-lang/crates.io-index"
320
+ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
321
+
322
+ [[package]]
323
+ name = "rustc-hash"
324
+ version = "2.1.3"
325
+ source = "registry+https://github.com/rust-lang/crates.io-index"
326
+ checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
327
+
328
+ [[package]]
329
+ name = "rustfft"
330
+ version = "6.4.1"
331
+ source = "registry+https://github.com/rust-lang/crates.io-index"
332
+ checksum = "21db5f9893e91f41798c88680037dba611ca6674703c1a18601b01a72c8adb89"
333
+ dependencies = [
334
+ "num-complex",
335
+ "num-integer",
336
+ "num-traits",
337
+ "primal-check",
338
+ "strength_reduce",
339
+ "transpose",
340
+ ]
341
+
342
+ [[package]]
343
+ name = "rustversion"
344
+ version = "1.0.23"
345
+ source = "registry+https://github.com/rust-lang/crates.io-index"
346
+ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
347
+
348
+ [[package]]
349
+ name = "serde"
350
+ version = "1.0.229"
351
+ source = "registry+https://github.com/rust-lang/crates.io-index"
352
+ checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
353
+ dependencies = [
354
+ "serde_core",
355
+ "serde_derive",
356
+ ]
357
+
358
+ [[package]]
359
+ name = "serde_core"
360
+ version = "1.0.229"
361
+ source = "registry+https://github.com/rust-lang/crates.io-index"
362
+ checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
363
+ dependencies = [
364
+ "serde_derive",
365
+ ]
366
+
367
+ [[package]]
368
+ name = "serde_derive"
369
+ version = "1.0.229"
370
+ source = "registry+https://github.com/rust-lang/crates.io-index"
371
+ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
372
+ dependencies = [
373
+ "proc-macro2",
374
+ "quote",
375
+ "syn",
376
+ ]
377
+
378
+ [[package]]
379
+ name = "serde_json"
380
+ version = "1.0.154"
381
+ source = "registry+https://github.com/rust-lang/crates.io-index"
382
+ checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6"
383
+ dependencies = [
384
+ "itoa",
385
+ "memchr",
386
+ "serde",
387
+ "serde_core",
388
+ "zmij",
389
+ ]
390
+
391
+ [[package]]
392
+ name = "slab"
393
+ version = "0.4.12"
394
+ source = "registry+https://github.com/rust-lang/crates.io-index"
395
+ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
396
+
397
+ [[package]]
398
+ name = "strength_reduce"
399
+ version = "0.2.4"
400
+ source = "registry+https://github.com/rust-lang/crates.io-index"
401
+ checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82"
402
+
403
+ [[package]]
404
+ name = "syn"
405
+ version = "3.0.10"
406
+ source = "registry+https://github.com/rust-lang/crates.io-index"
407
+ checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79"
408
+ dependencies = [
409
+ "proc-macro2",
410
+ "quote",
411
+ "unicode-ident",
412
+ ]
413
+
414
+ [[package]]
415
+ name = "target-lexicon"
416
+ version = "0.13.5"
417
+ source = "registry+https://github.com/rust-lang/crates.io-index"
418
+ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
419
+
420
+ [[package]]
421
+ name = "transpose"
422
+ version = "0.2.3"
423
+ source = "registry+https://github.com/rust-lang/crates.io-index"
424
+ checksum = "1ad61aed86bc3faea4300c7aee358b4c6d0c8d6ccc36524c96e4c92ccf26e77e"
425
+ dependencies = [
426
+ "num-integer",
427
+ "strength_reduce",
428
+ ]
429
+
430
+ [[package]]
431
+ name = "unicode-ident"
432
+ version = "1.0.27"
433
+ source = "registry+https://github.com/rust-lang/crates.io-index"
434
+ checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
435
+
436
+ [[package]]
437
+ name = "wasm-bindgen"
438
+ version = "0.2.130"
439
+ source = "registry+https://github.com/rust-lang/crates.io-index"
440
+ checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c"
441
+ dependencies = [
442
+ "cfg-if",
443
+ "rustversion",
444
+ "wasm-bindgen-macro",
445
+ "wasm-bindgen-shared",
446
+ ]
447
+
448
+ [[package]]
449
+ name = "wasm-bindgen-macro"
450
+ version = "0.2.130"
451
+ source = "registry+https://github.com/rust-lang/crates.io-index"
452
+ checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9"
453
+ dependencies = [
454
+ "quote",
455
+ "wasm-bindgen-macro-support",
456
+ ]
457
+
458
+ [[package]]
459
+ name = "wasm-bindgen-macro-support"
460
+ version = "0.2.130"
461
+ source = "registry+https://github.com/rust-lang/crates.io-index"
462
+ checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a"
463
+ dependencies = [
464
+ "bumpalo",
465
+ "proc-macro2",
466
+ "quote",
467
+ "syn",
468
+ "wasm-bindgen-shared",
469
+ ]
470
+
471
+ [[package]]
472
+ name = "wasm-bindgen-shared"
473
+ version = "0.2.130"
474
+ source = "registry+https://github.com/rust-lang/crates.io-index"
475
+ checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e"
476
+ dependencies = [
477
+ "unicode-ident",
478
+ ]
479
+
480
+ [[package]]
481
+ name = "zmij"
482
+ version = "1.0.23"
483
+ source = "registry+https://github.com/rust-lang/crates.io-index"
484
+ checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
@@ -0,0 +1,28 @@
1
+ [workspace]
2
+ resolver = "2"
3
+ members = ["crates/lightstone-py"]
4
+
5
+ [workspace.package]
6
+ version = "0.1.0"
7
+ edition = "2021"
8
+ license = "MIT OR Apache-2.0"
9
+ repository = "https://github.com/lightstone-photonics/lightstone"
10
+
11
+ [workspace.dependencies]
12
+ lightstone-core = { path = "crates/lightstone-core" }
13
+ lightstone-analysis = { path = "crates/lightstone-analysis" }
14
+ rustfft = "=6.4.1"
15
+ num-complex = "=0.4.6"
16
+ serde = { version = "=1.0.229", features = ["derive"] }
17
+ serde_json = "=1.0.154"
18
+
19
+ [profile.release]
20
+ opt-level = 3
21
+ lto = "thin"
22
+
23
+ # Tests run heavy numerics (mode solver, long noise records); optimize them.
24
+ [profile.test]
25
+ opt-level = 3
26
+
27
+ [profile.dev.package."*"]
28
+ opt-level = 3
@@ -0,0 +1,44 @@
1
+ Metadata-Version: 2.3
2
+ Name: lightstone
3
+ Version: 0.1.0
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: 3
6
+ Classifier: Topic :: Scientific/Engineering :: Physics
7
+ Requires-Dist: numpy >=1.24
8
+ License-File: LICENSE-APACHE
9
+ License-File: LICENSE-MIT
10
+ Summary: Optical Link Simulator: 850 nm VCSEL / OM4 multimode PAM-4 links
11
+ License: MIT OR Apache-2.0
12
+ Requires-Python: >=3.10
13
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
14
+ Project-URL: Repository, https://github.com/lightstone-photonics/lightstone
15
+ Project-URL: Homepage, https://lightstone-photonics.github.io/lightstone/
16
+ Project-URL: Documentation, https://github.com/lightstone-photonics/lightstone/tree/main/docs
17
+
18
+ # Lightstone – Optical Link Simulator (Python)
19
+
20
+ Open-source simulator for short-reach optical links: VCSEL, multimode fiber (OM3/OM4/OM5 or custom), WDM, PIN/TIA receiver with FFE, and PAM-4/NRZ analysis including SER, eye diagrams and TDECQ. The physics core is written in Rust; this package is its Python API.
21
+
22
+ ![The Lightstone graph editor with the reference link and an eye diagram](https://raw.githubusercontent.com/lightstone-photonics/lightstone/main/docs/img/screenshot-editor.png)
23
+
24
+ - **Browser demo** (no install): <https://lightstone-photonics.github.io/lightstone/>
25
+ - **Source, documentation and validation:** <https://github.com/lightstone-photonics/lightstone>
26
+
27
+ ```bash
28
+ pip install lightstone
29
+ ```
30
+
31
+ ```python
32
+ import lightstone
33
+
34
+ g = lightstone.Graph.reference() # PAM-4 53 GBd, 100 m OM4, 5-tap FFE
35
+ g.add("ana", "pam4_analyzer").wire("ffe", "ana").wire("src", "ana.ref")
36
+ g.add("tq", "tdecq").wire("el1", "tq").wire("src", "tq.ref")
37
+ g.run()
38
+ print(g.report("ana")["ser"], g.report("tq")["tdecq_db"]) # ≈ 1.9e-07 (pre-FEC), 3.26 dB
39
+ ```
40
+
41
+ Graphs saved in the browser editor load with `lightstone.Graph.from_json(...)`, and your own components can be written in Python (as H(f), impulse response, FIR taps or a nonlinear function on waveforms). Validation against analytic results and public IEEE 802.3 material: [docs/validation.md](https://github.com/lightstone-photonics/lightstone/blob/main/docs/validation.md).
42
+
43
+ Licensed under MIT OR Apache-2.0.
44
+
@@ -0,0 +1,26 @@
1
+ # Lightstone – Optical Link Simulator (Python)
2
+
3
+ Open-source simulator for short-reach optical links: VCSEL, multimode fiber (OM3/OM4/OM5 or custom), WDM, PIN/TIA receiver with FFE, and PAM-4/NRZ analysis including SER, eye diagrams and TDECQ. The physics core is written in Rust; this package is its Python API.
4
+
5
+ ![The Lightstone graph editor with the reference link and an eye diagram](https://raw.githubusercontent.com/lightstone-photonics/lightstone/main/docs/img/screenshot-editor.png)
6
+
7
+ - **Browser demo** (no install): <https://lightstone-photonics.github.io/lightstone/>
8
+ - **Source, documentation and validation:** <https://github.com/lightstone-photonics/lightstone>
9
+
10
+ ```bash
11
+ pip install lightstone
12
+ ```
13
+
14
+ ```python
15
+ import lightstone
16
+
17
+ g = lightstone.Graph.reference() # PAM-4 53 GBd, 100 m OM4, 5-tap FFE
18
+ g.add("ana", "pam4_analyzer").wire("ffe", "ana").wire("src", "ana.ref")
19
+ g.add("tq", "tdecq").wire("el1", "tq").wire("src", "tq.ref")
20
+ g.run()
21
+ print(g.report("ana")["ser"], g.report("tq")["tdecq_db"]) # ≈ 1.9e-07 (pre-FEC), 3.26 dB
22
+ ```
23
+
24
+ Graphs saved in the browser editor load with `lightstone.Graph.from_json(...)`, and your own components can be written in Python (as H(f), impulse response, FIR taps or a nonlinear function on waveforms). Validation against analytic results and public IEEE 802.3 material: [docs/validation.md](https://github.com/lightstone-photonics/lightstone/blob/main/docs/validation.md).
25
+
26
+ Licensed under MIT OR Apache-2.0.
@@ -0,0 +1,15 @@
1
+ [package]
2
+ name = "lightstone-analysis"
3
+ description = "Lightstone analysis layer: eye diagrams, PAM-4 metrics, TDECQ"
4
+ version.workspace = true
5
+ edition.workspace = true
6
+ license.workspace = true
7
+
8
+ [dependencies]
9
+ lightstone-core.workspace = true
10
+ rustfft.workspace = true
11
+ num-complex.workspace = true
12
+ serde.workspace = true
13
+ serde_json.workspace = true
14
+ libm = "=0.2.16"
15
+
@@ -0,0 +1,36 @@
1
+ use lightstone_analysis::*;
2
+ use lightstone_core::*;
3
+ use std::time::Instant;
4
+ fn main() {
5
+ let mut sim = Simulator::new(LinkConfig::default());
6
+ for len in [0.0, 50.0, 100.0, 150.0, 200.0, 300.0] {
7
+ let mut c = sim.config().clone();
8
+ c.fiber.length = len;
9
+ sim.set_config(c);
10
+ let t0 = Instant::now();
11
+ let r = sim.run();
12
+ let t1 = Instant::now();
13
+ let a = analyze(
14
+ &r.rx.signal,
15
+ Some((&r.rx.noiseless, &r.rx.sigma)),
16
+ &r.symbols,
17
+ r.sps,
18
+ &AnalysisOptions::default(),
19
+ );
20
+ let t2 = Instant::now();
21
+ let td = tdecq(
22
+ &r.rx.reference_optical,
23
+ &r.symbols,
24
+ r.sps,
25
+ r.baud,
26
+ &TdecqOptions::default(),
27
+ );
28
+ let t3 = Instant::now();
29
+ let e = eye_density(&r.rx.signal, r.sps, a.delay, a.phase, 600, 400, None);
30
+ let t4 = Instant::now();
31
+ println!("L={len:5}m BW {:6.1} GHz TDECQ {:?} dB Ceq {:.2} dB SER {:.2e} counted {:.2e} EH {:?} mV EW {:?} UI rx {:.2} dBm | sim {:?} ana {:?} tdecq {:?} eye {:?} max {}",
32
+ r.metrics.channel_bandwidth.unwrap_or(f64::INFINITY)/1e9, td.tdecq_db.map(|x| (x*100.0).round()/100.0), td.ceq_db, a.ser.unwrap(), a.ser_counted,
33
+ a.eye_height.iter().map(|x| (x*1e4).round()/10.0).collect::<Vec<_>>(), a.eye_width.iter().map(|x| (x*100.0).round()/100.0).collect::<Vec<_>>(), r.metrics.rx_avg_power_dbm,
34
+ t1-t0, t2-t1, t3-t2, t4-t3, e.max_count);
35
+ }
36
+ }