thorstone25 / qups

A MATLAB toolbox for prototyping and simulating diagnostic ultrasound imaging systems
Apache License 2.0
38 stars 20 forks source link

Beam Pattern Support #31

Open thorstone25 opened 4 months ago

thorstone25 commented 4 months ago

Computing the beam pattern seems to be a very useful feature. It can be used for analyzing a custom Transducer or defining default apodization schemes.

FieldII has calc_hp for this. MUST computes the beam pattern via pfield or pfield3. k-Wave would require just recording p_max(x,y,z) throughout the field rather than p(x=x0,y=y0,z=z0,t) at the transducer surface over time.

To implement this per simulator, one needs to:

  1. Expand the existing respective function to take an input to compute echo (default) or field and select the aperture tx (default) or rx.
  2. Make a branch (i.e. if-else or switch-case) to preserve the existing functionality
  3. Forward the relevant arguments to the field simulator
    • For FieldII / MUST, that means us.scan.positions to calc_hp or pfield
    • For k-Wave that means sensor.record = 'p_max' and bypassing the receive aperture post-processing
  4. Return a regular array instead of ChannelData defined on us.scan (like the beamforming functions).
  5. Update the documentation
l-l-z commented 4 months ago

I have some code working for Field II. Will clean it up later and add documentation 😃