-
Notifications
You must be signed in to change notification settings - Fork 32
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
Conversation
after collecting values, they are moved to the python_testers directory. This no longer need be done manually.
Both examples are tested and run locally. No automated tests yet for OMP execution, but I tested locally. |
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR does the following:
SimulationOptions
default values to besave_to_disk_exit: bool = False
- Update signature to accept
SumulationOptions
andExecutionOptions
- Executor now returns all values stored in the output.h5 file as
sensor_data
as a dictionary (closes Homogeneous_medium_for sensor only receive signal #46)number_active_elements(self):
property in kTransducer now returnsint
typekwave_array.add_rect_element(self, position, Lx, Ly, theta):
to accept vector types.kspaceFirstOrder3D
always run on GPU, even whenkspaceFirstOrder3DC
is called #159)