AOT-biomaps 2.9.365__py3-none-any.whl → 2.9.367__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.
@@ -217,3 +217,20 @@ def next_power_of_2(n):
217
217
  """Calculate the next power of 2 greater than or equal to n."""
218
218
  return int(2 ** np.ceil(np.log2(n)))
219
219
 
220
+ def hex_to_binary_profile(hex_string, n_piezos=192):
221
+ hex_string = hex_string.strip().replace(" ", "").replace("\n", "")
222
+ if set(hex_string.lower()) == {'f'}:
223
+ return np.ones(n_piezos, dtype=int)
224
+
225
+ try:
226
+ n_char = len(hex_string)
227
+ n_bits = n_char * 4
228
+ binary_str = bin(int(hex_string, 16))[2:].zfill(n_bits)
229
+ if len(binary_str) < n_piezos:
230
+ # Tronquer/padder en fonction de la taille réelle de la sonde
231
+ binary_str = binary_str.ljust(n_piezos, '0')
232
+ elif len(binary_str) > n_piezos:
233
+ binary_str = binary_str[:n_piezos]
234
+ return np.array([int(b) for b in binary_str])
235
+ except ValueError:
236
+ return np.zeros(n_piezos, dtype=int)
@@ -1,8 +1,8 @@
1
1
  from AOT_biomaps.Config import config
2
- from AcoustoOpticTomography.AOT_biomaps.AOT_Experiment.ExperimentTools import hex_to_binary_profile
3
2
  from ._mainAcoustic import AcousticField
4
3
  from .AcousticEnums import WaveType
5
4
  from .AcousticTools import detect_space_0_and_space_1, getAngle
5
+ from .AcousticTools import hex_to_binary_profile
6
6
 
7
7
  import os
8
8
  import numpy as np
AOT_biomaps/__init__.py CHANGED
@@ -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.365'
88
+ __version__ = '2.9.367'
89
89
  __process__ = config.get_process()
90
90
 
91
91
  def initialize(process=None):
@@ -226,6 +226,8 @@ def initialize(process=None):
226
226
 
227
227
 
228
228
 
229
+
230
+
229
231
 
230
232
 
231
233
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: AOT_biomaps
3
- Version: 2.9.365
3
+ Version: 2.9.367
4
4
  Summary: Acousto-Optic Tomography
5
5
  Home-page: https://github.com/LucasDuclos/AcoustoOpticTomography
6
6
  Author: Lucas Duclos
@@ -1,12 +1,12 @@
1
1
  AOT_biomaps/Config.py,sha256=ghEOP1n8aO1pR-su13wMeAZAxZRfry5hH67NbtZ8SqI,3614
2
2
  AOT_biomaps/Settings.py,sha256=v8fPhnvvcfBJP29m1RLOTEr3jndGLGwbUiORXmsj2Bo,2853
3
- AOT_biomaps/__init__.py,sha256=gGOhX--gA5aULu4u7YlRzww0diK7Y7E3tjFiMy_Emes,4392
3
+ AOT_biomaps/__init__.py,sha256=QXTkeC2JnZLU4Jp3j7HnbygRbn0pq4CPYj9ymbSwMsI,4396
4
4
  AOT_biomaps/AOT_Acoustic/AcousticEnums.py,sha256=s5kXa6jKzbS4btwbubrVcynLOr0yg5tth5vL_FGfbMk,1802
5
- AOT_biomaps/AOT_Acoustic/AcousticTools.py,sha256=h2sCtGVcDtyLtEF1q7sLZmuWivWmesVGUBPnW-ndQqc,7535
5
+ AOT_biomaps/AOT_Acoustic/AcousticTools.py,sha256=7kuWIIGyzZPQrzRI0zVvdwNUp7qKUE67yCYOMzSb0Ug,8283
6
6
  AOT_biomaps/AOT_Acoustic/FocusedWave.py,sha256=3kGKKDx_3Msy5COYqIwzROPORGWvNjw8UsDanBfkMXE,11037
7
7
  AOT_biomaps/AOT_Acoustic/IrregularWave.py,sha256=yZhtxkR6zlciRcEpdTR0BAhvgQl40XHKFaF8f4VXarE,3035
8
8
  AOT_biomaps/AOT_Acoustic/PlaneWave.py,sha256=xza-rj5AUWDecLkGDxRcULrwZVWeBvGnEP2d51TyR04,1447
9
- AOT_biomaps/AOT_Acoustic/StructuredWave.py,sha256=TO8in7HfPx5rZ_9pIi9__mKsaZbHRVQ1lcRLdr4f-aw,19020
9
+ AOT_biomaps/AOT_Acoustic/StructuredWave.py,sha256=ALUUUihTwbPjEo8Ce67OY80mILs068I2ZwdngQbXkD0,18969
10
10
  AOT_biomaps/AOT_Acoustic/__init__.py,sha256=t9M2rRqa_L9pk7W2FeELTkHEMuP4DBr4gBRldMqsQbg,491
11
11
  AOT_biomaps/AOT_Acoustic/_mainAcoustic.py,sha256=RdmhRF1i0KAlpsP7_wnZ7F4J27br3eUc4XR91Qq7C64,44158
12
12
  AOT_biomaps/AOT_Experiment/ExperimentTools.py,sha256=aFvJw6J_jfFVTDFnG7J3a61SHEgORdZKZS0UI82VMaY,2637
@@ -42,7 +42,7 @@ AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/__init__.py,sha256=RwrJdLOFbAFBFnRx
42
42
  AOT_biomaps/AOT_Recon/AOT_SparseSMatrix/SparseSMatrix_CSR.py,sha256=RACc2P5oxmp0uPLAGnNj9mEtAxa_OlepNgCawKij3jI,12062
43
43
  AOT_biomaps/AOT_Recon/AOT_SparseSMatrix/SparseSMatrix_SELL.py,sha256=ti3dZQsb_Uu62C7Bn65Z-yf-R5NKCFsmnBT5GlLd_HY,15138
44
44
  AOT_biomaps/AOT_Recon/AOT_SparseSMatrix/__init__.py,sha256=8nou-hqjQjuCTLhoL5qv4EM_lMPFviAZAZKSPhi84jE,67
45
- aot_biomaps-2.9.365.dist-info/METADATA,sha256=0QqOVmpZwZKKRyL9MY6otBIEL1vbuc7qVOIdK-F3CZc,700
46
- aot_biomaps-2.9.365.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
47
- aot_biomaps-2.9.365.dist-info/top_level.txt,sha256=6STF-lT4kaAnBHJYCripmN5mZABoHjMuY689JdiDphk,12
48
- aot_biomaps-2.9.365.dist-info/RECORD,,
45
+ aot_biomaps-2.9.367.dist-info/METADATA,sha256=l-giE_Zc44KDSq20gkoCrCGhrSt2IVLLWbaGUPbmg-s,700
46
+ aot_biomaps-2.9.367.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
47
+ aot_biomaps-2.9.367.dist-info/top_level.txt,sha256=6STF-lT4kaAnBHJYCripmN5mZABoHjMuY689JdiDphk,12
48
+ aot_biomaps-2.9.367.dist-info/RECORD,,