Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Room plotting breaks when trying to visualise measured directional sources #391

Open
timbs85 opened this issue Jan 27, 2025 · 0 comments
Open

Comments

@timbs85
Copy link

timbs85 commented Jan 27, 2025

When attempting to plot a room containing a measured directional source using room.plot(), the following error is raised:

AttributeError: 'MeasuredDirectivity' object has no attribute 'plot_response'. Did you mean: 'get_response'?

Minimal Reproducible Example

import pyroomacoustics as pra
from pyroomacoustics.directivities import MeasuredDirectivityFile, Rotation3D
from pyroomacoustics.datasets import SOFADatabase

fs = 48000

# Initialize the SOFA database
db = SOFADatabase()
spkr_dirs = MeasuredDirectivityFile('LSPs_HATS_GuitarCabinets_Akustikmessplatz', fs=fs)
rot_54_73 = Rotation3D([73, 54], "yz", degrees=True)
dir_spkr = spkr_dirs.get_source_directivity('Yamaha_DXR8', orientation=rot_54_73)

# Create room
room_dim = [14.0, 12.0, 6.0]
room = pra.ShoeBox(room_dim, fs=fs)
room.add_source([3.0, 2.0, 1.7], directivity=dir_spkr)

# This line raises the error
room.plot()

It also fails with plot_directivity=True

Environment

  • PyRoomAcoustics version: 0.8.3
  • Python version: 3.12.5
  • Operating System: MacOS 14.4
@timbs85 timbs85 changed the title Room plotting breaks when trying to visualise directional sources Room plotting breaks when trying to visualise measured directional sources Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant