AOT-biomaps 2.9.372__py3-none-any.whl → 2.9.374__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_Acoustic/_mainAcoustic.py +34 -22
- AOT_biomaps/__init__.py +3 -1
- {aot_biomaps-2.9.372.dist-info → aot_biomaps-2.9.374.dist-info}/METADATA +1 -1
- {aot_biomaps-2.9.372.dist-info → aot_biomaps-2.9.374.dist-info}/RECORD +6 -6
- {aot_biomaps-2.9.372.dist-info → aot_biomaps-2.9.374.dist-info}/WHEEL +0 -0
- {aot_biomaps-2.9.372.dist-info → aot_biomaps-2.9.374.dist-info}/top_level.txt +0 -0
|
@@ -106,7 +106,7 @@ class AcousticField(ABC):
|
|
|
106
106
|
'Nx': int(np.round((params.general['Xrange'][1] - params.general['Xrange'][0])/params.general['dx'])),
|
|
107
107
|
'Ny': int(np.round((params.general['Yrange'][1] - params.general['Yrange'][0])/params.general['dy'])) if params.general['Yrange'] is not None else 1,
|
|
108
108
|
'Nz': int(np.round((params.general['Zrange'][1] - params.general['Zrange'][0])/params.general['dz'])),
|
|
109
|
-
'Nt': params.general['Nt'] if 'Nt' in params.general else None,
|
|
109
|
+
'Nt': (params.general['Nt'])*int(float(params.acoustic['f_AQ']))/int(float(params.acoustic['f_saving'])) if 'Nt' in params.general else None,
|
|
110
110
|
'probeWidth': params.acoustic['num_elements'] * params.acoustic['element_width'],
|
|
111
111
|
'IsAbsorbingMedium': params.acoustic['isAbsorbingMedium'],
|
|
112
112
|
}
|
|
@@ -511,34 +511,45 @@ class AcousticField(ABC):
|
|
|
511
511
|
try:
|
|
512
512
|
# --- 1. Grid setup ---
|
|
513
513
|
dx = self.params['dx']
|
|
514
|
+
air_margin = 20
|
|
514
515
|
if dx >= self.params['element_width']:
|
|
515
516
|
dx = self.params['element_width'] / 2
|
|
516
517
|
if self.params['width_phantom'] is not None:
|
|
517
|
-
|
|
518
|
+
pva_nx = int(np.round((self.params['width_phantom'])/dx))
|
|
519
|
+
Nx = pva_nx + 2 * air_margin
|
|
518
520
|
else:
|
|
519
521
|
Nx = int(round((self.params['Xrange'][1] - self.params['Xrange'][0]) / dx))
|
|
520
522
|
if self.params['height_phantom'] is not None:
|
|
521
|
-
Nz = int(np.round((self.params['height_phantom'])/dx))
|
|
523
|
+
Nz = int(np.round((self.params['height_phantom'])/dx))
|
|
522
524
|
else:
|
|
523
525
|
Nz = int(round((self.params['Zrange'][1] - self.params['Zrange'][0]) / dx))
|
|
524
526
|
else:
|
|
525
527
|
if self.params['width_phantom'] is not None:
|
|
526
|
-
|
|
528
|
+
pva_nx = int(np.round((self.params['width_phantom'])/self.params['dx']))
|
|
529
|
+
Nx = pva_nx + 2 * air_margin
|
|
527
530
|
else:
|
|
528
531
|
Nx = int(round((self.params['Xrange'][1] - self.params['Xrange'][0]) / self.params['dx']))
|
|
529
532
|
if self.params['height_phantom'] is not None:
|
|
530
533
|
Nz = int(np.round((self.params['height_phantom'])/self.params['dz']))
|
|
531
534
|
else:
|
|
532
535
|
Nz = int(round((self.params['Zrange'][1] - self.params['Zrange'][0]) / self.params['dz']))
|
|
533
|
-
|
|
536
|
+
|
|
534
537
|
# --- 2. Time and space factors ---
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
+
factorT = int(np.ceil(self.params['f_AQ'] / self.params['f_saving']))
|
|
539
|
+
factorX = int(np.ceil(Nx / self.params['Nx']))
|
|
540
|
+
factorZ = int(np.ceil(Nz / self.params['Nz']))
|
|
538
541
|
|
|
539
542
|
# --- 3. Grid and source initialization ---
|
|
540
543
|
kgrid = kWaveGrid([Nx, Nz], [dx, dx])
|
|
541
544
|
kgrid.setTime(self.kgrid.Nt, 1 / self.params['f_AQ'])
|
|
545
|
+
|
|
546
|
+
medium = kWaveMedium()
|
|
547
|
+
medium.sound_speed = np.full((Nx, Nz), 343.0)
|
|
548
|
+
medium.density = np.full((Nx, Nz), 1.2)
|
|
549
|
+
x_start, x_end = air_margin, air_margin + pva_nx
|
|
550
|
+
medium.sound_speed[x_start:x_end, :] = self.params['c0'] # 1540 m/s
|
|
551
|
+
medium.density[x_start:x_end, :] = self.params.get('density', 1000.0)
|
|
552
|
+
|
|
542
553
|
|
|
543
554
|
source = kSource()
|
|
544
555
|
source.p_mask = np.zeros((Nx, Nz))
|
|
@@ -548,19 +559,16 @@ class AcousticField(ABC):
|
|
|
548
559
|
sensor.mask = np.ones((Nx, Nz))
|
|
549
560
|
|
|
550
561
|
# --- 5. PML setup ---
|
|
551
|
-
|
|
552
|
-
pml_z_size = (total_size_z - Nz) // 2
|
|
553
|
-
pml_z_size = max(pml_z_size, 50) # Ensure a minimum PML size of 50 grid points to avoid parasitic reflections
|
|
562
|
+
pml_size = 50
|
|
554
563
|
|
|
555
|
-
# ---
|
|
564
|
+
# --- 7. Simulation options ---
|
|
556
565
|
simulation_options = SimulationOptions(
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
output_filename=os.path.join(gettempdir(), "KwaveOUT.h5")
|
|
566
|
+
pml_inside=False, # PML ajoutée autour de la grille Air+PVA
|
|
567
|
+
pml_size=[pml_size, pml_size],
|
|
568
|
+
use_sg=False,
|
|
569
|
+
save_to_disk=True,
|
|
570
|
+
input_filename=os.path.join(gettempdir(), "KwaveIN.h5"),
|
|
571
|
+
output_filename=os.path.join(gettempdir(), "KwaveOUT.h5")
|
|
564
572
|
)
|
|
565
573
|
|
|
566
574
|
execution_options = SimulationExecutionOptions(
|
|
@@ -570,12 +578,12 @@ class AcousticField(ABC):
|
|
|
570
578
|
)
|
|
571
579
|
|
|
572
580
|
# --- 7. Call specialized function to set up source.p_mask and source.p ---
|
|
573
|
-
self._SetUpSource(source, Nx, dx,
|
|
581
|
+
self._SetUpSource(source, Nx, dx, factorT)
|
|
574
582
|
|
|
575
583
|
# --- 8. Run simulation ---
|
|
576
584
|
sensor_data = kspaceFirstOrder2D(
|
|
577
585
|
kgrid=kgrid,
|
|
578
|
-
medium=
|
|
586
|
+
medium=medium,
|
|
579
587
|
source=source,
|
|
580
588
|
sensor=sensor,
|
|
581
589
|
simulation_options=simulation_options,
|
|
@@ -584,7 +592,11 @@ class AcousticField(ABC):
|
|
|
584
592
|
|
|
585
593
|
# --- 9. Post-process results ---
|
|
586
594
|
data = sensor_data['p'].reshape(kgrid.Nt, Nz, Nx)
|
|
587
|
-
|
|
595
|
+
|
|
596
|
+
if factorT != 1 or factorX != 1 or factorZ != 1:
|
|
597
|
+
return reshape_field(data, [factorT, factorX, factorZ])
|
|
598
|
+
else:
|
|
599
|
+
return data
|
|
588
600
|
|
|
589
601
|
except Exception as e:
|
|
590
602
|
print(f"Error generating 2D acoustic field: {e}")
|
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.
|
|
88
|
+
__version__ = '2.9.374'
|
|
89
89
|
__process__ = config.get_process()
|
|
90
90
|
|
|
91
91
|
def initialize(process=None):
|
|
@@ -233,6 +233,8 @@ def initialize(process=None):
|
|
|
233
233
|
|
|
234
234
|
|
|
235
235
|
|
|
236
|
+
|
|
237
|
+
|
|
236
238
|
|
|
237
239
|
|
|
238
240
|
|
|
@@ -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=eegeRt9p4KDthViG3c8Q2wMit5HW0lYzfCC2O36Rm2w,4410
|
|
4
4
|
AOT_biomaps/AOT_Acoustic/AcousticEnums.py,sha256=s5kXa6jKzbS4btwbubrVcynLOr0yg5tth5vL_FGfbMk,1802
|
|
5
5
|
AOT_biomaps/AOT_Acoustic/AcousticTools.py,sha256=7kuWIIGyzZPQrzRI0zVvdwNUp7qKUE67yCYOMzSb0Ug,8283
|
|
6
6
|
AOT_biomaps/AOT_Acoustic/FocusedWave.py,sha256=3kGKKDx_3Msy5COYqIwzROPORGWvNjw8UsDanBfkMXE,11037
|
|
@@ -8,7 +8,7 @@ AOT_biomaps/AOT_Acoustic/IrregularWave.py,sha256=yZhtxkR6zlciRcEpdTR0BAhvgQl40XH
|
|
|
8
8
|
AOT_biomaps/AOT_Acoustic/PlaneWave.py,sha256=xza-rj5AUWDecLkGDxRcULrwZVWeBvGnEP2d51TyR04,1447
|
|
9
9
|
AOT_biomaps/AOT_Acoustic/StructuredWave.py,sha256=DRTjD-zrmX12FHrvwOeEo-Rk1fHYm9gfCcebz4WhtXc,18930
|
|
10
10
|
AOT_biomaps/AOT_Acoustic/__init__.py,sha256=t9M2rRqa_L9pk7W2FeELTkHEMuP4DBr4gBRldMqsQbg,491
|
|
11
|
-
AOT_biomaps/AOT_Acoustic/_mainAcoustic.py,sha256=
|
|
11
|
+
AOT_biomaps/AOT_Acoustic/_mainAcoustic.py,sha256=5QKOZBpeuNCFCzQHYF0kwtUZxaBjAIWc7BQf0vgVAh8,46710
|
|
12
12
|
AOT_biomaps/AOT_Experiment/ExperimentTools.py,sha256=aFvJw6J_jfFVTDFnG7J3a61SHEgORdZKZS0UI82VMaY,2637
|
|
13
13
|
AOT_biomaps/AOT_Experiment/Focus.py,sha256=B2nBawmv-NG2AWJx9zgQ8GlN6aFB9FwTSqX-M-phKXg,3193
|
|
14
14
|
AOT_biomaps/AOT_Experiment/Tomography.py,sha256=9mJDwV9WVphoX8drL7MgN3WhS6fjYwS6HWQD3x1CrVs,37625
|
|
@@ -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.
|
|
46
|
-
aot_biomaps-2.9.
|
|
47
|
-
aot_biomaps-2.9.
|
|
48
|
-
aot_biomaps-2.9.
|
|
45
|
+
aot_biomaps-2.9.374.dist-info/METADATA,sha256=UbVZd3QiaNI5Hod1HgbgEoA-L4uBi7-Jh4NhQa4-HJs,700
|
|
46
|
+
aot_biomaps-2.9.374.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
47
|
+
aot_biomaps-2.9.374.dist-info/top_level.txt,sha256=6STF-lT4kaAnBHJYCripmN5mZABoHjMuY689JdiDphk,12
|
|
48
|
+
aot_biomaps-2.9.374.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|