AOT-biomaps 2.9.213__py3-none-any.whl → 2.9.215__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.
- AOT_biomaps/AOT_Experiment/_mainExperiment.py +15 -9
- AOT_biomaps/__init__.py +3 -1
- {aot_biomaps-2.9.213.dist-info → aot_biomaps-2.9.215.dist-info}/METADATA +1 -1
- {aot_biomaps-2.9.213.dist-info → aot_biomaps-2.9.215.dist-info}/RECORD +6 -6
- {aot_biomaps-2.9.213.dist-info → aot_biomaps-2.9.215.dist-info}/WHEEL +0 -0
- {aot_biomaps-2.9.213.dist-info → aot_biomaps-2.9.215.dist-info}/top_level.txt +0 -0
|
@@ -290,28 +290,34 @@ class Experiment(ABC):
|
|
|
290
290
|
|
|
291
291
|
@staticmethod
|
|
292
292
|
def _loadAOSignal(AOsignalPath):
|
|
293
|
-
# if extension is .cdh load .cdf file
|
|
294
293
|
if AOsignalPath.endswith(".cdh"):
|
|
295
294
|
with open(AOsignalPath, "r") as file:
|
|
296
295
|
cdh_content = file.readlines()
|
|
297
296
|
|
|
297
|
+
# Extraction des paramètres
|
|
298
298
|
n_events = int([line.split(":")[1].strip() for line in cdh_content if "Number of events" in line][0])
|
|
299
299
|
n_acquisitions = int([line.split(":")[1].strip() for line in cdh_content if "Number of acquisitions per event" in line][0])
|
|
300
|
+
num_elements = int([line.split(":")[1].strip() for line in cdh_content if "Number of US transducers" in line][0])
|
|
300
301
|
|
|
301
|
-
|
|
302
|
+
# Initialisation avec la bonne forme : (n_acquisitions, n_events)
|
|
303
|
+
AOsignal_matrix = np.zeros((n_acquisitions, n_events), dtype=np.float32)
|
|
302
304
|
|
|
303
305
|
with open(AOsignalPath.replace(".cdh", ".cdf"), "rb") as file:
|
|
306
|
+
hex_length = (num_elements + 3) // 4
|
|
304
307
|
for event in range(n_events):
|
|
305
|
-
|
|
306
|
-
hex_length = (num_elements + 3) // 4
|
|
307
|
-
file.read(hex_length // 2)
|
|
308
|
-
|
|
308
|
+
file.read(hex_length // 2) # Sauter l'en-tête de l'événement
|
|
309
309
|
signal = np.frombuffer(file.read(n_acquisitions * 4), dtype=np.float32)
|
|
310
|
-
AOsignal_matrix[event
|
|
310
|
+
AOsignal_matrix[:, event] = signal # Remplir par colonne
|
|
311
|
+
|
|
312
|
+
AOsignal_matrix = AOsignal_matrix
|
|
311
313
|
|
|
312
314
|
return AOsignal_matrix
|
|
313
|
-
|
|
314
|
-
|
|
315
|
+
|
|
316
|
+
elif AOsignalPath.endswith(".npy"):
|
|
317
|
+
return np.load(AOsignalPath) # Supposé déjà au bon format
|
|
318
|
+
else:
|
|
319
|
+
raise ValueError("Format de fichier non supporté. Utilisez .cdh/.cdf ou .npy.")
|
|
320
|
+
|
|
315
321
|
|
|
316
322
|
def saveAOsignals_Castor(self, save_directory, withTumor=True):
|
|
317
323
|
if withTumor:
|
AOT_biomaps/__init__.py
CHANGED
|
@@ -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.
|
|
85
|
+
__version__ = '2.9.215'
|
|
86
86
|
__process__ = config.get_process()
|
|
87
87
|
|
|
88
88
|
def initialize(process=None):
|
|
@@ -247,6 +247,8 @@ def initialize(process=None):
|
|
|
247
247
|
|
|
248
248
|
|
|
249
249
|
|
|
250
|
+
|
|
251
|
+
|
|
250
252
|
|
|
251
253
|
|
|
252
254
|
|
|
@@ -1,6 +1,6 @@
|
|
|
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=
|
|
3
|
+
AOT_biomaps/__init__.py,sha256=Z_7Ypmz0RNXbhYWqcFpyQJChgR7QN04s2nPMWGrlmk4,4300
|
|
4
4
|
AOT_biomaps/AOT_Acoustic/AcousticEnums.py,sha256=s5kXa6jKzbS4btwbubrVcynLOr0yg5tth5vL_FGfbMk,1802
|
|
5
5
|
AOT_biomaps/AOT_Acoustic/AcousticTools.py,sha256=al7xXKMY5e-qQQ7nrQVPVAmqYiB320OluNlY6ti8iKc,7539
|
|
6
6
|
AOT_biomaps/AOT_Acoustic/FocusedWave.py,sha256=3kGKKDx_3Msy5COYqIwzROPORGWvNjw8UsDanBfkMXE,11037
|
|
@@ -12,7 +12,7 @@ AOT_biomaps/AOT_Acoustic/_mainAcoustic.py,sha256=RdmhRF1i0KAlpsP7_wnZ7F4J27br3eU
|
|
|
12
12
|
AOT_biomaps/AOT_Experiment/Focus.py,sha256=B2nBawmv-NG2AWJx9zgQ8GlN6aFB9FwTSqX-M-phKXg,3193
|
|
13
13
|
AOT_biomaps/AOT_Experiment/Tomography.py,sha256=LoQ304X9pUwpGn_BqNx1JijRFBFtI5Vz2R7bFIKyYKM,20954
|
|
14
14
|
AOT_biomaps/AOT_Experiment/__init__.py,sha256=H9zMLeBLA6uhbaHohAa-2u5mDDxqJi8oE5c6tShdQp8,308
|
|
15
|
-
AOT_biomaps/AOT_Experiment/_mainExperiment.py,sha256=
|
|
15
|
+
AOT_biomaps/AOT_Experiment/_mainExperiment.py,sha256=XPBaAq94m67JbtVGpju0f2mNO7_Z_9zBV1N-AnfajNk,24034
|
|
16
16
|
AOT_biomaps/AOT_Optic/Absorber.py,sha256=jEodzRy7gkEH-wbazVasRQiri0dU16BfapmR-qnTSvM,867
|
|
17
17
|
AOT_biomaps/AOT_Optic/Laser.py,sha256=uzQwxswjU0kZWix3CmZLoWmhsBa3VhN27STprNv-xB8,2986
|
|
18
18
|
AOT_biomaps/AOT_Optic/OpticEnums.py,sha256=b349_JyjHqQohmjK4Wke-A_HLGaqb3_BKbyUqFC4jxY,499
|
|
@@ -37,7 +37,7 @@ AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/Huber.py,sha256=dRd1t5OBag_gVmfji3L
|
|
|
37
37
|
AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/Quadratic.py,sha256=wTbzcXxMdEl9ReEXrL43DOJQecokBwJYU_s2kQUASZY,2545
|
|
38
38
|
AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/RelativeDifferences.py,sha256=dgB3Vt40S5D1VerHr-h-YnzB5xNCt6amE19-C0zyIpU,2253
|
|
39
39
|
AOT_biomaps/AOT_Recon/AOT_PotentialFunctions/__init__.py,sha256=RwrJdLOFbAFBFnRxo5xdlOyeZgtQRDaRWDN9-uCGUiY,84
|
|
40
|
-
aot_biomaps-2.9.
|
|
41
|
-
aot_biomaps-2.9.
|
|
42
|
-
aot_biomaps-2.9.
|
|
43
|
-
aot_biomaps-2.9.
|
|
40
|
+
aot_biomaps-2.9.215.dist-info/METADATA,sha256=X_uTUKBuD3rCMAabQB9EK5l1muH2VB0pv2UrFXUmviU,663
|
|
41
|
+
aot_biomaps-2.9.215.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
42
|
+
aot_biomaps-2.9.215.dist-info/top_level.txt,sha256=6STF-lT4kaAnBHJYCripmN5mZABoHjMuY689JdiDphk,12
|
|
43
|
+
aot_biomaps-2.9.215.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|