f2e989565ab89af58dff63ab3cf89fe63af38327,examples/raytracing.py,,,#,65

Before Change



if __name__ == "__main__":

    if len(sys.argv) != 3:
        print("Usage: {} [small/medium/large] [low/medium/high]".format(sys.argv[0]))

    else:

        size = sys.argv[1]
        absorption = sys.argv[2]

        new_rir, room = get_rir(size=size, absorption=absorption)

        fs, old_rir = wavfile.read("notebooks/rir_{}_{}.wav".format(size, absorption))

        plt.figure()
        plt.plot(old_rir, label="old")
        plt.plot(new_rir, label="new")
        plt.legend()
        plt.show()

        // print("Max error (rel):", np.max(np.abs(new_rir - old_rir))/np.max(np.abs(new_rir)))
        // print("Mean error (rel):", np.mean(np.abs(new_rir - old_rir))/np.max(np.abs(new_rir)))

After Change



if __name__ == "__main__":

    parser = argparse.ArgumentParser(
        description=(
            "Demonstrates the use of ray tracing for rooms of "
            "different size and reverberation time"
        )
    )
    size_choices = list(size_opts.keys())
    reverb_choices = list(reverb_opts.keys())
    parser.add_argument(
        "size", choices=size_choices, default=size_choices[0], help="room size"
    )
    parser.add_argument(
        "reverb",
        choices=reverb_choices,
        default=reverb_choices[0],
        help="amount of reverberation",
    )
    args = parser.parse_args()

    rir, room = get_rir(size=args.size, reverb=args.reverb)

    room.plot(img_order=0)
    plt.title("The room we have simulated")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 17

Instances


Project Name: LCAV/pyroomacoustics
Commit Name: f2e989565ab89af58dff63ab3cf89fe63af38327
Time: 2020-06-02
Author: fakufaku@gmail.com
File Name: examples/raytracing.py
Class Name:
Method Name:


Project Name: akkana/scripts
Commit Name: df00aa16a20b8502a9b4b2ec7783316370f53e18
Time: 2020-07-10
Author: akkana@shallowsky.com
File Name: comet.py
Class Name:
Method Name:


Project Name: LCAV/pyroomacoustics
Commit Name: f2e989565ab89af58dff63ab3cf89fe63af38327
Time: 2020-06-02
Author: fakufaku@gmail.com
File Name: examples/raytracing.py
Class Name:
Method Name:


Project Name: geek-ai/MAgent
Commit Name: 2c00aa18540df4ab4c3afeacd44b556b3ce90782
Time: 2017-12-01
Author: zhenglianmin96@163.com
File Name: scripts/test/test_fps.py
Class Name:
Method Name: