lcsim 0.1.4__py3-none-any.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.
Files changed (149) hide show
  1. lcsim/Roboto-Bold.ttf +0 -0
  2. lcsim/__init__.py +77 -0
  3. lcsim/bin/__init__.py +1 -0
  4. lcsim/bin/_deprecation.py +18 -0
  5. lcsim/bin/bench.py +1524 -0
  6. lcsim/bin/consym_certify.py +101 -0
  7. lcsim/bin/consym_frozen_q_energy_sweep.py +270 -0
  8. lcsim/bin/energy.py +85 -0
  9. lcsim/bin/extract.py +74 -0
  10. lcsim/bin/gui.py +16 -0
  11. lcsim/bin/optics.py +458 -0
  12. lcsim/bin/render.py +463 -0
  13. lcsim/bin/run.py +17 -0
  14. lcsim/bin/sad.py +137 -0
  15. lcsim/bin/tests.py +169 -0
  16. lcsim/cli.py +109 -0
  17. lcsim/compserver.py +38 -0
  18. lcsim/consym_energy_validation.py +121 -0
  19. lcsim/gui/__init__.py +48 -0
  20. lcsim/gui/beam.py +690 -0
  21. lcsim/gui/catalogs.py +45 -0
  22. lcsim/gui/cli.py +260 -0
  23. lcsim/gui/concentration.py +382 -0
  24. lcsim/gui/config.py +300 -0
  25. lcsim/gui/controller.py +966 -0
  26. lcsim/gui/controls.py +442 -0
  27. lcsim/gui/optics.py +46 -0
  28. lcsim/gui/properties.py +64 -0
  29. lcsim/gui/qt_runtime.py +953 -0
  30. lcsim/gui/render_controls.py +31 -0
  31. lcsim/gui/runtime.py +810 -0
  32. lcsim/gui/scenes.py +95 -0
  33. lcsim/gui/settings_ui.py +185 -0
  34. lcsim/gui/source.py +189 -0
  35. lcsim/gui/specs.py +264 -0
  36. lcsim/gui/window.py +1727 -0
  37. lcsim/history_reader.py +326 -0
  38. lcsim/install_guidance.py +181 -0
  39. lcsim/integrator.py +1442 -0
  40. lcsim/integrator_ui.py +462 -0
  41. lcsim/io/__init__.py +5 -0
  42. lcsim/io/static_fields.py +66 -0
  43. lcsim/lazy_module.py +34 -0
  44. lcsim/legacy/__init__.py +3 -0
  45. lcsim/legacy/history.py +64 -0
  46. lcsim/legacy/npz.py +245 -0
  47. lcsim/numba_warnings.py +51 -0
  48. lcsim/optics.py +439 -0
  49. lcsim/preview/__init__.py +33 -0
  50. lcsim/preview/sources.py +338 -0
  51. lcsim/problem/__init__.py +157 -0
  52. lcsim/problem/blocks.py +399 -0
  53. lcsim/problem/builtins.py +1153 -0
  54. lcsim/problem/codecs.py +1357 -0
  55. lcsim/problem/core.py +199 -0
  56. lcsim/problem/edit_metadata.py +100 -0
  57. lcsim/problem/edit_surface.py +682 -0
  58. lcsim/problem/fields.py +42 -0
  59. lcsim/problem/geometry.py +150 -0
  60. lcsim/problem/legacy_bridge.py +90 -0
  61. lcsim/problem/legacy_runtime.py +84 -0
  62. lcsim/problem/models.py +360 -0
  63. lcsim/problem/runtime_bridge.py +474 -0
  64. lcsim/problem/services.py +212 -0
  65. lcsim/problem/stores.py +268 -0
  66. lcsim/pyramid.py +6281 -0
  67. lcsim/pyramid_bench.py +1089 -0
  68. lcsim/pyramid_diagnostics.py +175 -0
  69. lcsim/pyramid_preview.py +176 -0
  70. lcsim/pyramid_timing.py +68 -0
  71. lcsim/render/__init__.py +3 -0
  72. lcsim/render/cli.py +376 -0
  73. lcsim/render/engine.py +1335 -0
  74. lcsim/render/inputs.py +256 -0
  75. lcsim/render.py +445 -0
  76. lcsim/render_annotation.py +171 -0
  77. lcsim/render_config.py +171 -0
  78. lcsim/renderserver.py +267 -0
  79. lcsim/runners/__init__.py +1 -0
  80. lcsim/runners/lcsrun/__init__.py +1 -0
  81. lcsim/runners/lcsrun/cli.py +1186 -0
  82. lcsim/runners/lcsrun/display.py +97 -0
  83. lcsim/runners/lcsrun/main.py +818 -0
  84. lcsim/runners/lcsrun/notify.py +36 -0
  85. lcsim/runners/lcsrun/profile.py +294 -0
  86. lcsim/runtime/__init__.py +44 -0
  87. lcsim/runtime/diagnostics.py +17 -0
  88. lcsim/runtime/export_cache.py +51 -0
  89. lcsim/runtime/history.py +197 -0
  90. lcsim/runtime/integrator_diagnostics.py +89 -0
  91. lcsim/runtime/io.py +292 -0
  92. lcsim/runtime/metrics.py +186 -0
  93. lcsim/runtime/session.py +646 -0
  94. lcsim/runtime/snapshot_update.py +61 -0
  95. lcsim/runtime/stationary.py +80 -0
  96. lcsim/serialization/__init__.py +6 -0
  97. lcsim/serialization/introspection.py +69 -0
  98. lcsim/serialization/json.py +28 -0
  99. lcsim/shaders/birefrigence.fs.glsl +28 -0
  100. lcsim/shaders/birefrigence.vs.glsl +507 -0
  101. lcsim/shaders/filter.fs.glsl +33 -0
  102. lcsim/shaders/filter.vs.glsl +10 -0
  103. lcsim/shaders/jones.fs.glsl +9 -0
  104. lcsim/shaders/jones.vs.glsl +72 -0
  105. lcsim/shaders/lagger_gaussian.fs.glsl +26 -0
  106. lcsim/shaders/lagger_gaussian.vs.glsl +11 -0
  107. lcsim/shaders/laser_position.fs.glsl +25 -0
  108. lcsim/shared.py +741 -0
  109. lcsim/simulators/__init__.py +28 -0
  110. lcsim/simulators/base.py +535 -0
  111. lcsim/simulators/bc.py +217 -0
  112. lcsim/simulators/conservative.py +2297 -0
  113. lcsim/simulators/consym.py +360 -0
  114. lcsim/simulators/consym_cell_tables.py +70 -0
  115. lcsim/simulators/consym_certification.py +1008 -0
  116. lcsim/simulators/consym_continuum_energy.py +109 -0
  117. lcsim/simulators/consym_kernels.py +12 -0
  118. lcsim/simulators/consym_projected_energy.py +310 -0
  119. lcsim/simulators/consym_pyramid.py +4979 -0
  120. lcsim/simulators/consym_pyramid_kernels.py +8 -0
  121. lcsim/simulators/consym_runtime_kernels.py +733 -0
  122. lcsim/simulators/consym_shared_kernels.py +640 -0
  123. lcsim/simulators/core.py +13 -0
  124. lcsim/simulators/core_common.py +948 -0
  125. lcsim/simulators/core_legacy.py +115 -0
  126. lcsim/simulators/core_preview.py +104 -0
  127. lcsim/simulators/core_runtime.py +410 -0
  128. lcsim/simulators/cuda_lazy.py +50 -0
  129. lcsim/simulators/factory.py +161 -0
  130. lcsim/simulators/legacy_director.py +330 -0
  131. lcsim/simulators/legacy_vector.py +319 -0
  132. lcsim/simulators/photophysics.py +290 -0
  133. lcsim/simulators/photophysics_kernels.py +39 -0
  134. lcsim/simulators/qcon.py +454 -0
  135. lcsim/simulators/qcon_runtime_kernels.py +1055 -0
  136. lcsim/simulators/qiso.py +455 -0
  137. lcsim/simulators/qiso_runtime_kernels.py +1367 -0
  138. lcsim/step_controller.py +1284 -0
  139. lcsim/stylesheet.css +4 -0
  140. lcsim/substrate_geometry.py +502 -0
  141. lcsim/utils.py +80 -0
  142. lcsim/view/__init__.py +5 -0
  143. lcsim/view/cli.py +65 -0
  144. lcsim/view/document.py +415 -0
  145. lcsim-0.1.4.dist-info/METADATA +218 -0
  146. lcsim-0.1.4.dist-info/RECORD +149 -0
  147. lcsim-0.1.4.dist-info/WHEEL +4 -0
  148. lcsim-0.1.4.dist-info/entry_points.txt +11 -0
  149. lcsim-0.1.4.dist-info/licenses/LICENSE.md +9 -0
lcsim/Roboto-Bold.ttf ADDED
Binary file
lcsim/__init__.py ADDED
@@ -0,0 +1,77 @@
1
+ """Public package exports for LCSim."""
2
+
3
+ from typing import Any
4
+ import importlib
5
+
6
+
7
+ _LAZY_IMPORTS = {
8
+ "BC": "lcsim.shared",
9
+ "CONSERVATIVE_FAMILY_MODELS": "lcsim.shared",
10
+ "CONSYM_MODEL": "lcsim.shared",
11
+ "CONSYM_SUBSTRATE_MODEL": "lcsim.shared",
12
+ "DEFAULT_INTEGRATOR": "lcsim.shared",
13
+ "DEFAULT_MODEL": "lcsim.shared",
14
+ "MODEL_DESCRIPTOR_BY_ID": "lcsim.shared",
15
+ "MODEL_DESCRIPTORS": "lcsim.shared",
16
+ "MODEL_NAMES": "lcsim.shared",
17
+ "ModelDescriptor": "lcsim.shared",
18
+ "QCON_CAYLEY_FIXED_INTEGRATOR": "lcsim.shared",
19
+ "QCON_MODEL": "lcsim.shared",
20
+ "QISO_MODEL": "lcsim.shared",
21
+ "CayleyFixed": "lcsim.integrator",
22
+ "compile_substrate_geometry": "lcsim.substrate_geometry",
23
+ "Fehlberg": "lcsim.integrator",
24
+ "ParameterDelta": "lcsim.history_reader",
25
+ "MidpointEuler": "lcsim.integrator",
26
+ "Progress": "lcsim.utils",
27
+ "Settings": "lcsim.shared",
28
+ "Simulation": "lcsim.integrator",
29
+ "SimulationMetadata": "lcsim.shared",
30
+ "Simulator": "lcsim.simulators",
31
+ "State": "lcsim.simulators",
32
+ "StateException": "lcsim.shared",
33
+ "StaticFieldPayload": "lcsim.shared",
34
+ "SnapshotSADFrame": "lcsim.problem",
35
+ "SnapshotSADReader": "lcsim.problem",
36
+ "SnapshotSADWriter": "lcsim.problem",
37
+ "SubstrateColumnGeometry": "lcsim.substrate_geometry",
38
+ "annotate_image": ("lcsim.render_annotation", "annotate_image"),
39
+ "create_simulator": ("lcsim.simulators", "create_simulator"),
40
+ "get_coordinates": "lcsim.shared",
41
+ "get_model_descriptor": "lcsim.shared",
42
+ "is_conservative_family": "lcsim.shared",
43
+ "iter_model_descriptors": "lcsim.shared",
44
+ "load_from_npz": ("lcsim.legacy.npz", "load_from_npz"),
45
+ "load_runtime_state_from_npz": ("lcsim.legacy.npz", "load_runtime_state_from_npz"),
46
+ "load_snapshot_from_npz": ("lcsim.runtime.io", "load_snapshot_from_npz"),
47
+ "load_snapshot_sad": "lcsim.problem",
48
+ "load_substrate_geometry_json": "lcsim.substrate_geometry",
49
+ "mix_settings": "lcsim.shared",
50
+ "npfloat": "lcsim.shared",
51
+ "render_cp": ("lcsim.optics", "render_cp"),
52
+ "save_to_npz": ("lcsim.legacy.npz", "save_to_npz"),
53
+ "save_runtime_state_to_npz": ("lcsim.legacy.npz", "save_runtime_state_to_npz"),
54
+ "save_runtime_snapshot_to_npz": ("lcsim.runtime.io", "save_runtime_snapshot_to_npz"),
55
+ "save_snapshot_to_npz": ("lcsim.runtime.io", "save_snapshot_to_npz"),
56
+ "save_snapshot_sad": "lcsim.problem",
57
+ "scale_state": ("lcsim.runtime.io", "scale_state"),
58
+ }
59
+
60
+
61
+ def __getattr__(name: Any) -> Any:
62
+ """Internal helper for getattr."""
63
+ try:
64
+ target = _LAZY_IMPORTS[name]
65
+ except KeyError as exc:
66
+ raise AttributeError(name) from exc
67
+ if isinstance(target, str):
68
+ module_name, attr_name = target, name
69
+ else:
70
+ module_name, attr_name = target
71
+ module = importlib.import_module(module_name)
72
+ value = getattr(module, attr_name)
73
+ globals()[name] = value
74
+ return value
75
+
76
+
77
+ __all__ = list(_LAZY_IMPORTS)
lcsim/bin/__init__.py ADDED
@@ -0,0 +1 @@
1
+ """Package initialization for lcsim.bin."""
@@ -0,0 +1,18 @@
1
+ """Shared notices for legacy console scripts."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+
7
+
8
+ def warn_legacy_entrypoint(command: str, replacement: str | None = None) -> None:
9
+ """Print a visible compatibility notice for legacy direct scripts."""
10
+ message = f"{command} is deprecated as a direct script."
11
+ if replacement:
12
+ message = f"{message} Use `{replacement}` instead."
13
+ else:
14
+ message = f"{message} Prefer `lcsim <mode>` where available."
15
+ print(f"DeprecationWarning: {message}", file=sys.stderr)
16
+
17
+
18
+ __all__ = ["warn_legacy_entrypoint"]