-
Notifications
You must be signed in to change notification settings - Fork 10
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
ENH: implement function to create virtual transducers #32
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Aim
Include a new function that allows for the creation of new virtual transducers, based on the watertank measurements. An example on how to do that is currently shown in the PRESTUS tutorial, but the fitting does not work well for certain transducers with a near field peak.
Pseudo-code and figures that illustrate current issue, was provided by @KTZ228
Large misfit for near-field peaks:
![example of plot containing error](https://private-user-images.githubusercontent.com/139282/312932912-bef3425c-193b-4050-8ee8-08c2308678cb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE2NzEzNzEsIm5iZiI6MTcyMTY3MTA3MSwicGF0aCI6Ii8xMzkyODIvMzEyOTMyOTEyLWJlZjM0MjVjLTE5M2ItNDA1MC04ZWU4LTA4YzIzMDg2NzhjYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyMlQxNzU3NTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kOGJkNjBkZWZmYTZlNzZmYWEzNzE4NzQzN2NhN2ZhYjY2NjBjNDgyYjU4YjVlMmZlODhjODVhZDAwMjk3NDVjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.RaC7cymYufIk-8WXPZ-TzTpVNHvKJXQYg-fYxFwPpwY)
Pseudo-code of how function could look like
`% Change path to tuSIM folder
cd /home/affneu/kenvdzee/Documents/PRESTUS
% add paths
addpath('functions')
addpath(genpath('toolboxes'))
addpath('/home/common/matlab/fieldtrip/qsub')
folder_locations.axial_profiles_location_csv = '/home/affneu/kenvdzee/Documents/axial_profiles/'; % link to attached csv folder location
folder_locations.config_location = '/home/affneu/kenvdzee/Documents/acoustic_simulation_scripts/configs/';
folder_locations.output_location = '/home/affneu/kenvdzee/Documents/acoustic_simulation_scripts/'; % For figure output
% Should match the name of the axial profile csv
transducer.name = 'CTX-250-001_250KHz_4-channel';
% Requested transducer behaviour
transducer.desired_peak_intensity_Isppa = 30;
transducer.desired_steering_depth_cm = 54.8;
% Technical input (normally specified in config)
transducer.n_elements: 4 # number of elements in the transducer
transducer.Elements_ID_mm: [0, 30.1788, 42.1388, 51.1088]
transducer.Elements_OD_mm: [29.62, 41.58, 50.55, 57.94]
transducer.curv_radius_mm: 62.94 # radius of curvature of the bowl
transducer.dist_to_plane_mm: 52.38 # distance to the transducer plane from the geometric focus
[source_phase_deg, source_amp] = create_virtual_transducer(transducer, folder_locations, 'run_water_simulations', 1)
% Desired output:
source_phase_deg % Array of 4 phase angles [degrees] such as: [0, 0, 358.0546, 272.2390] (first is always 0)
source_amp % 198300 [Pa] for example
output figures (see example folder)
csv with output:
desired_steering_depth_cm
max intensity at desired steering depth
simulated steering depth_cm
max intensity at simulated steering depth
FLHM center intensity of measured axial profile
FLHM center intensity of simulated axial profile`
The text was updated successfully, but these errors were encountered: