The impulse response of a Gaussian Filter is written as a Gaussian Function as follows:
Its result is also Gaussian. In this article, we will plot the gauss pulse at 3Hz using scipy and matplotlib Python library. Gauss pulse is used in digital filters for motion analysis. To create a gauss pulse scipy’s gausspulse() method is used. gausspulse() returns a unit-amplitude Gaussian-modulated sinusoidal pulse at the times indicated in array t, with a center frequency ‘fc’ in hertz(Hz).
Syntax: scipy.signal.gausspulse(t, fc retquad, retenv)
- t: Input array.
- fc: Center frequency.
- retquad: If True, return the imaginary as well as the real part of the signal. Default is False.
- retenv: If True, return the envelope of the signal. Default is False.
- yI: The real part of the signal. Always returned.
- yQ: Imaginary part of signal. Only returned if retquad is True.
- yenv: The envelope of the signal. Only returned if retenv is True.
- Import required module.
- Create an array of data using np.linespace.
- Create a gauss pulse at 3 Hz.
- Label the Graph.
- Show the resultant Graph.
Implementation using the above approach is depicted below:
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.