cutcutcodec.core.signal.window.find_win_law¶
- cutcutcodec.core.signal.window.find_win_law(nb_samples: Integral = 129, nb_alphas: Integral = 1000, alpha_min: Real = 0.001, alpha_max: Real = 15.0, win: str = 'kaiser') tuple[Tensor, Tensor, Tensor][source]¶
For each beta parameter, associate the frequency properties.
Parameters¶
- nb_samplesint, default=129
The window size, it has to be >= 3.
- nb_alphasint, default=1000
The number of alpha points.
- alpha_minfloat, default=ALPHA_MIN
The minimal inclusive alpha value.
- alpha_maxfloat, default=15.0
The maximal inclusive alpha value.
- winstr, default=”kaiser”
The windows type, “kaiser” or “dpss”
Returns¶
- alphastorch.Tensor
The apha values.
- attstorch.Tensor
The real positive attenuation of the secondaries lobs in dB.
- bandstorch.Tensor
The normalised size of the main lob.
Examples¶
>>> import torch >>> from cutcutcodec.core.signal.window import find_win_law >>> alphas, atts, bands = find_win_law() >>> >>> # import matplotlib.pyplot as plt >>> # _ = plt.plot(alphas.numpy(force=True), atts.numpy(force=True), label="attenuation") >>> # _ = plt.plot(alphas.numpy(force=True), bands.numpy(force=True), label="band") >>> # _ = plt.legend() >>> # plt.show() >>>