Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/api_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ Modules
.. toctree::
:maxdepth: 1

modules/pyrato
modules/analytic
modules/dsp
modules/edc
modules/parameters
modules/parametric
5 changes: 3 additions & 2 deletions docs/modules/analytic.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
analytic
========
pyrato.analytic
===============

.. automodule:: pyrato.analytic
:members:
:undoc-members:
:show-inheritance:

6 changes: 3 additions & 3 deletions docs/modules/pyrato.rst → docs/modules/dsp.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pyrato
======
pyrato.dsp
==========

.. automodule:: pyrato
.. automodule:: pyrato.dsp
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/modules/edc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pyrato.edc
==========

.. automodule:: pyrato.edc
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/modules/parameters.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pyrato.parameters
=================

.. automodule:: pyrato.parameters
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/modules/parametric.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pyrato.parametric
=================

.. automodule:: pyrato.parametric
:members:
:undoc-members:
:show-inheritance:
4 changes: 2 additions & 2 deletions pyrato/dsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def time_shift(signal, shift, circular_shift=True, unit='samples'):
>>> import matplotlib.pyplot as plt
>>> impulse = pf.signals.impulse(
... 32, amplitude=(1, 1.5, 1), delay=(14, 15, 16))
>>> shifted = ra.time_shift(impulse, [-2, 0, 2])
>>> shifted = ra.dsp.time_shift(impulse, [-2, 0, 2])
>>> pf.plot.use('light')
>>> _, axs = plt.subplots(2, 1)
>>> pf.plot.time(impulse, ax=axs[0])
Expand All @@ -228,7 +228,7 @@ def time_shift(signal, shift, circular_shift=True, unit='samples'):
>>> import pyrato as ra
>>> import matplotlib.pyplot as plt
>>> impulse = pf.signals.impulse(32, delay=15)
>>> shifted = ra.time_shift(impulse, -10, circular_shift=False)
>>> shifted = ra.dsp.time_shift(impulse, -10, circular_shift=False)
>>> pf.plot.use('light')
>>> _, axs = plt.subplots(2, 1)
>>> pf.plot.time(impulse, ax=axs[0])
Expand Down
12 changes: 6 additions & 6 deletions pyrato/edc.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def schroeder_integration(room_impulse_response, is_energy=False):
... L, source_pos, receiver_pos,
... reverberation_time=1, max_freq=1e3, n_samples=2**16,
... speed_of_sound=343.9)
>>> edc = ra.schroeder_integration(rir)
>>> edc = ra.edc.schroeder_integration(rir)
>>> pf.plot.time(rir/np.abs(rir.time).max(), dB=True, label='RIR')
>>> ax = pf.plot.time(
... edc/edc.time[..., 0], dB=True, log_prefix=10, label='EDC')
Expand Down Expand Up @@ -251,7 +251,7 @@ def energy_decay_curve_truncation(
... rir.n_samples, rms=rir.time.max()*10**(-50/20),
... sampling_rate=rir.sampling_rate)
>>> rir = rir + awgn
>>> edc = ra.energy_decay_curve_truncation(rir)
>>> edc = ra.edc.energy_decay_curve_truncation(rir)
...
>>> ax = pf.plot.time(rir, dB=True, label='RIR')
>>> pf.plot.time(edc, dB=True, log_prefix=10, label='EDC')
Expand Down Expand Up @@ -389,7 +389,7 @@ def energy_decay_curve_lundeby(
... rir.n_samples, rms=rir.time.max()*10**(-50/20),
... sampling_rate=rir.sampling_rate)
>>> rir = rir + awgn
>>> edc = ra.energy_decay_curve_lundeby(rir)
>>> edc = ra.edc.energy_decay_curve_lundeby(rir)
...
>>> ax = pf.plot.time(rir, dB=True, label='RIR')
>>> pf.plot.time(edc, dB=True, log_prefix=10, label='EDC')
Expand Down Expand Up @@ -535,7 +535,7 @@ def energy_decay_curve_chu(
... rir.n_samples, rms=rir.time.max()*10**(-40/20),
... sampling_rate=rir.sampling_rate)
>>> rir = rir + awgn
>>> edc = ra.energy_decay_curve_chu(rir)
>>> edc = ra.edc.energy_decay_curve_chu(rir)
...
>>> pf.plot.time(rir/np.abs(rir.time).max(), dB=True, label='RIR')
>>> ax = pf.plot.time(
Expand Down Expand Up @@ -675,7 +675,7 @@ def energy_decay_curve_chu_lundeby(
... rir.n_samples, rms=rir.time.max()*10**(-50/20),
... sampling_rate=rir.sampling_rate)
>>> rir = rir + awgn
>>> edc = ra.energy_decay_curve_chu_lundeby(rir)
>>> edc = ra.edc.energy_decay_curve_chu_lundeby(rir)
...
>>> ax = pf.plot.time(rir, dB=True, label='RIR')
>>> pf.plot.time(edc, dB=True, log_prefix=10, label='EDC')
Expand Down Expand Up @@ -828,7 +828,7 @@ def intersection_time_lundeby(
... rir.n_samples, rms=rir.time.max()*10**(-40/20),
... sampling_rate=rir.sampling_rate)
>>> rir = rir + awgn
>>> inter_time, _, noise_power = ra.intersection_time_lundeby(rir)
>>> inter_time, _, noise_power = ra.edc.intersection_time_lundeby(rir)
...
>>> ax = pf.plot.time(rir, dB=True, label='RIR')
>>> ax.axvline(inter_time, c='k', linestyle='--', label='$T_i$')
Expand Down