Open ltetrel opened 1 month ago
Can test directly that the mailobe pnp is computed correctly by creating a fake pnp volume with two peaks, with a smaller peak closer to the focus, and make sure it's producing the peak value around the focus
After some digging, the issue is not in the simulation output values:
p_min
(which is a coherent method for the location of the mainlobe) in both matlab and python, there are close.The issue is on the implementation of the focus mask, which is currently not valid (mask is too far from the focus region). Probably in src/openlifu/bf/offset_grid.py
(to compare with offset_grid.m
in matlab).
After testing the functionality from https://github.com/OpenwaterHealth/OpenLIFU-python/pull/140 and comparing with the expected solution analysis output from Matlab (only
mainlobe_pnp_MPa
ATM) , there are some regressions. This can come from two sources:tests/test_mask_focus.py
andtests/test_offset_grid.py
would need to be updated accordingly.