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

ISM for polyhedral room has wrong transmission coefficients #236

Closed
fakufaku opened this issue Oct 11, 2021 · 1 comment
Closed

ISM for polyhedral room has wrong transmission coefficients #236

fakufaku opened this issue Oct 11, 2021 · 1 comment
Assignees
Labels

Comments

@fakufaku
Copy link
Collaborator

The image source model for general polyhedral rooms produces wrong transmission coefficients.

import numpy
import numpy as np
import pyroomacoustics as pra

if __name__ == "__main__":

    # shoebox room: working correctly
    room = pra.ShoeBox([5, 7, 4], max_order=1, materials=pra.Material(0.1))
    # general room: not working
    room2 = pra.Room(room.walls, max_order=1)

    source_loc = [2, 3.5, 1.8]
    mic_loc = [3.7, 5.5, 1.0]

    room.add_source(source_loc)
    room2.add_source(source_loc)

    room.add_microphone(mic_loc)
    room2.add_microphone(mic_loc)

    room.image_source_model()
    room2.image_source_model()

    print("Shoebox damping:", np.sort(room.sources[0].damping))
    print("General damping:", np.sort(room2.sources[0].damping))

The output of this script should be the same transmission coefficients for the shoebox ISM and general ISM. However, this is the current output.

Shoebox damping: [[0.94868326 0.94868326 0.94868326 0.94868326 0.94868326 0.94868326  1.        ]]
General damping: [[0.7289998  0.7684333  0.8099998  0.85381484 0.8999999  0.94868326  1.        ]]
@fakufaku
Copy link
Collaborator Author

Fixed in #237

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant