-
sdr.rectangular(sps: int, span: int =
1
, norm: 'power' | 'energy' | 'passband' ='energy'
) NDArray[float64] Returns a rectangular pulse shape.
- Parameters:¶
- sps: int¶
The number of samples per symbol.
- span: int =
1
¶ The length of the filter in symbols. The length of the filter is
span * sps
samples, but only the centersps
samples are non-zero. The only reason forspan
to be larger than 1 is to add delay to the filter.- norm: 'power' | 'energy' | 'passband' =
'energy'
¶ Indicates how to normalize the pulse shape.
"power"
: The pulse shape is normalized so that the maximum power is 1."energy"
: The pulse shape is normalized so that the total energy is 1."passband"
: The pulse shape is normalized so that the passband gain is 1.
- Returns:¶
The rectangular pulse shape.
Examples
In [1]: h_rect = sdr.rectangular(10) In [2]: plt.figure(); \ ...: sdr.plot.impulse_response(h_rect); ...: In [3]: plt.figure(); \ ...: sdr.plot.magnitude_response(h_rect); ...:
See the Pulse shapes example.