AOT-biomaps 2.9.362__tar.gz → 2.9.364__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 (53) hide show
  1. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Acoustic/StructuredWave.py +15 -1
  2. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Experiment/Tomography.py +18 -0
  3. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/__init__.py +3 -1
  4. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps.egg-info/PKG-INFO +1 -1
  5. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/PKG-INFO +1 -1
  6. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/setup.py +3 -1
  7. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Acoustic/AcousticEnums.py +0 -0
  8. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Acoustic/AcousticTools.py +0 -0
  9. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Acoustic/FocusedWave.py +0 -0
  10. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Acoustic/IrregularWave.py +0 -0
  11. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Acoustic/PlaneWave.py +0 -0
  12. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Acoustic/__init__.py +0 -0
  13. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Acoustic/_mainAcoustic.py +0 -0
  14. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Experiment/ExperimentTools.py +0 -0
  15. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Experiment/Focus.py +0 -0
  16. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Experiment/__init__.py +0 -0
  17. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Experiment/_mainExperiment.py +0 -0
  18. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Optic/Absorber.py +0 -0
  19. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Optic/Laser.py +0 -0
  20. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Optic/OpticEnums.py +0 -0
  21. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Optic/__init__.py +0 -0
  22. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Optic/_mainOptic.py +0 -0
  23. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AOT_Optimizers/DEPIERRO.py +0 -0
  24. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AOT_Optimizers/LS.py +0 -0
  25. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AOT_Optimizers/MAPEM.py +0 -0
  26. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AOT_Optimizers/MLEM.py +0 -0
  27. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AOT_Optimizers/PDHG.py +0 -0
  28. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AOT_Optimizers/__init__.py +0 -0
  29. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/Huber.py +0 -0
  30. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/Quadratic.py +0 -0
  31. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/RelativeDifferences.py +0 -0
  32. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/__init__.py +0 -0
  33. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AOT_SparseSMatrix/SparseSMatrix_CSR.py +0 -0
  34. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AOT_SparseSMatrix/SparseSMatrix_SELL.py +0 -0
  35. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AOT_SparseSMatrix/__init__.py +0 -0
  36. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AOT_biomaps_kernels.cubin +0 -0
  37. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AlgebraicRecon.py +0 -0
  38. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/AnalyticRecon.py +0 -0
  39. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/BayesianRecon.py +0 -0
  40. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/DeepLearningRecon.py +0 -0
  41. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/PrimalDualRecon.py +0 -0
  42. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/ReconEnums.py +0 -0
  43. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/ReconTools.py +0 -0
  44. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/__init__.py +0 -0
  45. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/AOT_Recon/_mainRecon.py +0 -0
  46. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/Config.py +0 -0
  47. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps/Settings.py +0 -0
  48. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps.egg-info/SOURCES.txt +0 -0
  49. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps.egg-info/dependency_links.txt +0 -0
  50. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps.egg-info/requires.txt +0 -0
  51. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/AOT_biomaps.egg-info/top_level.txt +0 -0
  52. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/README.md +0 -0
  53. {aot_biomaps-2.9.362 → aot_biomaps-2.9.364}/setup.cfg +0 -0
@@ -1,4 +1,5 @@
1
1
  from AOT_biomaps.Config import config
2
+ from AcoustoOpticTomography.AOT_biomaps.AOT_Experiment.ExperimentTools import hex_to_binary_profile
2
3
  from ._mainAcoustic import AcousticField
3
4
  from .AcousticEnums import WaveType
4
5
  from .AcousticTools import detect_space_0_and_space_1, getAngle
@@ -156,7 +157,20 @@ class StructuredWave(AcousticField):
156
157
  int: Decimation frequency.
157
158
  """
158
159
  try:
159
- return 1/(self.pattern.space_0 + self.pattern.space_1)/self.params['element_width']
160
+ profile = hex_to_binary_profile(self.getName_field()[6:-4], self.params['num_elements'])
161
+
162
+ if set(self.getName_field()[6:-4].lower().replace(" ", "")) == {'f'}:
163
+ fs_key = 0.0 # fs_key est en mm^-1 (0.0 mm^-1)
164
+ else:
165
+ ft_prof = np.fft.fft(profile)
166
+ idx_max = np.argmax(np.abs(ft_prof[1:len(profile)//2])) + 1
167
+ freqs = np.fft.fftfreq(len(profile), d=self.params['dx'])
168
+
169
+ # freqs est en m^-1 car delta_x est en mètres.
170
+ fs_m_inv = abs(freqs[idx_max])
171
+
172
+ fs_key = fs_m_inv # Fréquence spatiale en mm^-1
173
+ return int(fs_key / (1000* self.params['dx'])) # Convert number decimation (f_s = n * delta_x)
160
174
  except Exception as e:
161
175
  print(f"Error calculating decimation frequency: {e}")
162
176
  return None
@@ -342,6 +342,24 @@ class Tomography(Experiment):
342
342
  self.AcousticFields = newAcousticFields
343
343
  self.theta = [field.angle for field in newAcousticFields]
344
344
 
345
+ def selectDecimations(self, decimations):
346
+ if self.AOsignal_withTumor is None and self.AOsignal_withoutTumor is None:
347
+ raise ValueError("AO signals are not initialized. Please load or generate the AO signals first.")
348
+ if self.AcousticFields is None or len(self.AcousticFields) == 0:
349
+ raise ValueError("AcousticFields is not initialized. Please generate the system matrix first.")
350
+ newAcousticFields = []
351
+ index = []
352
+ for i, field in enumerate(self.AcousticFields):
353
+ if field.f_s in decimations:
354
+ newAcousticFields.append(field)
355
+ index.append(i)
356
+ if self.AOsignal_withTumor is not None:
357
+ self.AOsignal_withTumor = self.AOsignal_withTumor[:, index]
358
+ if self.AOsignal_withoutTumor is not None:
359
+ self.AOsignal_withoutTumor = self.AOsignal_withoutTumor[:, index]
360
+ self.AcousticFields = newAcousticFields
361
+ self.decimations = [field.f_s for field in newAcousticFields]
362
+
345
363
  def selectPatterns(self, pattern_names):
346
364
  if self.AOsignal_withTumor is None and self.AOsignal_withoutTumor is None:
347
365
  raise ValueError("AO signals are not initialized. Please load or generate the AO signals first.")
@@ -85,7 +85,7 @@ from .AOT_Recon.AOT_PotentialFunctions.RelativeDifferences import *
85
85
  from .Config import config
86
86
  from .Settings import *
87
87
 
88
- __version__ = '2.9.362'
88
+ __version__ = '2.9.364'
89
89
  __process__ = config.get_process()
90
90
 
91
91
  def initialize(process=None):
@@ -223,6 +223,8 @@ def initialize(process=None):
223
223
 
224
224
 
225
225
 
226
+
227
+
226
228
 
227
229
 
228
230
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: AOT_biomaps
3
- Version: 2.9.362
3
+ Version: 2.9.364
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.362
3
+ Version: 2.9.364
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.362',
5
+ version='2.9.364',
6
6
  packages=find_packages(),
7
7
  include_package_data=True,
8
8
 
@@ -381,6 +381,8 @@ setup(
381
381
 
382
382
 
383
383
 
384
+
385
+
384
386
 
385
387
 
386
388
 
File without changes
File without changes