AOT-biomaps 2.9.217__tar.gz → 2.9.218__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.

Potentially problematic release.


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

Files changed (48) hide show
  1. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Experiment/_mainExperiment.py +0 -5
  2. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/RelativeDifferences.py +10 -14
  3. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/__init__.py +2 -1
  4. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps.egg-info/PKG-INFO +1 -1
  5. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/PKG-INFO +1 -1
  6. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/setup.py +2 -1
  7. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Acoustic/AcousticEnums.py +0 -0
  8. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Acoustic/AcousticTools.py +0 -0
  9. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Acoustic/FocusedWave.py +0 -0
  10. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Acoustic/IrregularWave.py +0 -0
  11. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Acoustic/PlaneWave.py +0 -0
  12. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Acoustic/StructuredWave.py +0 -0
  13. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Acoustic/__init__.py +0 -0
  14. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Acoustic/_mainAcoustic.py +0 -0
  15. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Experiment/Focus.py +0 -0
  16. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Experiment/Tomography.py +0 -0
  17. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Experiment/__init__.py +0 -0
  18. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Optic/Absorber.py +0 -0
  19. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Optic/Laser.py +0 -0
  20. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Optic/OpticEnums.py +0 -0
  21. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Optic/__init__.py +0 -0
  22. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Optic/_mainOptic.py +0 -0
  23. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/AOT_Optimizers/DEPIERRO.py +0 -0
  24. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/AOT_Optimizers/LS.py +0 -0
  25. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/AOT_Optimizers/MAPEM.py +0 -0
  26. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/AOT_Optimizers/MLEM.py +0 -0
  27. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/AOT_Optimizers/PDHG.py +0 -0
  28. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/AOT_Optimizers/__init__.py +0 -0
  29. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/Huber.py +0 -0
  30. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/Quadratic.py +0 -0
  31. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/__init__.py +0 -0
  32. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/AlgebraicRecon.py +0 -0
  33. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/AnalyticRecon.py +0 -0
  34. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/BayesianRecon.py +0 -0
  35. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/DeepLearningRecon.py +0 -0
  36. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/PrimalDualRecon.py +0 -0
  37. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/ReconEnums.py +0 -0
  38. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/ReconTools.py +0 -0
  39. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/__init__.py +0 -0
  40. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/AOT_Recon/_mainRecon.py +0 -0
  41. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/Config.py +0 -0
  42. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps/Settings.py +0 -0
  43. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps.egg-info/SOURCES.txt +0 -0
  44. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps.egg-info/dependency_links.txt +0 -0
  45. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps.egg-info/requires.txt +0 -0
  46. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/AOT_biomaps.egg-info/top_level.txt +0 -0
  47. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/README.md +0 -0
  48. {aot_biomaps-2.9.217 → aot_biomaps-2.9.218}/setup.cfg +0 -0
@@ -301,11 +301,6 @@ class Experiment(ABC):
301
301
  n_acquisitions_per_event = int([line.split(":")[1].strip() for line in cdh_content if "Number of acquisitions per event" in line][0])
302
302
  num_elements = int([line.split(":")[1].strip() for line in cdh_content if "Number of US transducers" in line][0])
303
303
 
304
- print(f"Nombre de scans : {n_scans}")
305
- print(f"Nombre d'acquisitions par événement : {n_acquisitions_per_event}")
306
- print(f"Nombre d'éléments US : {num_elements}")
307
-
308
-
309
304
  # Initialisation des structures
310
305
  AO_signal = np.zeros((n_acquisitions_per_event, n_scans), dtype=np.float32)
311
306
  active_lists = []
@@ -9,26 +9,24 @@ def _Omega_RELATIVE_DIFFERENCE_CPU(theta_flat, index, values, gamma):
9
9
  theta_k = theta_flat[k_idx]
10
10
  diff = theta_k - theta_j
11
11
  abs_diff = np.abs(diff)
12
-
13
12
  denom = theta_k + theta_j + gamma * abs_diff + 1e-8
14
13
  num = diff ** 2
15
-
14
+ psi_pair = num / denom
15
+ psi_pair = values * psi_pair
16
16
  # First derivative ∂U/∂θ_j
17
17
  dpsi = (2 * diff * denom - num * (1 + gamma * np.sign(diff))) / (denom ** 2)
18
18
  grad_pair = values * (-dpsi) # Note the negative sign: U contains ψ(θ_k, θ_j), seeking ∂/∂θ_j
19
-
20
19
  # Second derivative ∂²U/∂θ_j² (numerically stable, approximate treatment)
21
20
  d2psi = (2 * denom ** 2 - 4 * diff * denom * (1 + gamma * np.sign(diff))
22
21
  + 2 * num * (1 + gamma * np.sign(diff)) ** 2) / (denom ** 3 + 1e-8)
23
22
  hess_pair = values * d2psi
24
-
25
23
  grad_U = np.zeros_like(theta_flat)
26
24
  hess_U = np.zeros_like(theta_flat)
27
-
28
25
  np.add.at(grad_U, j_idx, grad_pair)
29
26
  np.add.at(hess_U, j_idx, hess_pair)
30
-
31
- return grad_U, hess_U
27
+ # Compute U_value
28
+ U_value = 0.5 * np.sum(psi_pair)
29
+ return grad_U, hess_U, U_value
32
30
 
33
31
  def _Omega_RELATIVE_DIFFERENCE_GPU(theta_flat, index, values, device, gamma):
34
32
  j_idx, k_idx = index
@@ -38,26 +36,24 @@ def _Omega_RELATIVE_DIFFERENCE_GPU(theta_flat, index, values, device, gamma):
38
36
  abs_diff = torch.abs(diff)
39
37
  denom = theta_k + theta_j + gamma * abs_diff + 1e-8
40
38
  num = diff ** 2
41
-
39
+ psi_pair = num / denom
40
+ psi_pair = values * psi_pair
42
41
  # Compute gradient contributions
43
42
  dpsi = (2 * diff * denom - num * (1 + gamma * torch.sign(diff))) / (denom ** 2)
44
43
  grad_pair = values * (-dpsi)
45
-
46
44
  # Compute Hessian contributions
47
45
  d2psi = (2 * denom ** 2 - 4 * diff * denom * (1 + gamma * torch.sign(diff))
48
46
  + 2 * num * (1 + gamma * torch.sign(diff)) ** 2) / (denom ** 3 + 1e-8)
49
47
  hess_pair = values * d2psi
50
-
51
48
  # Initialize gradient and Hessian on the correct device
52
49
  grad_U = torch.zeros_like(theta_flat, device=device)
53
50
  hess_U = torch.zeros_like(theta_flat, device=device)
54
-
55
51
  # Accumulate gradient contributions
56
52
  grad_U.index_add_(0, j_idx, grad_pair)
57
53
  grad_U.index_add_(0, k_idx, -grad_pair)
58
-
59
54
  # Accumulate Hessian contributions
60
55
  hess_U.index_add_(0, j_idx, hess_pair)
61
56
  hess_U.index_add_(0, k_idx, hess_pair)
62
-
63
- return grad_U, hess_U
57
+ # Compute U_value
58
+ U_value = 0.5 * psi_pair.sum()
59
+ return grad_U, hess_U, U_value
@@ -82,7 +82,7 @@ from .AOT_Recon.AOT_PotentialFunctions.RelativeDifferences import *
82
82
  from .Config import config
83
83
  from .Settings import *
84
84
 
85
- __version__ = '2.9.217'
85
+ __version__ = '2.9.218'
86
86
  __process__ = config.get_process()
87
87
 
88
88
  def initialize(process=None):
@@ -252,5 +252,6 @@ def initialize(process=None):
252
252
 
253
253
 
254
254
 
255
+
255
256
 
256
257
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: AOT_biomaps
3
- Version: 2.9.217
3
+ Version: 2.9.218
4
4
  Summary: Acousto-Optic Tomography
5
5
  Home-page: https://github.com/LucasDuclos/AcoustoOpticTomography
6
6
  Author: Lucas Duclos
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: AOT_biomaps
3
- Version: 2.9.217
3
+ Version: 2.9.218
4
4
  Summary: Acousto-Optic Tomography
5
5
  Home-page: https://github.com/LucasDuclos/AcoustoOpticTomography
6
6
  Author: Lucas Duclos
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='AOT_biomaps',
5
- version='2.9.217',
5
+ version='2.9.218',
6
6
  packages=find_packages(),
7
7
  include_package_data=True,
8
8
  install_requires=[
@@ -227,5 +227,6 @@ setup(
227
227
 
228
228
 
229
229
 
230
+
230
231
 
231
232
 
File without changes
File without changes