k-wave-python icon indicating copy to clipboard operation
k-wave-python copied to clipboard

[BUG]Voxel Plot switched axes

Open faberno opened this issue 1 year ago • 0 comments

Describe the bug It seems like the x and z axis are switched up in voxel_plot.

https://github.com/waltsims/k-wave-python/blob/d4b8e3c0a7d1cef56564783074d6a522aa9f4813/kwave/utils/plot.py#L38C1-L40C40

See screenshots for a comparison between k-wave-matlab, the current behaviour and the "fixed" behaviour.

Fixed by:

    ax.set_xlim([0.5, sz[0] + 0.5])
    ax.set_ylim([0.5, sz[1] + 0.5])
    ax.set_zlim([0.5, sz[2] + 0.5])

To Reproduce Run examples which contain the voxel_plot function:

  • at_linear_array_transducer
  • us_defining_transducer

Screenshots at_linear_array_transducer: voxelplot_linarray

us_defining_transducer: voxelPlot_ustransducer

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version: 22.04

faberno avatar Nov 11 '24 14:11 faberno