AOT-biomaps 2.1.3__py3-none-any.whl → 2.9.233__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.

Potentially problematic release.


This version of AOT-biomaps might be problematic. Click here for more details.

Files changed (50) hide show
  1. AOT_biomaps/AOT_Acoustic/AcousticEnums.py +64 -0
  2. AOT_biomaps/AOT_Acoustic/AcousticTools.py +221 -0
  3. AOT_biomaps/AOT_Acoustic/FocusedWave.py +244 -0
  4. AOT_biomaps/AOT_Acoustic/IrregularWave.py +66 -0
  5. AOT_biomaps/AOT_Acoustic/PlaneWave.py +43 -0
  6. AOT_biomaps/AOT_Acoustic/StructuredWave.py +392 -0
  7. AOT_biomaps/AOT_Acoustic/__init__.py +15 -0
  8. AOT_biomaps/AOT_Acoustic/_mainAcoustic.py +978 -0
  9. AOT_biomaps/AOT_Experiment/Focus.py +55 -0
  10. AOT_biomaps/AOT_Experiment/Tomography.py +505 -0
  11. AOT_biomaps/AOT_Experiment/__init__.py +9 -0
  12. AOT_biomaps/AOT_Experiment/_mainExperiment.py +532 -0
  13. AOT_biomaps/AOT_Optic/Absorber.py +24 -0
  14. AOT_biomaps/AOT_Optic/Laser.py +70 -0
  15. AOT_biomaps/AOT_Optic/OpticEnums.py +17 -0
  16. AOT_biomaps/AOT_Optic/__init__.py +10 -0
  17. AOT_biomaps/AOT_Optic/_mainOptic.py +204 -0
  18. AOT_biomaps/AOT_Recon/AOT_Optimizers/DEPIERRO.py +191 -0
  19. AOT_biomaps/AOT_Recon/AOT_Optimizers/LS.py +106 -0
  20. AOT_biomaps/AOT_Recon/AOT_Optimizers/MAPEM.py +456 -0
  21. AOT_biomaps/AOT_Recon/AOT_Optimizers/MLEM.py +333 -0
  22. AOT_biomaps/AOT_Recon/AOT_Optimizers/PDHG.py +221 -0
  23. AOT_biomaps/AOT_Recon/AOT_Optimizers/__init__.py +5 -0
  24. AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/Huber.py +90 -0
  25. AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/Quadratic.py +86 -0
  26. AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/RelativeDifferences.py +59 -0
  27. AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/__init__.py +3 -0
  28. AOT_biomaps/AOT_Recon/AlgebraicRecon.py +1023 -0
  29. AOT_biomaps/AOT_Recon/AnalyticRecon.py +154 -0
  30. AOT_biomaps/AOT_Recon/BayesianRecon.py +230 -0
  31. AOT_biomaps/AOT_Recon/DeepLearningRecon.py +35 -0
  32. AOT_biomaps/AOT_Recon/PrimalDualRecon.py +210 -0
  33. AOT_biomaps/AOT_Recon/ReconEnums.py +375 -0
  34. AOT_biomaps/AOT_Recon/ReconTools.py +273 -0
  35. AOT_biomaps/AOT_Recon/__init__.py +11 -0
  36. AOT_biomaps/AOT_Recon/_mainRecon.py +288 -0
  37. AOT_biomaps/Config.py +95 -0
  38. AOT_biomaps/Settings.py +45 -13
  39. AOT_biomaps/__init__.py +271 -18
  40. aot_biomaps-2.9.233.dist-info/METADATA +22 -0
  41. aot_biomaps-2.9.233.dist-info/RECORD +43 -0
  42. {AOT_biomaps-2.1.3.dist-info → aot_biomaps-2.9.233.dist-info}/WHEEL +1 -1
  43. AOT_biomaps/AOT_Acoustic.py +0 -1881
  44. AOT_biomaps/AOT_Experiment.py +0 -541
  45. AOT_biomaps/AOT_Optic.py +0 -219
  46. AOT_biomaps/AOT_Reconstruction.py +0 -1416
  47. AOT_biomaps/config.py +0 -54
  48. AOT_biomaps-2.1.3.dist-info/METADATA +0 -20
  49. AOT_biomaps-2.1.3.dist-info/RECORD +0 -11
  50. {AOT_biomaps-2.1.3.dist-info → aot_biomaps-2.9.233.dist-info}/top_level.txt +0 -0
AOT_biomaps/__init__.py CHANGED
@@ -1,19 +1,272 @@
1
- from .AOT_Acoustic import *
2
- from .AOT_Optic import *
3
- from .AOT_Reconstruction import *
4
- from .AOT_Experiment import *
5
- from .config import config
6
-
7
- __version__ = '2.1.3'
8
-
9
- if config.get_process() == 'gpu':
10
- __process__ = 'gpu'
11
- else:
12
- __process__ = 'cpu'
13
-
14
- def initialize(process='cpu'):
15
- config.set_process(process)
16
- if process == 'gpu':
17
- config.select_best_gpu()
18
- print(f"Initialized with process: {config.get_process()}")
1
+ import os
2
+ import warnings
3
+ import torch
4
+ import ctypes
5
+ import platform
6
+
7
+ # --- Configuration de l'environnement pour libsz.so.2 ---
8
+ def _configure_libsz_environment():
9
+ """Configure l'environnement pour trouver libsz.so.2."""
10
+ conda_prefix = os.environ.get('CONDA_PREFIX', '')
11
+ if not conda_prefix:
12
+ raise RuntimeError("CONDA_PREFIX not set. Activate your Conda environment first.")
13
+
14
+ if platform.system() == 'Windows':
15
+ libsz_name = 'libsz.dll'
16
+ env_var = 'PATH'
17
+ lib_path = os.path.join(conda_prefix, 'Library', 'bin')
18
+ else: # Linux/Mac
19
+ libsz_name = 'libsz.so.2'
20
+ env_var = 'LD_LIBRARY_PATH'
21
+ lib_path = os.path.join(conda_prefix, 'lib')
22
+
23
+ libsz_path = os.path.join(lib_path, libsz_name)
24
+ if not os.path.exists(libsz_path):
25
+ raise RuntimeError(
26
+ f"{libsz_name} not found at {libsz_path}. "
27
+ f"Install it with: conda install -c conda-forge libaec"
28
+ )
29
+
30
+ # Charge la bibliothèque pour le processus courant
31
+ try:
32
+ ctypes.CDLL(libsz_path, mode=ctypes.RTLD_GLOBAL)
33
+ except OSError as e:
34
+ raise RuntimeError(f"Failed to load {libsz_name}: {e}")
35
+
36
+ # Met à jour LD_LIBRARY_PATH pour le processus courant ET tous les sous-processus
37
+ if env_var in os.environ:
38
+ os.environ[env_var] = f"{lib_path}{os.pathsep}{os.environ[env_var]}"
39
+ else:
40
+ os.environ[env_var] = lib_path
41
+
42
+
43
+ _configure_libsz_environment()
44
+
45
+ # --- Imports normaux ---
46
+ # ACOUSTIC
47
+ from .AOT_Acoustic._mainAcoustic import *
48
+ from .AOT_Acoustic.AcousticEnums import *
49
+ from .AOT_Acoustic.AcousticTools import *
50
+ from .AOT_Acoustic.FocusedWave import *
51
+ from .AOT_Acoustic.IrregularWave import *
52
+ from .AOT_Acoustic.PlaneWave import *
53
+ from .AOT_Acoustic.StructuredWave import *
54
+ # EXPERIMENT
55
+ from .AOT_Experiment._mainExperiment import *
56
+ from .AOT_Experiment.Focus import *
57
+ from .AOT_Experiment.Tomography import *
58
+ # OPTIC
59
+ from .AOT_Optic._mainOptic import *
60
+ from .AOT_Optic.Absorber import *
61
+ from .AOT_Optic.Laser import *
62
+ from .AOT_Optic.OpticEnums import *
63
+ # RECONSTRUCTION
64
+ from .AOT_Recon._mainRecon import *
65
+ from .AOT_Recon.AlgebraicRecon import *
66
+ from .AOT_Recon.AnalyticRecon import *
67
+ from .AOT_Recon.BayesianRecon import *
68
+ from .AOT_Recon.DeepLearningRecon import *
69
+ from .AOT_Recon.PrimalDualRecon import *
70
+ from .AOT_Recon.ReconEnums import *
71
+ from .AOT_Recon.ReconTools import *
72
+ # OPTIMIZERS
73
+ from .AOT_Recon.AOT_Optimizers.DEPIERRO import *
74
+ from .AOT_Recon.AOT_Optimizers.MAPEM import *
75
+ from .AOT_Recon.AOT_Optimizers.MLEM import *
76
+ from .AOT_Recon.AOT_Optimizers.PDHG import *
77
+ # POTENTIAL FUNCTIONS
78
+ from .AOT_Recon.AOT_PotentialFunctions.Huber import *
79
+ from .AOT_Recon.AOT_PotentialFunctions.Quadratic import *
80
+ from .AOT_Recon.AOT_PotentialFunctions.RelativeDifferences import *
81
+ # CONFIG AND SETTINGS
82
+ from .Config import config
83
+ from .Settings import *
84
+
85
+ __version__ = '2.9.233'
86
+ __process__ = config.get_process()
87
+
88
+ def initialize(process=None):
89
+ """
90
+ Initialise ou modifie le backend de calcul (GPU/CPU).
91
+ Args:
92
+ process (str, optional): 'gpu' pour forcer le GPU, 'cpu' pour forcer le CPU.
93
+ Raises:
94
+ ValueError: Si `process` n'est pas 'cpu' ou 'gpu'.
95
+ """
96
+ global __process__
97
+ if process is not None:
98
+ if process not in ['cpu', 'gpu']:
99
+ raise ValueError("process must be 'cpu' or 'gpu'")
100
+ config.set_process(process)
101
+ __process__ = process
102
+
103
+ if __process__ == 'gpu':
104
+ try:
105
+ if not torch.cuda.is_available():
106
+ warnings.warn("GPU requested but PyTorch cannot access it. Falling back to CPU.", UserWarning)
107
+ config.set_process('cpu')
108
+ __process__ = 'cpu'
109
+ except Exception as e:
110
+ warnings.warn(f"PyTorch GPU check failed: {e}. Falling back to CPU.", UserWarning)
111
+ config.set_process('cpu')
112
+ __process__ = 'cpu'
113
+
114
+ return __process__
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
19
272
 
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.4
2
+ Name: AOT_biomaps
3
+ Version: 2.9.233
4
+ Summary: Acousto-Optic Tomography
5
+ Home-page: https://github.com/LucasDuclos/AcoustoOpticTomography
6
+ Author: Lucas Duclos
7
+ Author-email: lucas.duclos@universite-paris-saclay.fr
8
+ Requires-Dist: ipykernel==6.30.1
9
+ Requires-Dist: k-wave-python==0.3.5
10
+ Requires-Dist: setuptools==75.1.0
11
+ Requires-Dist: pyyaml==6.0.2
12
+ Requires-Dist: numba==0.61.2
13
+ Requires-Dist: tqdm==4.67.1
14
+ Requires-Dist: nvidia-ml-py3==7.352.0
15
+ Requires-Dist: numpy==1.26.4
16
+ Requires-Dist: torch==2.7.0
17
+ Requires-Dist: scipy==1.13.1
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: home-page
21
+ Dynamic: requires-dist
22
+ Dynamic: summary
@@ -0,0 +1,43 @@
1
+ AOT_biomaps/Config.py,sha256=ghEOP1n8aO1pR-su13wMeAZAxZRfry5hH67NbtZ8SqI,3614
2
+ AOT_biomaps/Settings.py,sha256=v8fPhnvvcfBJP29m1RLOTEr3jndGLGwbUiORXmsj2Bo,2853
3
+ AOT_biomaps/__init__.py,sha256=mGXdd1sOEQC0Lvuyn1L1Gw7qSAxPsfWxrDcbUjgFwtg,4336
4
+ AOT_biomaps/AOT_Acoustic/AcousticEnums.py,sha256=s5kXa6jKzbS4btwbubrVcynLOr0yg5tth5vL_FGfbMk,1802
5
+ AOT_biomaps/AOT_Acoustic/AcousticTools.py,sha256=al7xXKMY5e-qQQ7nrQVPVAmqYiB320OluNlY6ti8iKc,7539
6
+ AOT_biomaps/AOT_Acoustic/FocusedWave.py,sha256=3kGKKDx_3Msy5COYqIwzROPORGWvNjw8UsDanBfkMXE,11037
7
+ AOT_biomaps/AOT_Acoustic/IrregularWave.py,sha256=yZhtxkR6zlciRcEpdTR0BAhvgQl40XHKFaF8f4VXarE,3035
8
+ AOT_biomaps/AOT_Acoustic/PlaneWave.py,sha256=xza-rj5AUWDecLkGDxRcULrwZVWeBvGnEP2d51TyR04,1447
9
+ AOT_biomaps/AOT_Acoustic/StructuredWave.py,sha256=jTLVlOhYLWJb5MxZPxhq3OFVlz2McoyMPBmfLvnekDU,18209
10
+ AOT_biomaps/AOT_Acoustic/__init__.py,sha256=t9M2rRqa_L9pk7W2FeELTkHEMuP4DBr4gBRldMqsQbg,491
11
+ AOT_biomaps/AOT_Acoustic/_mainAcoustic.py,sha256=RdmhRF1i0KAlpsP7_wnZ7F4J27br3eUc4XR91Qq7C64,44158
12
+ AOT_biomaps/AOT_Experiment/Focus.py,sha256=B2nBawmv-NG2AWJx9zgQ8GlN6aFB9FwTSqX-M-phKXg,3193
13
+ AOT_biomaps/AOT_Experiment/Tomography.py,sha256=Ri83b4GMrxJO60qWsK9JInS9a7HU2Q8uqpjD3Xkl9OY,24488
14
+ AOT_biomaps/AOT_Experiment/__init__.py,sha256=H9zMLeBLA6uhbaHohAa-2u5mDDxqJi8oE5c6tShdQp8,308
15
+ AOT_biomaps/AOT_Experiment/_mainExperiment.py,sha256=zSfuNrsz7nhiKrGIdK6CAXjlI2T6qYC5-JXHFgPNzhc,24674
16
+ AOT_biomaps/AOT_Optic/Absorber.py,sha256=jEodzRy7gkEH-wbazVasRQiri0dU16BfapmR-qnTSvM,867
17
+ AOT_biomaps/AOT_Optic/Laser.py,sha256=uzQwxswjU0kZWix3CmZLoWmhsBa3VhN27STprNv-xB8,2986
18
+ AOT_biomaps/AOT_Optic/OpticEnums.py,sha256=b349_JyjHqQohmjK4Wke-A_HLGaqb3_BKbyUqFC4jxY,499
19
+ AOT_biomaps/AOT_Optic/__init__.py,sha256=HSUVhfz0NzwHHZZ9KP9Xyfu33IgP_rYJX86J-gEROlo,321
20
+ AOT_biomaps/AOT_Optic/_mainOptic.py,sha256=Wk63CcgWbU-ygMfjNK80islaUbGGJpTXgZY3_C2KQNY,8179
21
+ AOT_biomaps/AOT_Recon/AlgebraicRecon.py,sha256=G3jET_uLMkaMuAKWeMZewU2lXPyPaXCHrehCRQfj2qs,49051
22
+ AOT_biomaps/AOT_Recon/AnalyticRecon.py,sha256=vjeTUnaZrtnLHnx6goseeJsd165KbSugQYwUXJFXapU,7596
23
+ AOT_biomaps/AOT_Recon/BayesianRecon.py,sha256=RnnPa-tTcvirwiNPnCRZnSM4NWeEEltYET-piBbp34g,12671
24
+ AOT_biomaps/AOT_Recon/DeepLearningRecon.py,sha256=RfVcEsi4GeGqJn0_SPxwQPQx6IQjin79WKh2UarMRLI,1383
25
+ AOT_biomaps/AOT_Recon/PrimalDualRecon.py,sha256=-7dqUxKXbHt7yR1I1kGcu1TOXn05ik6QoDDsuM0QvNU,10310
26
+ AOT_biomaps/AOT_Recon/ReconEnums.py,sha256=wKksIx_xGgGOq0DqFpMTjbnjbaneZhTKup2Z-3PhC5o,19077
27
+ AOT_biomaps/AOT_Recon/ReconTools.py,sha256=ApVZgztymdwuhbvoxdozo7oi3xyyZWxVuhKbzekuNBs,10636
28
+ AOT_biomaps/AOT_Recon/__init__.py,sha256=LDbNpsjS8_TJrXMKzkpzSAj5trVuCW57AWQaJBrzd0I,244
29
+ AOT_biomaps/AOT_Recon/_mainRecon.py,sha256=6yMQxj3IzBaicZbQlMtPh37E00GT1088__PGNCNPc4k,13217
30
+ AOT_biomaps/AOT_Recon/AOT_Optimizers/DEPIERRO.py,sha256=qA1n722GLQJH3V8HcLr5q_GxEwBS_NRlIT3E6JZk-Ag,9479
31
+ AOT_biomaps/AOT_Recon/AOT_Optimizers/LS.py,sha256=N7v1xN9I-adIe3c20LN9Drc4-fBSLc9SEmJS8B3Zmag,4343
32
+ AOT_biomaps/AOT_Recon/AOT_Optimizers/MAPEM.py,sha256=vQLCB0L4FSXJKn2_6kdIdWrI6WZ82KuqUh7CSqBGVuo,25766
33
+ AOT_biomaps/AOT_Recon/AOT_Optimizers/MLEM.py,sha256=TFyL4UNWmHkEPyjfutc5j_CsBrph675rEOGkIEFc_T4,13788
34
+ AOT_biomaps/AOT_Recon/AOT_Optimizers/PDHG.py,sha256=5w4klYKAct9_gnlyocIiJfDrQUdz_VhXQVSpfjrjvNU,7927
35
+ AOT_biomaps/AOT_Recon/AOT_Optimizers/__init__.py,sha256=tNGVulINaqQZzcs5cvCMAT5ypGdoFWRnxtl9y7ePECk,106
36
+ AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/Huber.py,sha256=dRd1t5OBag_gVmfji3L0QrA1GJ_702LcCkLH32Bot0M,3285
37
+ AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/Quadratic.py,sha256=wTbzcXxMdEl9ReEXrL43DOJQecokBwJYU_s2kQUASZY,2545
38
+ AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/RelativeDifferences.py,sha256=ZlWaKsNPCMfy4fWxYFT2pSoKMbysQkJH4N1WbbWncq4,2493
39
+ AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/__init__.py,sha256=RwrJdLOFbAFBFnRxo5xdlOyeZgtQRDaRWDN9-uCGUiY,84
40
+ aot_biomaps-2.9.233.dist-info/METADATA,sha256=d5LWlR-zGNLI0gnyEC3Jbq_5b3KLPo5pn1trpc_LvWg,663
41
+ aot_biomaps-2.9.233.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
42
+ aot_biomaps-2.9.233.dist-info/top_level.txt,sha256=6STF-lT4kaAnBHJYCripmN5mZABoHjMuY689JdiDphk,12
43
+ aot_biomaps-2.9.233.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5