simpa icon indicating copy to clipboard operation
simpa copied to clipboard

Bug: ACOUSTIC_SIMULATION_3D is ignored

Open faberno opened this issue 2 years ago • 0 comments

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.

faberno avatar Jul 10 '23 15:07 faberno