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

ENH: implement function to create virtual transducers #32

Open
mekman opened this issue Mar 14, 2024 · 3 comments
Open

ENH: implement function to create virtual transducers #32

mekman opened this issue Mar 14, 2024 · 3 comments
Assignees
Milestone

Comments

@mekman
Copy link
Collaborator

mekman commented Mar 14, 2024

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

example of axial profiles in plots

Large misfit for near-field peaks:
example of plot containing error

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`

@mekman mekman self-assigned this Mar 14, 2024
@mekman
Copy link
Collaborator Author

mekman commented Mar 15, 2024

This is a duplicate of #11 :)

@KTZ228
Copy link
Contributor

KTZ228 commented Apr 18, 2024

This is an adapted version of the tutorial that contains some small changes to account for a transducer with multiple elements. It could be a nice starting point.

@mekman mekman added this to the 0.3.0 release milestone May 30, 2024
@mekman
Copy link
Collaborator Author

mekman commented Jun 4, 2024

@s-hodono

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants