fullwave25 1.0.7__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.
Potentially problematic release.
This version of fullwave25 might be problematic. Click here for more details.
- fullwave/__init__.py +28 -0
- fullwave/constants/__init__.py +5 -0
- fullwave/constants/material_properties.py +112 -0
- fullwave/grid.py +222 -0
- fullwave/medium.py +1042 -0
- fullwave/medium_builder/__init__.py +12 -0
- fullwave/medium_builder/domain.py +151 -0
- fullwave/medium_builder/medium_builder.py +198 -0
- fullwave/medium_builder/presets/__init__.py +8 -0
- fullwave/medium_builder/presets/data/.keep +0 -0
- fullwave/medium_builder/presets/data/abdominal_wall/i2365f_etfw1.mat +0 -0
- fullwave/medium_builder/presets/domain_abdominal_wall.py +293 -0
- fullwave/medium_builder/presets/domain_background.py +140 -0
- fullwave/medium_builder/presets/domain_scatterer.py +179 -0
- fullwave/medium_builder/presets/domain_simple.py +92 -0
- fullwave/medium_builder/presets/domain_water_gel.py +1 -0
- fullwave/sensor.py +161 -0
- fullwave/solver/__init__.py +1 -0
- fullwave/solver/bins/database/relaxation_params_database_num_relax=2_20251027_1437.mat +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenu +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_100_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_101_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_120_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_61_cuda118 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_61_cuda124 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_61_cuda126 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_61_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_70_cuda118 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_70_cuda124 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_70_cuda126 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_70_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_75_cuda118 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_75_cuda124 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_75_cuda126 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_75_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_80_cuda118 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_80_cuda124 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_80_cuda126 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_80_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_86_cuda118 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_86_cuda124 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_86_cuda126 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_86_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_89_cuda118 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_89_cuda126 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_89_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_90_cuda118 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_90_cuda124 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_90_cuda126 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/2d/fullwave2_2d_exponential_attenuation_gpu_sm_90_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_100_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_101_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_120_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_61_cuda118 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_61_cuda124 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_61_cuda126 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_61_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_70_cuda118 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_70_cuda124 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_70_cuda126 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_70_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_75_cuda118 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_75_cuda124 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_75_cuda126 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_75_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_80_cuda118 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_80_cuda124 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_80_cuda126 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_80_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_86_cuda118 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_86_cuda124 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_86_cuda126 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_86_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_89_cuda118 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_89_cuda124 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_89_cuda126 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_89_cuda129 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_90_cuda118 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_90_cuda124 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_90_cuda126 +0 -0
- fullwave/solver/bins/exponential_attenuation/gpu/3d/fullwave2_3d_exponential_attenuation_gpu_sm_90_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_100_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_101_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_120_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_61_cuda118 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_61_cuda124 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_61_cuda126 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_61_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_70_cuda118 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_70_cuda124 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_70_cuda126 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_70_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_75_cuda118 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_75_cuda124 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_75_cuda126 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_75_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_80_cuda118 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_80_cuda124 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_80_cuda126 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_80_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_86_cuda118 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_86_cuda124 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_86_cuda126 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_86_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_89_cuda118 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_89_cuda124 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_89_cuda126 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_89_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_90_cuda118 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_90_cuda124 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_90_cuda126 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_isotropic_multi_gpu_sm_90_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_100_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_101_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_120_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_61_cuda118 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_61_cuda124 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_61_cuda126 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_61_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_70_cuda118 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_70_cuda124 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_70_cuda126 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_70_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_75_cuda118 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_75_cuda124 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_75_cuda126 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_75_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_80_cuda118 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_80_cuda124 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_80_cuda126 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_80_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_86_cuda118 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_86_cuda124 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_86_cuda126 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_86_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_89_cuda118 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_89_cuda124 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_89_cuda126 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_89_cuda129 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_90_cuda118 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_90_cuda124 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_90_cuda126 +0 -0
- fullwave/solver/bins/gpu/2d/num_relax=2/fullwave2_2d_2_relax_multi_gpu_sm_90_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_100_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_101_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_120_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_61_cuda118 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_61_cuda124 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_61_cuda126 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_61_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_70_cuda118 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_70_cuda124 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_70_cuda126 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_70_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_75_cuda118 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_75_cuda124 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_75_cuda126 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_75_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_80_cuda118 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_80_cuda124 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_80_cuda126 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_80_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_86_cuda118 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_86_cuda124 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_86_cuda126 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_86_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_89_cuda118 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_89_cuda124 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_89_cuda126 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_89_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_90_cuda118 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_90_cuda124 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_90_cuda126 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_isotropic_multi_gpu_sm_90_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_100_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_101_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_120_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_61_cuda118 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_61_cuda124 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_61_cuda126 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_61_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_70_cuda118 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_70_cuda124 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_70_cuda126 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_70_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_75_cuda118 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_75_cuda124 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_75_cuda126 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_75_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_80_cuda118 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_80_cuda124 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_80_cuda126 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_80_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_86_cuda118 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_86_cuda124 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_86_cuda126 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_86_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_89_cuda118 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_89_cuda124 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_89_cuda126 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_89_cuda129 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_90_cuda118 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_90_cuda124 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_90_cuda126 +0 -0
- fullwave/solver/bins/gpu/3d/num_relax=2/fullwave2_3d_2_relax_multi_gpu_sm_90_cuda129 +0 -0
- fullwave/solver/cuda_utils.py +392 -0
- fullwave/solver/input_file_writer.py +853 -0
- fullwave/solver/launcher.py +134 -0
- fullwave/solver/pml_builder.py +1923 -0
- fullwave/solver/solver.py +750 -0
- fullwave/solver/utils.py +83 -0
- fullwave/source.py +173 -0
- fullwave/transducer.py +1003 -0
- fullwave/utils/__init__.py +12 -0
- fullwave/utils/check_functions.py +48 -0
- fullwave/utils/coordinates.py +155 -0
- fullwave/utils/memory_tempfile.py +439 -0
- fullwave/utils/numerical.py +111 -0
- fullwave/utils/plot_utils.py +1122 -0
- fullwave/utils/pulse.py +72 -0
- fullwave/utils/relaxation_parameters.py +212 -0
- fullwave/utils/signal_process.py +197 -0
- fullwave25-1.0.7.dist-info/METADATA +292 -0
- fullwave25-1.0.7.dist-info/RECORD +225 -0
- fullwave25-1.0.7.dist-info/WHEEL +4 -0
fullwave/utils/pulse.py
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"""Module for generating pulse signals used in the Fullwave simulation."""
|
|
2
|
+
|
|
3
|
+
import numpy as np
|
|
4
|
+
from numpy.typing import NDArray
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def gaussian_modulated_sinusoidal_signal(
|
|
8
|
+
nt: int,
|
|
9
|
+
duration: float,
|
|
10
|
+
ncycles: int,
|
|
11
|
+
drop_off: int,
|
|
12
|
+
f0: float,
|
|
13
|
+
p0: float,
|
|
14
|
+
delay_sec: float = 0.0,
|
|
15
|
+
i_layer: int | None = None,
|
|
16
|
+
dt_for_layer_delay: float | None = None,
|
|
17
|
+
cfl_for_layer_delay: float | None = None,
|
|
18
|
+
) -> NDArray[np.float64]:
|
|
19
|
+
"""Generate a pulse signal based on input parameters.
|
|
20
|
+
|
|
21
|
+
Parameters
|
|
22
|
+
----------
|
|
23
|
+
nt: int
|
|
24
|
+
Number of time samples of the simulation.
|
|
25
|
+
duration: float
|
|
26
|
+
Total duration of the simulation.
|
|
27
|
+
ncycles: int
|
|
28
|
+
Number of cycles in the pulse.
|
|
29
|
+
drop_off: int
|
|
30
|
+
Controls the pulse decay.
|
|
31
|
+
f0: float
|
|
32
|
+
Frequency of the pulse.
|
|
33
|
+
p0: float
|
|
34
|
+
Amplitude scaling factor.
|
|
35
|
+
delay_sec: float
|
|
36
|
+
Delay in seconds. Default is 0.0.
|
|
37
|
+
i_layer: int
|
|
38
|
+
Index of the layer where the source is located. Default is None.
|
|
39
|
+
This variable is used to shift the pulse signal in time
|
|
40
|
+
so that the signal is emmitted within the transducer layer correctly.
|
|
41
|
+
dt_for_layer_delay: float
|
|
42
|
+
Time step of the simulation. Default is None.
|
|
43
|
+
This variable is used to shift the pulse signal in time
|
|
44
|
+
so that the signal is emmitted within the transducer layer correctly.
|
|
45
|
+
cfl_for_layer_delay: float
|
|
46
|
+
Courant-Friedrichs-Lewy number. Default is None.
|
|
47
|
+
This variable is used to shift the pulse signal in time
|
|
48
|
+
so that the signal is emmitted within the transducer layer correctly.
|
|
49
|
+
|
|
50
|
+
Returns
|
|
51
|
+
-------
|
|
52
|
+
NDArray[np.float64]: The generated pulse signal.
|
|
53
|
+
|
|
54
|
+
"""
|
|
55
|
+
t = (np.arange(0, nt)) / nt * duration - ncycles / f0
|
|
56
|
+
t = t - delay_sec
|
|
57
|
+
|
|
58
|
+
if i_layer:
|
|
59
|
+
assert dt_for_layer_delay, "dt must be provided if i_layer is provided"
|
|
60
|
+
assert cfl_for_layer_delay, "cfl must be provided if i_layer is provided"
|
|
61
|
+
t = t - (dt_for_layer_delay / cfl_for_layer_delay) * i_layer
|
|
62
|
+
|
|
63
|
+
omega0 = 2 * np.pi * f0
|
|
64
|
+
return (
|
|
65
|
+
np.multiply(
|
|
66
|
+
np.exp(
|
|
67
|
+
-((1.05 * t * omega0 / (ncycles * np.pi)) ** (2 * drop_off)),
|
|
68
|
+
),
|
|
69
|
+
np.sin(t * omega0),
|
|
70
|
+
)
|
|
71
|
+
* p0
|
|
72
|
+
)
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"""Module for generating relaxation parameters.
|
|
2
|
+
|
|
3
|
+
using a precomputed lookup table and input attenuation values.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import warnings
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
import numpy as np
|
|
10
|
+
from numpy.typing import NDArray
|
|
11
|
+
from scipy.io import loadmat
|
|
12
|
+
|
|
13
|
+
from fullwave.solver.utils import initialize_relaxation_param_dict
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _map_parameters_search(
|
|
17
|
+
input_tensor: NDArray[np.float64],
|
|
18
|
+
look_up_table: NDArray[np.float64],
|
|
19
|
+
alpha_list: NDArray[np.float64],
|
|
20
|
+
power_list: NDArray[np.float64],
|
|
21
|
+
) -> NDArray[np.float64]:
|
|
22
|
+
"""Map (nx, ny, 2) input tensor to (nx, ny, 11) using LUT.
|
|
23
|
+
|
|
24
|
+
Parameters
|
|
25
|
+
----------
|
|
26
|
+
input_tensor: NDArray[np.float64]
|
|
27
|
+
Normalized input tensor [0, 1]^2
|
|
28
|
+
look_up_table: NDArray[np.float64]
|
|
29
|
+
Precomputed parameter table shape (B1, B2, 4 * n_relaxation + 2)
|
|
30
|
+
alpha_list: NDArray[np.float64]
|
|
31
|
+
List of alpha values for the lookup table.
|
|
32
|
+
power_list: NDArray[np.float64]
|
|
33
|
+
List of power values for the lookup table.
|
|
34
|
+
|
|
35
|
+
Returns
|
|
36
|
+
-------
|
|
37
|
+
NDArray[np.float64]
|
|
38
|
+
Output tensor with shape (nx, ny, 4 * n_relaxation + 2)
|
|
39
|
+
|
|
40
|
+
"""
|
|
41
|
+
# search nearest in alpha_list and power_list.
|
|
42
|
+
# alpha is in input_tensor[:, :, 0]
|
|
43
|
+
# power is in input_tensor[:, :, 1]
|
|
44
|
+
# the index corresponds to lookup table
|
|
45
|
+
alpha_index = np.searchsorted(alpha_list[0].round(10), input_tensor[..., 0])
|
|
46
|
+
power_index = np.searchsorted(power_list[0].round(10), input_tensor[..., 1])
|
|
47
|
+
# Clip indices to valid range
|
|
48
|
+
alpha_index = np.clip(alpha_index, 0, len(alpha_list[0]) - 1)
|
|
49
|
+
power_index = np.clip(power_index, 0, len(power_list[0]) - 1)
|
|
50
|
+
# Advanced indexing for 2D parameter space
|
|
51
|
+
return look_up_table[alpha_index, power_index, :]
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def generate_relaxation_params(
|
|
55
|
+
alpha_coeff: NDArray[np.float64],
|
|
56
|
+
alpha_power: NDArray[np.float64],
|
|
57
|
+
n_relaxation_mechanisms: int = 2,
|
|
58
|
+
path_database: Path = Path(__file__).parent
|
|
59
|
+
/ "bins"
|
|
60
|
+
/ "relaxation_params_database_num_relax=2_20251027_1437.mat",
|
|
61
|
+
) -> dict[str, NDArray[np.float64]]:
|
|
62
|
+
"""Generate relaxation parameters using a precomputed lookup table and input attenuation values.
|
|
63
|
+
|
|
64
|
+
The binning of the attenuation value depends
|
|
65
|
+
on the number of bins used to generate the lookup table.
|
|
66
|
+
|
|
67
|
+
Parameters
|
|
68
|
+
----------
|
|
69
|
+
alpha_coeff : NDArray[np.float64]
|
|
70
|
+
Array of attenuation coefficients.
|
|
71
|
+
alpha_power : NDArray[np.float64]
|
|
72
|
+
Array of attenuation power values.
|
|
73
|
+
n_relaxation_mechanisms : int, optional
|
|
74
|
+
Number of relaxation mechanisms (default is 4).
|
|
75
|
+
path_database : Path, optional
|
|
76
|
+
Path to the relaxation parameters database.
|
|
77
|
+
|
|
78
|
+
Returns
|
|
79
|
+
-------
|
|
80
|
+
dict[str, NDArray[np.float64]]
|
|
81
|
+
A dictionary containing the computed relaxation parameters.
|
|
82
|
+
|
|
83
|
+
"""
|
|
84
|
+
relaxation_parameters_generator = RelaxationParametersGenerator(
|
|
85
|
+
n_relaxation_mechanisms=n_relaxation_mechanisms,
|
|
86
|
+
path_database=path_database,
|
|
87
|
+
)
|
|
88
|
+
return relaxation_parameters_generator.generate(alpha_coeff, alpha_power)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class RelaxationParametersGenerator:
|
|
92
|
+
"""Class for generating relaxation parameters."""
|
|
93
|
+
|
|
94
|
+
def __init__(
|
|
95
|
+
self,
|
|
96
|
+
*,
|
|
97
|
+
n_relaxation_mechanisms: int = 2,
|
|
98
|
+
path_database: Path = Path(__file__).parent
|
|
99
|
+
/ "bins"
|
|
100
|
+
/ "database"
|
|
101
|
+
/ "relaxation_params_database_num_relax=2_20251027_1437.mat",
|
|
102
|
+
) -> None:
|
|
103
|
+
"""Initialize the relaxation parameters generator.
|
|
104
|
+
|
|
105
|
+
Parameters
|
|
106
|
+
----------
|
|
107
|
+
n_relaxation_mechanisms : int, optional
|
|
108
|
+
Number of relaxation mechanisms (default is 4).
|
|
109
|
+
path_database : Path, optional
|
|
110
|
+
Path to the relaxation parameters database.
|
|
111
|
+
|
|
112
|
+
Raises
|
|
113
|
+
------
|
|
114
|
+
FileNotFoundError
|
|
115
|
+
If the relaxation parameters database is not found at the specified path.
|
|
116
|
+
|
|
117
|
+
"""
|
|
118
|
+
if not path_database.exists():
|
|
119
|
+
error_msg = f"Relaxation parameters database not found at {path_database}."
|
|
120
|
+
raise FileNotFoundError(error_msg)
|
|
121
|
+
|
|
122
|
+
self.n_relaxation_mechanisms = n_relaxation_mechanisms
|
|
123
|
+
self.path_database = path_database
|
|
124
|
+
|
|
125
|
+
self.database = loadmat(self.path_database)
|
|
126
|
+
self.look_up_table = self.database["database"]
|
|
127
|
+
self.alpha_list = self.database["alpha_0_list"]
|
|
128
|
+
self.power_list = self.database["power_list"]
|
|
129
|
+
self.alpha_min = self.alpha_list.min()
|
|
130
|
+
self.alpha_max = self.alpha_list.max()
|
|
131
|
+
self.power_min = self.power_list.min()
|
|
132
|
+
self.power_max = self.power_list.max().round(4)
|
|
133
|
+
|
|
134
|
+
self._check_database()
|
|
135
|
+
|
|
136
|
+
def _check_database(self) -> None:
|
|
137
|
+
"""Check the integrity of the lookup table.
|
|
138
|
+
|
|
139
|
+
Raises
|
|
140
|
+
------
|
|
141
|
+
ValueError: If the lookup table is not 3-dimensional.
|
|
142
|
+
ValueError: If the lookup table does not have (4 * n_relaxation_mechanisms + 2) columns.
|
|
143
|
+
ValueError: If the lookup table contains NaN values.
|
|
144
|
+
|
|
145
|
+
"""
|
|
146
|
+
if self.look_up_table.ndim != 3:
|
|
147
|
+
error_msg = "look_up_table must have 3 dimensions."
|
|
148
|
+
raise ValueError(error_msg)
|
|
149
|
+
if self.look_up_table.shape[2] != 4 * self.n_relaxation_mechanisms + 2:
|
|
150
|
+
error_msg = "look_up_table must have 4 * n_relaxation_mechanisms + 2 columns."
|
|
151
|
+
raise ValueError(error_msg)
|
|
152
|
+
if np.isnan(self.look_up_table).any():
|
|
153
|
+
error_msg = "look_up_table must not contain NaN values."
|
|
154
|
+
raise ValueError(error_msg)
|
|
155
|
+
|
|
156
|
+
def generate(
|
|
157
|
+
self,
|
|
158
|
+
alpha_coeff: NDArray[np.float64],
|
|
159
|
+
alpha_power: NDArray[np.float64],
|
|
160
|
+
) -> dict[str, NDArray[np.float64]]:
|
|
161
|
+
"""Generate relaxation parameters based on attenuation values.
|
|
162
|
+
|
|
163
|
+
Parameters
|
|
164
|
+
----------
|
|
165
|
+
alpha_coeff : NDArray[np.float64]
|
|
166
|
+
Array of attenuation coefficients.
|
|
167
|
+
alpha_power : NDArray[np.float64]
|
|
168
|
+
Array of attenuation power values.
|
|
169
|
+
|
|
170
|
+
Returns
|
|
171
|
+
-------
|
|
172
|
+
dict[str, NDArray[np.float64]]
|
|
173
|
+
A dictionary containing the computed relaxation parameters.
|
|
174
|
+
|
|
175
|
+
"""
|
|
176
|
+
if np.any(alpha_coeff < self.alpha_min) or np.any(alpha_power < self.power_min):
|
|
177
|
+
error_msg = (
|
|
178
|
+
"attenuation is out of range."
|
|
179
|
+
"the out-of-range values will be clipped to the min value."
|
|
180
|
+
f"alpha minimum: {self.alpha_min}, "
|
|
181
|
+
f"power minimum: {self.power_min}"
|
|
182
|
+
)
|
|
183
|
+
warnings.warn(error_msg, UserWarning, stacklevel=2)
|
|
184
|
+
if np.any(alpha_coeff > self.alpha_max) or np.any(alpha_power > self.power_max):
|
|
185
|
+
error_msg = (
|
|
186
|
+
"attenuation is out of range."
|
|
187
|
+
"the out-of-range values will be clipped to the max value."
|
|
188
|
+
f"alpha maximum: {self.alpha_max}, "
|
|
189
|
+
f"power maximum: {self.power_max}"
|
|
190
|
+
)
|
|
191
|
+
warnings.warn(error_msg, UserWarning, stacklevel=2)
|
|
192
|
+
|
|
193
|
+
alpha_coeff = np.clip(alpha_coeff, self.alpha_min, self.alpha_max)
|
|
194
|
+
alpha_power = np.clip(alpha_power, self.power_min, self.power_max)
|
|
195
|
+
|
|
196
|
+
# # Normalize to [0, 1] for the lookup table
|
|
197
|
+
# alpha_coeff = (alpha_coeff - self.alpha_min) / (self.alpha_max - self.alpha_min)
|
|
198
|
+
# alpha_power = (alpha_power - self.power_min) / (self.power_max - self.power_min)
|
|
199
|
+
|
|
200
|
+
input_data = np.stack([alpha_coeff, alpha_power], axis=-1)
|
|
201
|
+
# output = _map_parameters(input_data, self.look_up_table, self.alpha_list, self.power_list)
|
|
202
|
+
output = _map_parameters_search(
|
|
203
|
+
input_data,
|
|
204
|
+
self.look_up_table,
|
|
205
|
+
self.alpha_list,
|
|
206
|
+
self.power_list,
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
relaxation_param_dict = initialize_relaxation_param_dict(self.n_relaxation_mechanisms)
|
|
210
|
+
for i, key in enumerate(relaxation_param_dict.keys()):
|
|
211
|
+
relaxation_param_dict[key] = output[..., i]
|
|
212
|
+
return relaxation_param_dict
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"""Signal utilities."""
|
|
2
|
+
|
|
3
|
+
import numpy as np
|
|
4
|
+
from numpy.typing import NDArray
|
|
5
|
+
|
|
6
|
+
from fullwave.grid import Grid
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def signed_power_compression(x: NDArray[np.float64], power: float = 1 / 3) -> NDArray[np.float64]:
|
|
10
|
+
"""Apply signed power compression to the input array.
|
|
11
|
+
|
|
12
|
+
The function applies a power compression to the absolute value of the input array,
|
|
13
|
+
while preserving the sign of the original values.
|
|
14
|
+
|
|
15
|
+
Parameters
|
|
16
|
+
----------
|
|
17
|
+
x: NDArray[np.float32]
|
|
18
|
+
Input array to apply power compression to.
|
|
19
|
+
power: float
|
|
20
|
+
Power compression factor. Default is 1/3.
|
|
21
|
+
|
|
22
|
+
Returns
|
|
23
|
+
-------
|
|
24
|
+
NDArray[np.float32]
|
|
25
|
+
Array with power compression applied.
|
|
26
|
+
|
|
27
|
+
"""
|
|
28
|
+
return np.sign(x) * np.abs(x) ** power
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def reshape_whole_sensor_to_nx_ny_nt(
|
|
32
|
+
sensor_output: NDArray[np.float64],
|
|
33
|
+
grid: Grid,
|
|
34
|
+
) -> NDArray[np.float64]:
|
|
35
|
+
"""Reshape sensor output to nx, ny, nt.
|
|
36
|
+
|
|
37
|
+
Parameters
|
|
38
|
+
----------
|
|
39
|
+
sensor_output: NDArray[np.float64]
|
|
40
|
+
Sensor output.
|
|
41
|
+
grid: Grid
|
|
42
|
+
Grid instance.
|
|
43
|
+
|
|
44
|
+
Returns
|
|
45
|
+
-------
|
|
46
|
+
NDArray[np.float64]
|
|
47
|
+
Sensor output reshaped to [nx, ny, nt]
|
|
48
|
+
|
|
49
|
+
"""
|
|
50
|
+
return sensor_output.reshape((grid.ny, grid.nx, sensor_output.shape[-1])).transpose(
|
|
51
|
+
1,
|
|
52
|
+
0,
|
|
53
|
+
2,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def reshape_whole_sensor_to_nt_nx_ny(
|
|
58
|
+
sensor_output: NDArray[np.float64],
|
|
59
|
+
grid: Grid = None,
|
|
60
|
+
nx: int | None = None,
|
|
61
|
+
ny: int | None = None,
|
|
62
|
+
*,
|
|
63
|
+
use_grid: bool = True,
|
|
64
|
+
) -> NDArray[np.float64]:
|
|
65
|
+
"""Reshape sensor output to nt, nx, ny.
|
|
66
|
+
|
|
67
|
+
Parameters
|
|
68
|
+
----------
|
|
69
|
+
sensor_output: NDArray[np.float64]
|
|
70
|
+
Sensor output.
|
|
71
|
+
grid: Grid
|
|
72
|
+
Grid instance.
|
|
73
|
+
nx: int | None
|
|
74
|
+
Number of grid points in x direction. If None, will use grid.nx.
|
|
75
|
+
ny: int | None
|
|
76
|
+
Number of grid points in y direction. If None, will use grid.ny.
|
|
77
|
+
use_grid: bool
|
|
78
|
+
If True, will use grid.nx and grid.ny. If False, will use nx and ny parameters.
|
|
79
|
+
Default is True.
|
|
80
|
+
|
|
81
|
+
Raises
|
|
82
|
+
------
|
|
83
|
+
ValueError
|
|
84
|
+
If neither grid nor both nx and ny are provided.
|
|
85
|
+
|
|
86
|
+
Returns
|
|
87
|
+
-------
|
|
88
|
+
NDArray[np.float64]
|
|
89
|
+
Sensor output reshaped to [nt, nx, ny]
|
|
90
|
+
|
|
91
|
+
"""
|
|
92
|
+
if grid is not None and (nx is not None or ny is not None):
|
|
93
|
+
error_msg = "Either grid or both nx and ny must be provided, not both."
|
|
94
|
+
raise ValueError(error_msg)
|
|
95
|
+
|
|
96
|
+
if use_grid:
|
|
97
|
+
nx = grid.nx
|
|
98
|
+
ny = grid.ny
|
|
99
|
+
elif nx is None or ny is None:
|
|
100
|
+
error_msg = "Either grid or both nx and ny must be provided."
|
|
101
|
+
raise ValueError(error_msg)
|
|
102
|
+
else:
|
|
103
|
+
nx = int(nx)
|
|
104
|
+
ny = int(ny)
|
|
105
|
+
return sensor_output.reshape((nx, ny, sensor_output.shape[-1])).transpose(
|
|
106
|
+
2,
|
|
107
|
+
0,
|
|
108
|
+
1,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
# def reshape_whole_sensor_to_nt_nx_ny_nz(
|
|
113
|
+
# sensor_output: NDArray[np.float64],
|
|
114
|
+
# grid: Grid,
|
|
115
|
+
# ) -> NDArray[np.float64]:
|
|
116
|
+
# """Reshape sensor output to nt, nx, ny.
|
|
117
|
+
|
|
118
|
+
# Parameters
|
|
119
|
+
# ----------
|
|
120
|
+
# sensor_output: NDArray[np.float64]
|
|
121
|
+
# Sensor output.
|
|
122
|
+
# grid: Grid
|
|
123
|
+
# Grid instance.
|
|
124
|
+
|
|
125
|
+
# Returns
|
|
126
|
+
# -------
|
|
127
|
+
# NDArray[np.float64]
|
|
128
|
+
# Sensor output reshaped to [nt, nx, ny]
|
|
129
|
+
|
|
130
|
+
# """
|
|
131
|
+
# return sensor_output.reshape((grid.nz, grid.ny, grid.nx, sensor_output.shape[-1])).transpose(
|
|
132
|
+
# 3,
|
|
133
|
+
# 2,
|
|
134
|
+
# 1,
|
|
135
|
+
# 0,
|
|
136
|
+
# )
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def reshape_whole_sensor_to_nt_nx_ny_nz(
|
|
140
|
+
sensor_output: NDArray[np.float64],
|
|
141
|
+
grid: Grid = None,
|
|
142
|
+
nx: int | None = None,
|
|
143
|
+
ny: int | None = None,
|
|
144
|
+
nz: int | None = None,
|
|
145
|
+
*,
|
|
146
|
+
use_grid: bool = True,
|
|
147
|
+
) -> NDArray[np.float64]:
|
|
148
|
+
"""Reshape sensor output to nt, nx, ny.
|
|
149
|
+
|
|
150
|
+
Parameters
|
|
151
|
+
----------
|
|
152
|
+
sensor_output: NDArray[np.float64]
|
|
153
|
+
Sensor output.
|
|
154
|
+
grid: Grid
|
|
155
|
+
Grid instance.
|
|
156
|
+
nx: int | None
|
|
157
|
+
Number of grid points in x direction. If None, will use grid.nx.
|
|
158
|
+
ny: int | None
|
|
159
|
+
Number of grid points in y direction. If None, will use grid.ny.
|
|
160
|
+
nz: int | None
|
|
161
|
+
Number of grid points in z direction. If None, will use grid.nz.
|
|
162
|
+
use_grid: bool
|
|
163
|
+
If True, will use grid.nx and grid.ny. If False, will use nx and ny parameters.
|
|
164
|
+
Default is True.
|
|
165
|
+
|
|
166
|
+
Raises
|
|
167
|
+
------
|
|
168
|
+
ValueError
|
|
169
|
+
If neither grid nor both nx and ny are provided.
|
|
170
|
+
|
|
171
|
+
Returns
|
|
172
|
+
-------
|
|
173
|
+
NDArray[np.float64]
|
|
174
|
+
Sensor output reshaped to [nt, nx, ny]
|
|
175
|
+
|
|
176
|
+
"""
|
|
177
|
+
if grid is not None and (nx is not None or ny is not None):
|
|
178
|
+
error_msg = "Either grid or both nx and ny must be provided, not both."
|
|
179
|
+
raise ValueError(error_msg)
|
|
180
|
+
|
|
181
|
+
if use_grid:
|
|
182
|
+
nx = grid.nx
|
|
183
|
+
ny = grid.ny
|
|
184
|
+
nz = grid.nz
|
|
185
|
+
elif nx is None or ny is None:
|
|
186
|
+
error_msg = "Either grid or both nx and ny must be provided."
|
|
187
|
+
raise ValueError(error_msg)
|
|
188
|
+
else:
|
|
189
|
+
nx = int(nx)
|
|
190
|
+
ny = int(ny)
|
|
191
|
+
nz = int(nz)
|
|
192
|
+
return sensor_output.reshape((nx, ny, nz, sensor_output.shape[-1])).transpose(
|
|
193
|
+
3,
|
|
194
|
+
0,
|
|
195
|
+
1,
|
|
196
|
+
2,
|
|
197
|
+
)
|