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

Examples/at linear array transducer #174

Merged
merged 28 commits into from
Aug 3, 2023

Conversation

waltsims
Copy link
Owner

@waltsims waltsims commented Jul 27, 2023

This PR does the following:

  • add matlab.rem for near-machine-precision modulo operations
  • Fix make time always to have correct length Nt and add test for the failure case

@waltsims waltsims requested a review from faridyagubbayli July 28, 2023 04:02
@waltsims
Copy link
Owner Author

Both examples are tested and run locally. No automated tests yet for OMP execution, but I tested locally.

@waltsims waltsims mentioned this pull request Jul 29, 2023
executor_options = execution_options.get_options_string(sensor=k_sim.sensor)
sensor_data = executor.run_simulation(input_filename, output_filename, options=executor_options)
return k_sim.sensor.combine_sensor_data(sensor_data)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed that you do not cal combine_sensor_data(...) anymore, neither here nor in the run_simulation(...) method. Don't we need it?

Copy link
Owner Author

@waltsims waltsims Jul 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sensor_data is now a dictionary of all variables output from the kspaceFirstOrder executable. Combine sensor data can only be applied to some values in that dictionary. This is the behavior of k-wave in MATLAB as well, where sensor_data is a struct. In the example, an extra call is made to combine_sensor_data(...) on the 'p' variable here. Though this might not be optimal, it allows for greater functionality at the moment and is the behavior of MATLAB.

# Conflicts:
#	examples/bmode_reconstruction_example.py
#	kwave/executor.py
#	kwave/kspaceFirstOrder2D.py
#	kwave/options/simulation_options.py
#	kwave/utils/kwave_array.py
#	tests/test_cpp_running_simulations.py
#	tests/test_ivp_axisymmetric_simulation.py
#	tests/test_ivp_binary_sensor_mask.py
#	tests/test_ivp_comparison_modelling_functions.py
#	tests/test_ivp_heterogeneous_medium.py
#	tests/test_ivp_homogeneous_medium.py
#	tests/test_ivp_loading_external_image.py
#	tests/test_ivp_opposing_corners_sensor_mask.py
#	tests/test_ivp_photoacoustic_waveforms.py
#	tests/test_ivp_sensor_frequency_response.py
#	tests/test_na_controlling_the_PML.py
#	tests/test_na_optimising_performance.py
#	tests/test_pr_2D_FFT_line_sensor.py
#	tests/test_pr_2D_TR_circular_sensor.py
#	tests/test_pr_2D_TR_directional_sensors.py
#	tests/test_pr_2D_TR_line_sensor.py
#	tests/test_pr_3D_FFT_planar_sensor.py
#	tests/test_sd_directional_array_elements.py
#	tests/test_sd_directivity_modelling_2D.py
#	tests/test_sd_directivity_modelling_3D.py
#	tests/test_sd_focussed_detector_2D.py
#	tests/test_sd_sensor_directivity_2D.py
#	tests/test_tvsp_3D_simulation.py
#	tests/test_tvsp_doppler_effect.py
#	tests/test_tvsp_homogeneous_medium_dipole.py
#	tests/test_tvsp_homogeneous_medium_monopole.py
#	tests/test_us_beam_patterns.py
#	tests/test_us_bmode_linear_transducer.py
#	tests/test_us_bmode_phased_array.py
#	tests/test_us_defining_transducer.py
#	tests/test_us_transducer_as_sensor.py
@waltsims waltsims self-assigned this Aug 3, 2023
Copy link
Collaborator

@faridyagubbayli faridyagubbayli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@faridyagubbayli faridyagubbayli merged commit 88541d0 into master Aug 3, 2023
@faridyagubbayli faridyagubbayli deleted the examples/at_linear_array_transducer branch August 3, 2023 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment