cutcutcodec.core.signal.window.alpha_to_band
- cutcutcodec.core.signal.window.alpha_to_band(alpha: float) float[source]
Empirical estimation based on regression.
The fitted model is \(band = a*\alpha + b + c*tanh(d*\alpha)\).
This function is close to the identity function.
Examples
>>> import torch >>> from cutcutcodec.core.signal.window import alpha_to_band, find_dpss_law >>> alphas, _, bands = find_dpss_law() >>> pred = [alpha_to_band(a) for a in alphas.tolist()] >>> # import matplotlib.pyplot as plt >>> # _ = plt.plot(alphas.numpy(force=True), bands.numpy(force=True)) >>> # _ = plt.plot(alphas.numpy(force=True), pred) >>> # plt.show() >>>