public Spectrum GetSpectrum(ISignal signal) { var specArr = transformer.Transform(signal.GetValues().ToArray()); var len = (double)specArr.Length; var dur = signal.GetDurationInSeconds(); var points = specArr .Select((val, idx) => new FreqPoint(val, len / idx * dur)) .ToArray(); return(new Spectrum(new SpectrumLine[] { new SpectrumLine(points, 0) })); }