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.
- AOT_biomaps/AOT_Acoustic/AcousticEnums.py +64 -0
- AOT_biomaps/AOT_Acoustic/AcousticTools.py +221 -0
- AOT_biomaps/AOT_Acoustic/FocusedWave.py +244 -0
- AOT_biomaps/AOT_Acoustic/IrregularWave.py +66 -0
- AOT_biomaps/AOT_Acoustic/PlaneWave.py +43 -0
- AOT_biomaps/AOT_Acoustic/StructuredWave.py +392 -0
- AOT_biomaps/AOT_Acoustic/__init__.py +15 -0
- AOT_biomaps/AOT_Acoustic/_mainAcoustic.py +978 -0
- AOT_biomaps/AOT_Experiment/Focus.py +55 -0
- AOT_biomaps/AOT_Experiment/Tomography.py +505 -0
- AOT_biomaps/AOT_Experiment/__init__.py +9 -0
- AOT_biomaps/AOT_Experiment/_mainExperiment.py +532 -0
- AOT_biomaps/AOT_Optic/Absorber.py +24 -0
- AOT_biomaps/AOT_Optic/Laser.py +70 -0
- AOT_biomaps/AOT_Optic/OpticEnums.py +17 -0
- AOT_biomaps/AOT_Optic/__init__.py +10 -0
- AOT_biomaps/AOT_Optic/_mainOptic.py +204 -0
- AOT_biomaps/AOT_Recon/AOT_Optimizers/DEPIERRO.py +191 -0
- AOT_biomaps/AOT_Recon/AOT_Optimizers/LS.py +106 -0
- AOT_biomaps/AOT_Recon/AOT_Optimizers/MAPEM.py +456 -0
- AOT_biomaps/AOT_Recon/AOT_Optimizers/MLEM.py +333 -0
- AOT_biomaps/AOT_Recon/AOT_Optimizers/PDHG.py +221 -0
- AOT_biomaps/AOT_Recon/AOT_Optimizers/__init__.py +5 -0
- AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/Huber.py +90 -0
- AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/Quadratic.py +86 -0
- AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/RelativeDifferences.py +59 -0
- AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/__init__.py +3 -0
- AOT_biomaps/AOT_Recon/AlgebraicRecon.py +1023 -0
- AOT_biomaps/AOT_Recon/AnalyticRecon.py +154 -0
- AOT_biomaps/AOT_Recon/BayesianRecon.py +230 -0
- AOT_biomaps/AOT_Recon/DeepLearningRecon.py +35 -0
- AOT_biomaps/AOT_Recon/PrimalDualRecon.py +210 -0
- AOT_biomaps/AOT_Recon/ReconEnums.py +375 -0
- AOT_biomaps/AOT_Recon/ReconTools.py +273 -0
- AOT_biomaps/AOT_Recon/__init__.py +11 -0
- AOT_biomaps/AOT_Recon/_mainRecon.py +288 -0
- AOT_biomaps/Config.py +95 -0
- AOT_biomaps/Settings.py +45 -13
- AOT_biomaps/__init__.py +271 -18
- aot_biomaps-2.9.233.dist-info/METADATA +22 -0
- aot_biomaps-2.9.233.dist-info/RECORD +43 -0
- {AOT_biomaps-2.1.3.dist-info → aot_biomaps-2.9.233.dist-info}/WHEEL +1 -1
- AOT_biomaps/AOT_Acoustic.py +0 -1881
- AOT_biomaps/AOT_Experiment.py +0 -541
- AOT_biomaps/AOT_Optic.py +0 -219
- AOT_biomaps/AOT_Reconstruction.py +0 -1416
- AOT_biomaps/config.py +0 -54
- AOT_biomaps-2.1.3.dist-info/METADATA +0 -20
- AOT_biomaps-2.1.3.dist-info/RECORD +0 -11
- {AOT_biomaps-2.1.3.dist-info → aot_biomaps-2.9.233.dist-info}/top_level.txt +0 -0
AOT_biomaps/config.py
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import GPUtil
|
|
2
|
-
|
|
3
|
-
class Config:
|
|
4
|
-
_instance = None
|
|
5
|
-
|
|
6
|
-
def __new__(cls, *args, **kwargs):
|
|
7
|
-
if not cls._instance:
|
|
8
|
-
cls._instance = super(Config, cls).__new__(cls, *args, **kwargs)
|
|
9
|
-
return cls._instance
|
|
10
|
-
|
|
11
|
-
def __init__(self):
|
|
12
|
-
if not hasattr(self, 'initialized'):
|
|
13
|
-
gpus = GPUtil.getGPUs()
|
|
14
|
-
if not gpus:
|
|
15
|
-
self.process = 'cpu'
|
|
16
|
-
self.bestGPU = None
|
|
17
|
-
print("No GPUs found. Defaulting to CPU.")
|
|
18
|
-
else:
|
|
19
|
-
self.process = 'gpu'
|
|
20
|
-
self.bestGPU = self.select_best_gpu()
|
|
21
|
-
print(f"GPUs found. Using {self.process.upper()} for processing.")
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
self.bestGPU = None
|
|
25
|
-
self.initialized = True
|
|
26
|
-
|
|
27
|
-
def set_process(self, process):
|
|
28
|
-
if process not in ['cpu', 'gpu']:
|
|
29
|
-
raise ValueError("process must be 'cpu' or 'gpu'")
|
|
30
|
-
self.process = process
|
|
31
|
-
|
|
32
|
-
def get_process(self):
|
|
33
|
-
return self.process
|
|
34
|
-
|
|
35
|
-
def select_best_gpu(self):
|
|
36
|
-
gpus = GPUtil.getGPUs()
|
|
37
|
-
|
|
38
|
-
best_gpu = 0
|
|
39
|
-
max_memory = 0
|
|
40
|
-
|
|
41
|
-
for i, gpu in enumerate(gpus):
|
|
42
|
-
# Obtenez la mémoire totale et utilisée pour chaque GPU
|
|
43
|
-
total_memory = gpu.memoryTotal
|
|
44
|
-
used_memory = gpu.memoryUsed
|
|
45
|
-
available_memory = total_memory - used_memory
|
|
46
|
-
|
|
47
|
-
# Sélectionnez le GPU avec le plus de mémoire disponible
|
|
48
|
-
if available_memory > max_memory:
|
|
49
|
-
max_memory = available_memory
|
|
50
|
-
best_gpu = i
|
|
51
|
-
print(f"Best GPU is GPU {best_gpu} with {max_memory:.2f} MB available.")
|
|
52
|
-
return best_gpu
|
|
53
|
-
|
|
54
|
-
config = Config()
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: AOT_biomaps
|
|
3
|
-
Version: 2.1.3
|
|
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: k-wave-python
|
|
9
|
-
Requires-Dist: setuptools
|
|
10
|
-
Requires-Dist: pyyaml
|
|
11
|
-
Requires-Dist: numba
|
|
12
|
-
Requires-Dist: tqdm
|
|
13
|
-
Requires-Dist: GPUtil
|
|
14
|
-
Requires-Dist: scikit-image
|
|
15
|
-
Provides-Extra: cpu
|
|
16
|
-
Provides-Extra: gpu
|
|
17
|
-
Requires-Dist: cupy; extra == "gpu"
|
|
18
|
-
Requires-Dist: nvidia-ml-py3; extra == "gpu"
|
|
19
|
-
Requires-Dist: torch; extra == "gpu"
|
|
20
|
-
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
AOT_biomaps/AOT_Acoustic.py,sha256=RLjEh5jqpTqRpEszKU0587KwStfRmbip2AGhON-sz48,82269
|
|
2
|
-
AOT_biomaps/AOT_Experiment.py,sha256=-l_EMc-PnEY-w-2-5GUypMr0wuqkdP2qGCaiZyuLTwU,24016
|
|
3
|
-
AOT_biomaps/AOT_Optic.py,sha256=X7IhT8I4qbWtHrp6Rjg-lbbAl6kmaV9k3AVDz0y9-dc,8816
|
|
4
|
-
AOT_biomaps/AOT_Reconstruction.py,sha256=Ci0_aqVhlPOuLZrNUleGPP-MLnYLxiubsYpZojJUWAY,65683
|
|
5
|
-
AOT_biomaps/Settings.py,sha256=vcxvrvHQuoZu5OQYp1Ub8GebISMedEQGasJaYp6k1Is,1541
|
|
6
|
-
AOT_biomaps/__init__.py,sha256=MBlZFdaeo03xMjU89p7iB-GLs7GIFIq_pIBWk9EgpnY,461
|
|
7
|
-
AOT_biomaps/config.py,sha256=NdROMVh42TMERBqgfrJWo0BZEcIn0416XK1ZZN5L5sY,1726
|
|
8
|
-
AOT_biomaps-2.1.3.dist-info/METADATA,sha256=I6Lgv4z1kERS8jQ2TX2i9ToX96QJltq3ozbh_iAE71M,576
|
|
9
|
-
AOT_biomaps-2.1.3.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
10
|
-
AOT_biomaps-2.1.3.dist-info/top_level.txt,sha256=6STF-lT4kaAnBHJYCripmN5mZABoHjMuY689JdiDphk,12
|
|
11
|
-
AOT_biomaps-2.1.3.dist-info/RECORD,,
|
|
File without changes
|