Files
DP44/DataPRO/FftSharp/Windows/Welch.cs

19 lines
658 B
C#
Raw Normal View History

2026-04-17 14:55:32 -04:00
namespace FftSharp.Windows
{
public class Welch : Window, IWindow
{
public override string Name => "Welch";
public override string Description =>
"The Welch window is typically used for antialiasing and resampling. " +
"Its frequency response is better than that of the Bartlett windowed cosc function below pi, " +
"but it shows again a rather distinctive bump above.";
protected override double windowValue(int index, int size)
{
double halfN = (size - 1) / 2.0;
double b = (index - halfN) / halfN;
return 1 - b * b;
}
}
}