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

ultra_driver output is 1 RF line, whereas estimate_disp expects a matrix of RF data #16

Open
xufeic opened this issue Aug 25, 2021 · 3 comments
Assignees

Comments

@xufeic
Copy link

xufeic commented Aug 25, 2021

Dear Professor Palmeri,

Thank you for creating such nice projects and letting everyone use them!

I succeeded to simulate some shear wave propagations thanks to your other repo. And now I would like to simulate the imaging part that tracks the shear waves.

I ran the ultra_driver.m as I downloaded from your repo. It ran smoothly, however, only output one RF line (45904*1) and one t0 value (0). I was expecting 192 RF lines since the linear array probe file (probe_linear_template.txt) states 192 elements, and the estimate_disp.m takes as input a matrix of RF data (which is logical to me).

I tried to debug and wondered if it has something to do with:
PARAMS.XSTEP = 0; % Azimuth step size (m);
PARAMS.XMAX= 0; % Rightmost scan line (m)

I then tried with these values (deduced from probe_linear_template.txt):
PARAMS.XSTEP = 0.0002; % kerf+width
PARAMS.XMAX= 0.0002*191+0.00018; % (kerf+width)*191+width
However, after some steps (around for the 147th line), I got an apodization problem and the code stopped to run.

Could you please help me with some indications to have as output a matrix of RF data?

Thank you very much,
Xufei

@mlp6
Copy link
Owner

mlp6 commented Aug 25, 2021

You are correct in your assessment of XSTEP and XMAX; those will define your scan lines. This code is not generating channel data for you; it is beamformed data at the "x" positions (along the length of the transducer) that you specify in step size and a max, assuming 0 is the center of the array.

With respect to your error, can you post the exact output here?

@mlp6 mlp6 self-assigned this Aug 25, 2021
@mlp6
Copy link
Owner

mlp6 commented Aug 25, 2021

In re-reading your question, it may be that XMAX has exceeded the size of the aperture, based on the physical extended defined by the number of elements (it looks like you're specifying going 50% beyond the actual array size since 0 is the middle of the array).

@xufeic
Copy link
Author

xufeic commented Aug 25, 2021

Thank you very much for your reply and for the information! I understand better now.

In this case, I should also change XMIN in addition to XSTEP and XMAX, for example:

PARAMS.XMIN=-(0.0002*191+0.00018)/2;
PARAMS.XSTEP=0.0002;
PARAMS.XMAX=(0.0002*191+0.00018)/2;

I reran part of the simulation and it seems to solve my problem! I will continue running the entire simulation. Thank you very much for your help!!

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