aspsim.diagnostics.soundfieldplot.sf_plot

aspsim.diagnostics.soundfieldplot.sf_plot(ax, pos, sig, title='', arrays_to_plot=None, vminmax=None)

Makes a soundfield plot using the supplied matplotlib.pyplot axis

Parameters:
  • ax (axis obtained from fig, axes = plt.subplots())

  • pos (ndarray of shape (num_pos, spatial_dim)) – must be sorted, use function sort_for_imshow()

  • sig (ndarray of shape (num_pos, signal_dim)) – signal value for each position of the sound field must also be sorted the same way as pos

  • title (str) – optional title for the plot

  • arrays_to_plot (Array, ArrayCollection, list of Arrays, or dict of Arrays) – will be plotted along with the soundfield image. Can be used to see where microphones or loudspeakers are in relation to the soundfield

  • vminmax (length-2 tuple of float) – the tuple should be (vmin, vmax), which sets the minimum and maximum value that the colors get assigned to. Use this in particular when plotting multiple soundfields next to each other, so that the colors mean the same values in the different plots