OpenwaterHealth / OpenLIFU-python

focused ultrasound toolbox
GNU Affero General Public License v3.0
12 stars 2 forks source link

Element.get_angle returns wrong order #173

Closed peterhollender closed 12 hours ago

peterhollender commented 1 day ago

the implementation of element orientations in opw_neuromod_sw was a little janky, because the Element.get_angle method returned [az, el] as the azimuthal and elevational title. However, when creating the kWaveArray, angle is specified about x, y', z'', so the MATLAB code had to feed el, az, roll to karray.addRectElement. In the python version, the output of get_angle was being fed directly, which was resulting in az-el-roll instead of el-az-roll. When arrays are flat, this doesn't matter, but when they are curved, we get rotation around the wrong axis and poor performance. This is one thing potentially affecting #141