Skip to content

Commit ae5f5bb

Browse files
MarDiehlDietBru
andauthored
DOC: signal.unit_impulse: add explanation about delta (scipy#21859)
--- Co-authored-by: Dietrich Brunn <[email protected]>
1 parent 705b490 commit ae5f5bb

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

scipy/signal/_waveforms.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ def _sweep_poly_phase(t, poly):
579579

580580

581581
def unit_impulse(shape, idx=None, dtype=float):
582-
"""
582+
r"""
583583
Unit impulse signal (discrete delta function) or unit basis vector.
584584
585585
Parameters
@@ -603,7 +603,24 @@ def unit_impulse(shape, idx=None, dtype=float):
603603
604604
Notes
605605
-----
606-
The 1D case is also known as the Kronecker delta.
606+
In digital signal processing literature the unit impulse signal is often
607+
represented by the Kronecker delta. [1]_ I.e., a signal :math:`u_k[n]`,
608+
which is zero everywhere except being one at the :math:`k`-th sample,
609+
can be expressed as
610+
611+
.. math::
612+
613+
u_k[n] = \delta[n-k] \equiv \delta_{n,k}\ .
614+
615+
Furthermore, the unit impulse is frequently interpreted as the discrete-time
616+
version of the continuous-time Dirac distribution. [2]_
617+
618+
References
619+
----------
620+
.. [1] "Kronecker delta", *Wikipedia*,
621+
https://en.wikipedia.org/wiki/Kronecker_delta#Digital_signal_processing
622+
.. [2] "Dirac delta function" *Wikipedia*,
623+
https://en.wikipedia.org/wiki/Dirac_delta_function#Relationship_to_the_Kronecker_delta
607624
608625
.. versionadded:: 0.19.0
609626

0 commit comments

Comments
 (0)