diff --git a/simpa/core/simulation_modules/reconstruction_module/delay_multiply_and_sum_adapter.py b/simpa/core/simulation_modules/reconstruction_module/delay_multiply_and_sum_adapter.py index e4a8678b..05e8ff35 100644 --- a/simpa/core/simulation_modules/reconstruction_module/delay_multiply_and_sum_adapter.py +++ b/simpa/core/simulation_modules/reconstruction_module/delay_multiply_and_sum_adapter.py @@ -50,7 +50,7 @@ def reconstruction_algorithm(self, time_series_sensor_data, detection_geometry: yy, zz, nn, mm = torch.meshgrid(torch.arange(ydim, device=torch_device), torch.arange(zdim, device=torch_device), torch.arange(n_sensor_elements, device=torch_device), - torch.arange(n_sensor_elements, device=torch_device)) + torch.arange(n_sensor_elements, device=torch_device), indexing='ij') M = values[x, yy, zz, nn] * values[x, yy, zz, mm] M = torch.sign(M) * torch.sqrt(torch.abs(M)) # only take upper triangle without diagonal and sum up along n and m axis (last two) diff --git a/simpa/core/simulation_modules/reconstruction_module/reconstruction_utils.py b/simpa/core/simulation_modules/reconstruction_module/reconstruction_utils.py index 1cdb1ae4..3115ea70 100644 --- a/simpa/core/simulation_modules/reconstruction_module/reconstruction_utils.py +++ b/simpa/core/simulation_modules/reconstruction_module/reconstruction_utils.py @@ -542,7 +542,7 @@ def compute_delay_and_sum_values(time_series_sensor_data: Tensor, sensor_positio z = zdim_start + torch.arange(zdim, device=torch_device, dtype=torch.float32) j = torch.arange(n_sensor_elements, device=torch_device, dtype=torch.float32) - xx, yy, zz, jj = torch.meshgrid(x, y, z, j) + xx, yy, zz, jj = torch.meshgrid(x, y, z, j, indexing='ij') jj = jj.long() delays = torch.sqrt((yy * spacing_in_mm - sensor_positions[:, 2][jj]) ** 2 + diff --git a/simpa/core/simulation_modules/reconstruction_module/signed_delay_multiply_and_sum_adapter.py b/simpa/core/simulation_modules/reconstruction_module/signed_delay_multiply_and_sum_adapter.py index bf735f43..7d045040 100644 --- a/simpa/core/simulation_modules/reconstruction_module/signed_delay_multiply_and_sum_adapter.py +++ b/simpa/core/simulation_modules/reconstruction_module/signed_delay_multiply_and_sum_adapter.py @@ -53,7 +53,7 @@ def reconstruction_algorithm(self, time_series_sensor_data, detection_geometry: yy, zz, nn, mm = torch.meshgrid(torch.arange(ydim, device=torch_device), torch.arange(zdim, device=torch_device), torch.arange(n_sensor_elements, device=torch_device), - torch.arange(n_sensor_elements, device=torch_device)) + torch.arange(n_sensor_elements, device=torch_device), indexing='ij') M = values[x, yy, zz, nn] * values[x, yy, zz, mm] M = torch.sign(M) * torch.sqrt(torch.abs(M)) # only take upper triangle without diagonal and sum up along n and m axis (last two)