aspsim.diagnostics.soundfieldplot.sort_for_imshow
- aspsim.diagnostics.soundfieldplot.sort_for_imshow(pos, sig, pos_decimals=5)
Sorts the position and signal values to display correctly when imshow is used to plot the sound field image
- Parameters:
pos (ndarray of shape (num_pos, spatial_dim)) – must represent a rectangular grid, but can be in any order.
sig (ndarray of shape (num_pos, signal_dim)) – signal value for each position of the sound field
pos_decimals (int) – selects how many decimals the position values are rounded to when calculating all the unique position values
- Returns:
pos_sorted (ndarray of shape (num_rows, num_cols, spatial_dim))
sig_sorted (ndarray of shape (num_rows, num_cols, signal_dim))