simpa
simpa copied to clipboard
Bug: ACOUSTIC_SIMULATION_3D is ignored
In k_wave_acoustic_forward_model there is the following check:
if not self.component_settings.get(Tags.ACOUSTIC_SIMULATION_3D):
detectors_are_aligned_along_x_axis = np.abs(field_of_view[2] - field_of_view[3]) < 1e-5
detectors_are_aligned_along_y_axis = np.abs(field_of_view[0] - field_of_view[1]) < 1e-5
if detectors_are_aligned_along_x_axis or detectors_are_aligned_along_y_axis:
simulate_2d = True
else:
simulate_2d = False
else:
simulate_2d = False
.get() is not defined on sp.Settings, so self.component_settings is accessed with the key ('acoustic_simulation_3d', bool). This will then return a None and potentially set simulate_2D to True, even though it should be False.