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

Modeling transducer frequency response #422

Open
bcotr opened this issue Mar 3, 2025 · 1 comment
Open

Modeling transducer frequency response #422

bcotr opened this issue Mar 3, 2025 · 1 comment

Comments

@bcotr
Copy link

bcotr commented Mar 3, 2025

Hi,
I'm simulating with a linear array as the detection geometry. After noticing that the frequency content of the simulated time series is quite broad and does not match the transducer's digital twin properties, I checked the code and found the existence of the 'model_sensor_frequency_response' flag (Tags.MODEL_SENSOR_FREQUENCY_RESPONSE) which is set to False by default.
If I understood correctly, when this flag is set to True, the center frequency and bandwidth values are stored in sensor, and k-Wave filters sensor_data. Otherwise, no filtering is applied, and the entire spectrum is retained. I was wondering why this flag is set to False by default. I probably don't have a complete view of SIMPA's use cases, but since this flag isn't used in any examples, it might be helpful to notify users that the center frequency and bandwidth values won't have any effect unless the flag is enabled.
I tested this behavior using the optical_and_acoustic_simulation.py script with both the linear probe and the Acuity system (default values for both detection geometries: 3.96 MHz, 55% bandwidth, 40 MHz sampling rate). I also tried to simulate the Verasonics L11-5v probe (7.8 MHz, 55%). When comparing the frequency spectra of the simulations with an in-vivo acquisition using the L11-5v, I noticed that the expected frequency components were absent. While I don’t expect an exact match with in-vivo acquisitions, I was surprised that these frequencies were not present at all (image below).
I also experimented with varying the shape and size of the vessels, but the spectral content remained similar. Do you have any suggestions on how to refine the volume simulation to better capture signal components within the L11-5v's frequency range?
I also noticed the same issue with the Acuity when the flag is set to True (using the original optical_and_acoustic_simulation.py script with the Acuity as the device).
Thanks in advance!

Image

For the Acuity:

Image

@jgroehl
Copy link
Collaborator

jgroehl commented Mar 3, 2025

Hi @bcotr,

Our rationale was that, when in doubt, it would always be better to have the full bandwidth in the simulations, as a filter can easily be applied later. It is of course debatable if this led to the most intuitive design choice for setting the parameter. I agree that having two separate flags for this may not be optimal. It should for sure be activated once set and deactivated if not set - or at the minimum be better documented.

As to your second question: what is the resolution of your simulations? If you check the k-Wave logs, it will tell you the maximum frequency that your grid resolution supports. It is probably simply a case of the high frequencies not being part of the computations.

Please let me know what you find during your investigations!

Best wishes,
Janek

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

No branches or pull requests

2 participants