Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: ACOUSTIC_SIMULATION_3D is ignored #223

Open
faberno opened this issue Jul 10, 2023 · 0 comments · Fixed by #251
Open

Bug: ACOUSTIC_SIMULATION_3D is ignored #223

faberno opened this issue Jul 10, 2023 · 0 comments · Fixed by #251
Labels
good first issue Good for newcomers

Comments

@faberno
Copy link
Collaborator

faberno commented Jul 10, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants